Make travis/jenkins check for lint on files which are clean to start with

This commit is contained in:
Richard van der Hoff 2017-06-08 13:52:52 +01:00
parent ea02d8841c
commit 9bda212cb1
5 changed files with 225 additions and 3 deletions

View file

@ -0,0 +1,21 @@
#!/bin/sh
#
# generates .eslintignore.errorfiles to list the files which have errors in,
# so that they can be ignored in future automated linting.
out=.eslintignore.errorfiles
cd `dirname $0`/..
echo "generating $out"
{
cat <<EOF
# autogenerated file: run scripts/generate-eslint-error-ignore-file to update.
EOF
./node_modules/.bin/eslint --no-ignore -f json src test |
jq -r '.[] | select((.errorCount + .warningCount) > 0) | .filePath' |
sed -e 's/.*matrix-react-sdk\///';
} > "$out"

11
scripts/travis.sh Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
set -ex
npm run test
./.travis-test-riot.sh
# run the linter, but exclude any files known to have errors or warnings.
./node_modules/.bin/eslint --max-warnings 0 \
--ignore-path .eslintignore.errorfiles \
src test