-
Notifications
You must be signed in to change notification settings - Fork 506
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
Suppress all/specific rules for a given file #328
Comments
krzema12
added a commit
to fsynthlib/fsynth
that referenced
this issue
Jan 12, 2019
Checks for tests are omitted because of peculiar formatting required by PlotAssert. See pinterest/ktlint#328 for details. Part of #32.
should do it. |
Thanks, that is enough for me for now. However, +1 to #208. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In my projects, in unit tests, I use a library that requires adding some extra spaces, to align strings and other values with each other, for example:
You can see that e.g. after most
row(
, some extra spaces are added. Also invalues
function call, parameters are aligned in a peculiar way. Ktlint doesn't like it and I understand it.What I would like to achieve is to disable
no-multi-spaces
andparen-spacing
checks for a given.kt
file. This way I could have Ktlint checks also in my unit tests, excluding these two checks to allow special formatting required byassertFunctionConformsTo
. Currently I told Ktlint to omit checking unit tests.I tried adding e.g.
package it.krzeminski.fsynth // ktlint-disable
, but it doesn't work at all. Suppressing a specific error doesn't work as well.The text was updated successfully, but these errors were encountered: