Skip to content

Commit a6b1320

Browse files
authored
Merge pull request #5 from ItisCaleb/pull
Fix pre-commit hook
2 parents e85ae38 + d13b3cc commit a6b1320

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

scripts/pre-commit.hook

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ for f in *.c; do
55
CPPCHECK_unmatched="$CPPCHECK_unmatched --suppress=unmatchedSuppression:$f"
66
done
77

8-
CPPCHECK_suppresses="\
8+
CPPCHECK_suppresses=" \
99
--suppress=missingIncludeSystem \
10-
--suppress=noValidConfiguration \
11-
--suppress=unusedFunction\
10+
--suppress=noValidConfiguration:fibdrv.c \
11+
--suppress=unusedFunction:fibdrv.c \
1212
"
1313
CPPCHECK_OPTS="-I. --enable=all --error-exitcode=1 --force $CPPCHECK_suppresses $CPPCHECK_unmatched ."
1414

@@ -90,12 +90,6 @@ if [ ! -z "${FILES[*]}" ]; then
9090
echo "${FILES[*]}"
9191
fi
9292

93-
$SHA1SUM -c scripts/checksums >/dev/null
94-
if [ $? -ne 0 ]; then
95-
echo "[!] You are not allowed to change the header file queue.h or list.h" >&2
96-
exit 1
97-
fi
98-
9993
# Prevent unsafe functions
10094
root=$(git rev-parse --show-toplevel)
10195
banned="([^f]gets\()|(sprintf\()|(strcpy\()"

0 commit comments

Comments
 (0)