Skip to content

Instantly share code, notes, and snippets.

@natiginfo
Created May 22, 2019 12:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save natiginfo/2cd6d8238dbadb247c0b889b6545e6ec to your computer and use it in GitHub Desktop.
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
#!/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