refactor: add repo-specific fmt in megalinter pre-commands too

For users that don't end up installing lefthook for pre-commit hooks this will ensure that megalinter picks up the necessary formatting changes and reports them.
This commit is contained in:
Amir Zarrinkafsh 2025-07-24 10:53:33 +10:00
parent 17720868c5
commit 6d06160998
No known key found for this signature in database
GPG Key ID: ECDB8EF9E77E4EBF

View File

@ -23,6 +23,17 @@ DISABLE_LINTERS:
- SPELL_CSPELL
- YAML_V8R
PRE_COMMANDS:
- command: apk add --no-cache yq
cwd: root
- command: yq -i ".cache_domains |= sort_by(.name)" cache_domains.json
cwd: workspace
- command: |
for f in *.txt; do
sort -uo ${f} ${f}
done
cwd: workspace
POST_COMMANDS:
- command: find . -user root -group root -exec chown ${USER}:${GROUP} {} \;
cwd: "workspace"
cwd: workspace