-
Notifications
You must be signed in to change notification settings - Fork 505
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
Function parameters are forcefully wrapped #2424
Comments
Adding |
When you run ktlint without format, you can identify which rule is emitting the violation. In this case:
So, you are disabling the wrong rule. |
@paul-dingemans Before closing this, please note the fair? confusion based on documentation. There's an exact match with a meaningfully valid and relevant name for the problem I was facing: Maybe it's worth mentioning in the docs of The disabling I mentioned was an attempted workaround based on the above (IMO very fair) assumption. The root cause here is again the changed default style which triggers the formatting on "2 or more parameters". |
…signature` rules as both deal with wrapping parameters. Closes #2424
How do you get the rule name in the output like that? I use "mvn ktlint:check" and am so tired of googling the messages to find the rule name. An why on earth are the messages not included in the docs, so you can find them there? |
This output is produced by Ktlint CLI (Plain Reporter). You can also use the
What about a lack of contributors? Feel free to contribute and maintain this kind of reference in the long run. |
Thanks. I also found out the maven plugin could be configured with "verbose" (for some reason it filters rule names by default)
Sorry, I just sort of assumed the rule docs were generated form the rule code. I see now they are manual .md files, and thus your point. |
Expected Behavior
Code stays as it is, because it very clearly and easily fit on one line.
Observed Behavior
Steps to Reproduce
ktlint "writeACTL.kt" --format
Your Environment
.editorconfig
settings: noneThe text was updated successfully, but these errors were encountered: