Skip to content

Option to ignore one or all rules for a file by adding a comment - #76

Closed
evermeer wants to merge 1 commit into
realm:masterfrom
evermeer:patch-1
Closed

evermeer wants to merge 1 commit into
realm:masterfrom
evermeer:patch-1

Conversation

@evermeer

@evermeer evermeer commented Jun 3, 2015

Copy link
Copy Markdown

With this change you can disable all rules for a file by adding the following line to your swift file:
// SwiftLint ignore all
or you can disable a specific rule by adding something like:
// SwiftLint ignore variable_name
Where variable_name is the identifier of the rule

With this change you can disable all rules for a file by adding the following line to your swift file:
// SwiftLint ignore all
or you can disable a specific rule by adding something like:
// SwiftLint ignore variable_name
Where variable_name is the identifier of the rule
@segiddins

Copy link
Copy Markdown
Contributor

This only seems to be per-file, and thus has no way to only ignore a certain section of code?

@jpsim

jpsim commented Jun 3, 2015

Copy link
Copy Markdown
Collaborator

This would conflict with the current proposal described in #4. Although the approach of filtering the results could still work with file regions rather than per-file.

@evermeer

evermeer commented Jun 4, 2015

Copy link
Copy Markdown
Author

When #4 will be implemented soon, then this PR can be closed without merge.

@keith

keith commented Sep 2, 2015

Copy link
Copy Markdown
Contributor

A similar but different version of this was implemented in #111

@jpsim

jpsim commented Sep 2, 2015

Copy link
Copy Markdown
Collaborator

Thanks for pointing that out, @keith. Closing since #111 allows this behavior and more.

@jpsim jpsim closed this Sep 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants