Skip to content

Instantly share code, notes, and snippets.

@BraisGabin
Last active December 22, 2020 10:12
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 BraisGabin/8958c44f3cf9e939294e25e82547862c to your computer and use it in GitHub Desktop.
Save BraisGabin/8958c44f3cf9e939294e25e82547862c to your computer and use it in GitHub Desktop.
Update detekt configuration
#!/usr/bin/env bash
mv config/detekt/detekt.yml config/detekt/detekt.yml.old
./gradlew detektGenerateConfig
diff config/detekt/detekt.yml config/detekt/detekt.yml.old >config/detekt/detekt.patch
read -p "Update detekt and then press ENTER" ignore
rm config/detekt/detekt.yml
./gradlew detektGenerateConfig
patch config/detekt/detekt.yml --no-backup-if-mismatch --merge <config/detekt/detekt.patch
rm config/detekt/detekt.patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment