IBLinter icon indicating copy to clipboard operation
IBLinter copied to clipboard

Allow users to disable rules by filename

Open SD10 opened this issue 7 years ago • 1 comments

In SwiftLint you can disable rules through comments in the source code. This is a little more difficult for storyboards. It would be nice to allow users to turn of specific rules for certain files

SD10 avatar Mar 12 '18 02:03 SD10

iirc, SwiftLint’s config file is based on RuboCop. In RuboCop, file-level exclusions are handled in the config yml file like:

Metrics/BlockLength:
  Exclude:
    - 'my_big_class.rb'

In that example, the “Metrics/BlockLength” rule would not be run on the “my_big_class.rb” file.

So, for IBLinter, you might end up with something like this in your .iblinter.yml file:

relative_to_margin:
  Exclude:
    - 'MyMarginedLayout.storyboard'
    - 'App/Base.lproj/AnotherLayoutUsingMargins.storyboard'

grantneufeld avatar Nov 03 '19 19:11 grantneufeld