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

Add option to disable swiftlint in-file #2071

Closed
fredpi opened this issue Feb 26, 2018 · 8 comments
Closed

Add option to disable swiftlint in-file #2071

fredpi opened this issue Feb 26, 2018 · 8 comments
Labels
enhancement Ideas for improvements of existing features and rules.

Comments

@fredpi
Copy link
Collaborator

fredpi commented Feb 26, 2018

For some cases, it would be useful to have a command to disable swiftlint parsing for a specific file (e. g. // swiftlint:disable:file.

I know there's already an exclude option in the .yml file, but that one is not always suitable. Consider 3rd-party-frameworks like SwiftGen that currently always have to specifically disable single rules. A disable command in-file would fix that issue.

@marcelofabri marcelofabri added the enhancement Ideas for improvements of existing features and rules. label Feb 26, 2018
@marcelofabri
Copy link
Collaborator

We probably should follow rubocop's approach:

// swiftlint:disable all
[...]
// swiftlint:enable all

@fredpi Would you like to submit a PR implementing this feature?

@fredpi
Copy link
Collaborator Author

fredpi commented Feb 26, 2018

Yeah, will do a PR with an implementation these days

@fredpi
Copy link
Collaborator Author

fredpi commented Mar 3, 2018

Didn't forget about this, however, will have to delay this a few days. On a tight schedule currently...

@marcelofabri
Copy link
Collaborator

No worries!

@bj97301
Copy link

bj97301 commented Mar 5, 2018

Hows it going?

@fredpi
Copy link
Collaborator Author

fredpi commented Mar 5, 2018

@bj97301 As pointed out, takes a bit, but looking good...

@bj97301
Copy link

bj97301 commented Mar 5, 2018

Nice. Looking forward to it :D

@marcelofabri
Copy link
Collaborator

Closed in #2095 by @fredpi 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Ideas for improvements of existing features and rules.
Projects
None yet
Development

No branches or pull requests

3 participants