-
Notifications
You must be signed in to change notification settings - Fork 508
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
How to exclude generated sources from ktlint --relative? #1834
Comments
Duplicate of #1793. |
@Kolyall You can also use the ktlint snapshot (https://pinterest.github.io/ktlint/install/snapshot-build/) to verify that your problem is solved. |
Having similar issue with generated code from Kotlin build scripts (under |
Excluding paths is already a feature. ktlint . '!buildSrc/**' |
Thanks! found the docs https://pinterest.github.io/ktlint/install/cli/#globs
So this will make sure ktlint is running on both kt and kts files (event in |
Yes that is correct. The default (include) patters will only be applied whenever no patterns are specified. But that does not make sense when only an exclude pattern is given. |
After run the command from pre-commit:
Output is :
ktlint also include files from folder: app/build/generated/source/kapt/
The text was updated successfully, but these errors were encountered: