Skip to content

Commit 3e5e2b5

Browse files
lint: catch NOMERGE comments (commaai#33820)
* nomerge * Update modeld.py
1 parent 371f604 commit 3e5e2b5

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
FAIL=0
4+
5+
if grep -n '\(#\|//\)\([[:space:]]*\)NOMERGE' $@; then
6+
echo -e "NOMERGE comments found! Remove them before merging\n"
7+
FAIL=1
8+
fi
9+
10+
exit $FAIL

scripts/lint/lint.sh

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ function run_tests() {
5252
run "check_added_large_files" python3 -m pre_commit_hooks.check_added_large_files --enforce-all $ALL_FILES --maxkb=120
5353
run "check_shebang_scripts_are_executable" python3 -m pre_commit_hooks.check_shebang_scripts_are_executable $ALL_FILES
5454
run "check_shebang_format" $DIR/check_shebang_format.sh $ALL_FILES
55+
run "check_nomerge_comments" $DIR/check_nomerge_comments.sh $ALL_FILES
5556
5657
if [[ -z "$FAST" ]]; then
5758
run "mypy" mypy $PYTHON_FILES

0 commit comments

Comments
 (0)