make the script give more useful feedback
This commit is contained in:
parent
b3d8fba198
commit
eea5f4c3ad
|
|
@ -1,5 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "$1" == "--help" ]; then
|
||||
echo 'Usage:'
|
||||
echo ' MAX_LINE_LENGTH=80' "$0" 'src/**/*.md'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$MAX_LINE_LENGTH" == "" ]; then
|
||||
echo '`MAX_LINE_LENGTH` environment variable not set. Try --help.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" == "" ]; then
|
||||
echo 'No files provided.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Checking line lengths in all source files <= $MAX_LINE_LENGTH chars..."
|
||||
|
||||
echo "Offending files and lines:"
|
||||
|
|
|
|||
Loading…
Reference in New Issue