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

Allow users to disable rules by filename #32

Open
SD10 opened this issue Mar 12, 2018 · 1 comment
Open

Allow users to disable rules by filename #32

SD10 opened this issue Mar 12, 2018 · 1 comment

Comments

@SD10
Copy link
Member

SD10 commented Mar 12, 2018

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

@grantneufeld
Copy link

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants