Skip to content

Commit

Permalink
Fix swiftlinit rules output table formatting
Browse files Browse the repository at this point in the history
Fixes #2787

Broken since #2379
  • Loading branch information
jpsim committed Jul 28, 2019
1 parent 83541ee commit d064177
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
[Colton Schlosser](https://github.com/cltnschlosser)
[#2812](https://github.com/realm/SwiftLint/issues/2812)

* Fix `swiftlinit rules` output table formatting.
[JP Simard](https://github.com/jpsim)
[#2787](https://github.com/realm/SwiftLint/issues/2787)

## 0.34.0: Anti-Static Wool Dryer Balls

#### Breaking
Expand Down
2 changes: 1 addition & 1 deletion Source/swiftlint/Commands/RulesCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ extension TextTable {
func truncate(_ string: String) -> String {
let stringWithNoNewlines = string.replacingOccurrences(of: "\n", with: "\\n")
let minWidth = "configuration".count - "...".count
let configurationStartColumn = 112
let configurationStartColumn = 124
let truncatedEndIndex = stringWithNoNewlines.index(
stringWithNoNewlines.startIndex,
offsetBy: max(minWidth, Terminal.currentWidth() - configurationStartColumn),
Expand Down

0 comments on commit d064177

Please sign in to comment.