mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
21 lines
374 B
Bash
Executable File
21 lines
374 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
mkdir -p tmp
|
|
|
|
npm run lint | tee tmp/lint-output
|
|
|
|
problems=`cat tmp/lint-output | grep -oE '[0-9]* problems' | grep -o "[0-9]*"`
|
|
ratchet="100"
|
|
|
|
echo "Problems found in current linting: $problems"
|
|
|
|
if [ "$problems" -gt "$ratchet" ]
|
|
then
|
|
echo "Linting issues above ratchet of $ratchet"
|
|
exit 1
|
|
else
|
|
echo "Linting issues below ratchet of $ratchet"
|
|
fi
|