blob: d2ca408176bbbca6bcc81d228e886e216194c1ee (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/usr/bin/env bash
set -e # halt script on error
# Validate all files adhere to .editorconfig
# Exclude files which should not be checked against .editorconfig
# (eg. images, LICENSE, system-generated files, and library files)
mapfile -t editorconfigargs < <(
find . \
-type 'f' \
! -name '*.png' \
! -name '*.ico' \
! -name 'CNAME' \
! -name 'LICENSE' \
! -name 'Gemfile.lock' \
! -path './assets/*/libs/*' \
! -path './.bundle/*' \
! -path './.git/*' \
! -path './_site/*' \
! -path './vendor/*' \
)
npx @htmlacademy/editorconfig-cli "${editorconfigargs[@]}"
|