.ktlint.0.37.2.source-code.ktlint-git-pre-commit-hook-android.sh Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ktlint Show documentation
Show all versions of ktlint Show documentation
An anti-bikeshedding Kotlin linter with built-in formatter.
#!/bin/sh
# https://github.com/shyiko/ktlint pre-commit hook
git diff --name-only --cached --relative | grep '\.kt[s"]\?$' | xargs ktlint --android --relative .
if [ $? -ne 0 ]; then exit 1; fi
© 2015 - 2024 Weber Informatics LLC | Privacy Policy