Last active
May 22, 2019 12:01
-
-
Save natiginfo/b815be7ded4b2b845baea8783f7e2a53 to your computer and use it in GitHub Desktop.
Script for running ktlint only on files that differs from master branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CHANGED_FILES=($(git diff master --name-only "*.kt")) | |
for file_path in "${CHANGED_FILES[@]}" | |
do | |
ktlint ${file_path} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment