diff options
author | Tulio Leao <tupaschoal@gmail.com> | 2020-04-09 16:26:26 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-09 16:26:26 -0300 |
commit | 3deec4cc48e3acac249db3d3c78c1d14af116c6a (patch) | |
tree | 57ff7c11ebcbdd356e7b81474358f978ea076b64 /script/check_files_formatting.sh | |
parent | a748cd395ef1a9cb089650260766c9cbfdb6797d (diff) |
Speed up Travis CI and improve error reports (#467)
Diffstat (limited to 'script/check_files_formatting.sh')
-rwxr-xr-x | script/check_files_formatting.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/script/check_files_formatting.sh b/script/check_files_formatting.sh new file mode 100755 index 00000000..11afd2c3 --- /dev/null +++ b/script/check_files_formatting.sh @@ -0,0 +1,20 @@ +#!/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 'LICENSE' \ + ! -name 'Gemfile.lock' \ + ! -path './assets/*/libs/*' \ + ! -path './.bundle/*' \ + ! -path './.git/*' \ + ! -path './_site/*' \ + ! -path './vendor/*' \ +) +npx @htmlacademy/editorconfig-cli "${editorconfigargs[@]}" |