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

Comments

Projects
None yet
3 participants
@fredpi
Contributor

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

This comment has been minimized.

Collaborator

marcelofabri commented Feb 26, 2018

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

This comment has been minimized.

Contributor

fredpi commented Feb 26, 2018

Yeah, will do a PR with an implementation these days

@fredpi

This comment has been minimized.

Contributor

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

This comment has been minimized.

Collaborator

marcelofabri commented Mar 3, 2018

No worries!

@bj97301

This comment has been minimized.

bj97301 commented Mar 5, 2018

Hows it going?

@fredpi

This comment has been minimized.

Contributor

fredpi commented Mar 5, 2018

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

@bj97301

This comment has been minimized.

bj97301 commented Mar 5, 2018

Nice. Looking forward to it :D

@fredpi fredpi referenced this issue Mar 11, 2018

Merged

Add all keyword #2095

@marcelofabri

This comment has been minimized.

Collaborator

marcelofabri commented Mar 21, 2018

Closed in #2095 by @fredpi 💯

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