Skip to content
Permalink
Newer
Older
100755 20 lines (12 sloc) 466 Bytes
Dec 11, 2017
1
#!/bin/sh
2
3
set -e
4
5
ROOT="$(dirname "$0")"
6
PATH="$PATH:$HOME/.local/bin"
7
8
error () { echo "ERROR: $@" >&2; exit 1; }
9
10
cppcheck --enable=all --error-exitcode=1 \
11
--suppress=unusedFunction:"$ROOT/src/macros.h" "$ROOT"/src/*.[ch]
12
13
cpplint --counting=detailed --recursive "$ROOT"/src
14
15
grep -RF $'\t' "$ROOT"/src &&
16
error 'Tabs found. Use spaces.' || echo 'Whitespace OK'
17
18
grep -RP '[^[:cntrl:][:print:]]' "$ROOT"/src &&
19
error 'No emojis.' || echo 'Emojis OK'
You can’t perform that action at this time.