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

Print the name of the rule to ignore #1121

Closed
androidfred opened this issue Mar 25, 2021 · 2 comments
Closed

Print the name of the rule to ignore #1121

androidfred opened this issue Mar 25, 2021 · 2 comments
Milestone

Comments

@androidfred
Copy link

Expected Behavior

violations print the name of the rule ie

[ktlint] /foo/bar/FooBar.kt:40:21: Line must not begin with "&&" (rule: nameoftherule)

Observed Behavior

violations don't print the name of the rule

[ktlint] /foo/bar/FooBar.kt:40:21: Line must not begin with "&&"

Steps to Reproduce

add to any file && at beginning of line (or any rule violation to any file)

Your Environment

  • Version of ktlint used: All versions
  • Name and version (or code for custom task) of integration used (Gradle plugin, Maven plugin, command line, custom Gradle task): All versions
  • Version of Gradle used (if applicable): All versions
  • Operating System and version: All versions
  • Link to your project (if it's a public repository): Private enterprise repo
@amc6
Copy link

amc6 commented Apr 5, 2021

I believe if you run ktlint with the --verbose flag it will do what you want. Although I agree, I would expect that to be the default behavior.

@androidfred
Copy link
Author

@amc6 Thanks for the tip, that's super helpful! But yeah I have to agree optimally it would be printed by default without having to run with --verbose :P

@paul-dingemans paul-dingemans added this to the 0.45.0 milestone Feb 17, 2022
paul-dingemans added a commit to paul-dingemans/ktlint that referenced this issue Feb 25, 2022
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

4 participants