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 reproduced this with Ktlint 1.8.0 in a disposable repository. The cause is the hook name: the built-in hook is KtLint, with a capital L, while the report uses Ktlint.
Ktlint plus required_executable: ktlint creates an ad hoc hook, which receives Git's original pre-commit arguments (no filenames). Ktlint then scans its default patterns and reports unchanged files. The built-in KtLint passes only applicable modified filenames.
I verified a real commit fails on an unchanged invalid Bad.kt with the reported spelling, then succeeds with the same files after changing only Ktlint to KtLint. #927 documents the correction and strengthens the built-in argument test; it will close this issue after CI passes and the PR is merged.
Activity
sds commentedon Nov 10, 2026
I reproduced this with Ktlint 1.8.0 in a disposable repository. The cause is the hook name: the built-in hook is
KtLint, with a capitalL, while the report usesKtlint.Use:
Ktlintplusrequired_executable: ktlintcreates an ad hoc hook, which receives Git's original pre-commit arguments (no filenames). Ktlint then scans its default patterns and reports unchanged files. The built-inKtLintpasses only applicable modified filenames.I verified a real commit fails on an unchanged invalid
Bad.ktwith the reported spelling, then succeeds with the same files after changing onlyKtlinttoKtLint. #927 documents the correction and strengthens the built-in argument test; it will close this issue after CI passes and the PR is merged.Document the case-sensitive KtLint hook name (#927)