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
--include-only is not working #69
Comments
Thanks for the issue report @akfpnd
I'm not able to reproduce this behavior. I just tried on the |
Could you please create separate project from scratch with Android Studio version I mentioned and setup gradle task in app module
use |
I've added you to the repro here (it's private) If you invoke
you'll see that the other file (MainActivity.kt) is not reformatted. |
@akfpnd where you able to test it? |
🐛 Describe the bug
Running gradle task
./gradlew ktfmtPrecommit --include-only=path/to/file.kt
is not including specified file to format.Without
--include-only
everything works wellcommand
./gradlew ktfmtPrecommit --include-only=path/to/file.kt
is not including specified file to format✅ Expected behavior
command
./gradlew ktfmtPrecommit --include-only=path/to/file.kt
should include specified file to format💣 Steps to reproduce
setup task in build.gradle file
do the change in any Kotlin file of the project then check the change by
git diff --name-only
then run command
./gradlew ktfmtPrecommit --include-only=path/to/file/from/git/diff/file.kt
gradle task will ignore specified file
I tried to use absolute path, tried to use
--include-only="path/to/file.kt"
nothing help📷 Log
[ktfmt] Skipping for: /absolute/path/to/file.kt because: Not included inside --include-only
But is actually included!
📱 Tech info
Sytem: macOS 12.2.1
Android Studio: 2021.1.1 Patch 3
JVM version: 11
Gradle version: 7.1.3 (gradle-7.2-bin)
Library version: 0.8.0
The text was updated successfully, but these errors were encountered: