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

Follow @Suppress/@SuppressWarnings #1463

Merged

Conversation

paul-dingemans
Copy link
Collaborator

Description

Allow suppressing of klint rules using qualified rule ids which are prefixed by ktlint:. Standard rules can be suppressed using @Suppress("ktlint:max-line-length") while non-standard rules need to be suppressed with @Suppress("ktlint:experimental:trailing-comma").

Also allow to use @Suppress("ktlint") to suppress all rules.

Closes #765
Closes #1458

Checklist

  • PR description added
  • tests are added
  • CHANGELOG.md is updated

In case of adding a new rule:

  • README.md is updated
  • Rule has been applied on Ktlint itself and violations are fixed

…refixed by `ktlint:`. Standard rules can be suppressed using `@Suppress("ktlint:max-line-length")` while non-standard rules need to be suppressed with `@Suppress("ktlint:experimental:trailing-comma")` Also allow to use `@Suppress("ktlint")` to suppress all rules.

Closes pinterest#765
Closes pinterest#1458
@paul-dingemans paul-dingemans added this to the 0.46.0 milestone May 8, 2022
@paul-dingemans paul-dingemans merged commit 1badff6 into pinterest:master May 20, 2022
@paul-dingemans paul-dingemans deleted the 765-suppress-annotations branch May 20, 2022 15:12
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.

Unexpected whitespace Make ktlint follow @Suppress/@SuppressWarning annotations
1 participant