diff --git a/scripts/lint/check_nomerge_comments.sh b/scripts/lint/check_nomerge_comments.sh new file mode 100755 index 0000000000..6737d62a20 --- /dev/null +++ b/scripts/lint/check_nomerge_comments.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +FAIL=0 + +if grep -n '\(#\|//\)\([[:space:]]*\)NOMERGE' $@; then + echo -e "NOMERGE comments found! Remove them before merging\n" + FAIL=1 +fi + +exit $FAIL diff --git a/scripts/lint/lint.sh b/scripts/lint/lint.sh index 4b65e4a895..578c63cd18 100755 --- a/scripts/lint/lint.sh +++ b/scripts/lint/lint.sh @@ -52,6 +52,7 @@ function run_tests() { run "check_added_large_files" python3 -m pre_commit_hooks.check_added_large_files --enforce-all $ALL_FILES --maxkb=120 run "check_shebang_scripts_are_executable" python3 -m pre_commit_hooks.check_shebang_scripts_are_executable $ALL_FILES run "check_shebang_format" $DIR/check_shebang_format.sh $ALL_FILES + run "check_nomerge_comments" $DIR/check_nomerge_comments.sh $ALL_FILES if [[ -z "$FAST" ]]; then run "mypy" mypy $PYTHON_FILES