Add 'reformat' rule

This commit is contained in:
Thomas Stromberg 2022-10-20 09:10:45 -04:00
parent 1a54cebb55
commit 56b1af7b14
Failed to extract signature
1 changed files with 4 additions and 0 deletions

View File

@ -16,4 +16,8 @@ packs: out/odk-detection.sql out/odk-policy.sql out/odk-incident_response.sql
out/odk-packs.zip: packs
cd out && zip odk-packs.zip *.conf
.PHONY: reformat
reformat:
find . -type f -name "*.sql" | perl -ne 'chomp; system("cp $$_ /tmp/fix.sql && npx sql-formatter -l sqlite /tmp/fix.sql > $$_");'
all: out/odk-packs.zip