Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

running 'swiftlint rules' overruns the terminal width #2787

Closed
Fudge0952 opened this issue Jun 25, 2019 · 2 comments · Fixed by #2828

Comments

@Fudge0952
Copy link

commented Jun 25, 2019

New Issue Checklist

Describe the bug

When running swiftlint rules, I expect it to use the width of the terminal correctly. What is happening is that it appears to be thinking the terminal is 11 characters wider (in iTerm at least). I've attached a screenshot showing the output before any resizing.

image

Tested and got the same output from Apple Terminal as well.

Complete output when running SwiftLint, including the stack trace and command used

n/a

Environment

  • SwiftLint version (run swiftlint version to be sure)? 0.33.0
  • Installation method used (Homebrew, CocoaPods, building from source, etc)? brew
  • Paste your configuration file:
opt_in_rules: # some rules are only opt-in
  - conditional_returns_on_newline
  - empty_count
  - force_unwrapping
  - missing_docs
  - redundant_nil_coalescing
  - sorted_imports
  - switch_case_on_newline

disabled_rules: # rule identifiers to exclude from running
  - multiple_closures_with_trailing_closure
  - statement_position
  - trailing_whitespace
  - unused_closure_parameter

excluded: # paths to ignore during linting. Takes precedence over `included`.
  - Pods
  - Carthage

file_length:
  warning: 750
  error: 1000
  ignore_comment_only_lines: true
force_cast:
  severity: warning
force_try:
  severity: warning
force_unwrapping: error
function_body_length:
  warning: 80
  error: 150
line_length: 150
missing_docs:
  warning: open
nesting:
  type_level:
    warning: 2
trailing_comma:
  mandatory_comma: true
weak_delegate: error
  • Are you using nested configurations? no
    If so, paste their relative paths and respective contents.
  • Which Xcode version are you using (check xcode-select -p)? /Applications/Xcode.app/Contents/Developer - Version 10.2.1 (10E1001)
@idrougge

This comment has been minimized.

Copy link

commented Jul 10, 2019

In my case, the output is 54 columns wider (134 columns) than my terminal (80x24).

@idrougge

This comment has been minimized.

Copy link

commented Jul 10, 2019

On a related note, the configuration column is nevertheless truncated.

@jpsim jpsim added the bug label Jul 28, 2019

jpsim added a commit that referenced this issue Jul 28, 2019

@jpsim jpsim closed this in #2828 Jul 28, 2019

jpsim added a commit that referenced this issue Jul 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.