-
Notifications
You must be signed in to change notification settings - Fork 162
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
git hook behaves differently than ktlintCheck #648
Comments
Can you share the commit hook file that was generated for you? |
I htink it always generates the same file:
|
Just stumbled up this, probably resolved already, but in your case the script only seems to look for changed Try changing the CHANGED_FILES="$(git --no-pager diff --name-status --no-color --cached | awk '$1 != "D" && $NF ~ /\.kts|\.kt/ { print $NF }')" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if I add the plug-in and run
gradlew ktlintCheck
in the Android Studio terminal the checks works, but if I generate the git hook with gradlew addKtlintCheckGitPreCommitHook, the file pre-commit is generated but then when committing the check doesn't find any issues. What I see in the console is:The text was updated successfully, but these errors were encountered: