Make travis/jenkins check for lint on files which are clean to start with
This commit is contained in:
parent
ea02d8841c
commit
9bda212cb1
5 changed files with 225 additions and 3 deletions
21
scripts/generate-eslint-error-ignore-file
Executable file
21
scripts/generate-eslint-error-ignore-file
Executable 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
11
scripts/travis.sh
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue