mirror of
https://github.com/scifijunk/cache-domains.git
synced 2026-02-04 00:21:01 -06:00
feat: add lefthook, megalinter and update editorconfig (#270)
This change adds [LeftHook](https://lefthook.dev/) as a GitHub hook management tool alongside [MegaLinter](https://megalinter.io/) to lint all relevant files within the repository. For users that don't end up installing LeftHook for pre-commit hooks, megalinter picks up the necessary formatting changes and reports them. * feat: add lefthook, megalinter and update editorconfig * fix: lint commit ordering * refactor: adjust megalinter reporters * refactor: adjust description for cache domains * refactor: single - for passing options * refactor: add repo-specific fmt in megalinter pre-commands too
This commit is contained in:
19
.lefthook.yml
Normal file
19
.lefthook.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
pre-commit:
|
||||
parallel: true
|
||||
jobs:
|
||||
- name: sort cache domains
|
||||
run: jq ".cache_domains |= sort_by(.name)" {all_files} > {all_files}.tmp && mv {all_files}.tmp {all_files}
|
||||
glob: "cache_domains.json"
|
||||
|
||||
- name: sort cdns
|
||||
run: |
|
||||
for f in {all_files}; do
|
||||
sort -uo ${f} ${f}
|
||||
done
|
||||
env:
|
||||
LC_ALL: C
|
||||
glob: "*.txt"
|
||||
|
||||
- name: megalinter
|
||||
run: docker run --rm -e USER=$(id -u) -e GROUP=$(id -g) -v "$PWD:/tmp/lint" oxsecurity/megalinter:v8
|
||||
stage_fixed: true
|
||||
Reference in New Issue
Block a user