You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried running the pre-push hook with a simple change that should be auto-formatted by kotlinter. The change was to add an extra space after a line of code.
I ran the pre-push hook and the linter failed but my git status was not dirty so I added an echo in the script to make sure the status was being captured after lintKotlin and it was going down the code-path to format.
I do not see my echo and based on the output and my git status it looks like formatKotlin was not run.
My hypothesis is that lintKotlin exited with an error status code since there were linter violations, but the hook was not able to capture that failed status code and run the formatter before the script was terminated. Does this sound like a bug in the script?
The text was updated successfully, but these errors were encountered:
Thanks for the report. Can you let me know what flavor of shell you are using?
The syntax has been adjusted a couple of times, most recently here #177, to correctly capture the status, but it could be this doesn't work everywhere.
If you find that's the case, can you modify the shell script locally and see if it starts working with added [ ] or other shell changes?
I tried running the pre-push hook with a simple change that should be auto-formatted by kotlinter. The change was to add an extra space after a line of code.
I ran the pre-push hook and the linter failed but my git status was not dirty so I added an
echo
in the script to make sure the status was being captured afterlintKotlin
and it was going down the code-path to format.I do not see my echo and based on the output and my
git status
it looks likeformatKotlin
was not run.My hypothesis is that
lintKotlin
exited with an error status code since there were linter violations, but the hook was not able to capture that failed status code and run the formatter before the script was terminated. Does this sound like a bug in the script?The text was updated successfully, but these errors were encountered: