Created
May 22, 2019 12:01
-
-
Save natiginfo/2cd6d8238dbadb247c0b889b6545e6ec to your computer and use it in GitHub Desktop.
Script for fixing ktlint issues 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 -F ${file_path} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment