File tree 2 files changed +32
-0
lines changed 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ if ! [ -x " $( command -v rg) " ]; then
4
+ GREP=" grep -R"
5
+ else
6
+ GREP=" rg -j 1 --no-heading -N"
7
+ fi
8
+
9
+ INPUT=" $@ "
10
+
11
+ INPUT_EX_THIS_FILE=${INPUT[@]/ " .github/check_taboos.sh" }
12
+
13
+ UNIT_CONSTANT_EXCUDE_FILE=" core/include/traccc/definitions/common.hpp"
14
+ INPUT_EX_UNIT_CONSTANT=${INPUT_EX_THIS_FILE[@]/ $UNIT_CONSTANT_EXCUDE_FILE }
15
+
16
+ ${GREP} " detray::unit" ${INPUT_EX_UNIT_CONSTANT[@]} ; test $? -eq 1 || exit 1
17
+ ${GREP} " detray::constant" ${INPUT_EX_UNIT_CONSTANT[@]} ; test $? -eq 1 || exit 1
18
+
19
+ TRACK_PARAMS_EXCLUDE_FILE=" core/include/traccc/edm/track_parameters.hpp"
20
+ INPUT_EX_TRACK_PARAMS=${INPUT_EX_THIS_FILE[@]/ $TRACK_PARAMS_EXCLUDE_FILE }
21
+
22
+ ${GREP} " detray::free_track_parameters" ${INPUT_EX_TRACK_PARAMS[@]} ; test $? -eq 1 || exit 1
23
+ ${GREP} " detray::bound_track_parameters" ${INPUT_EX_TRACK_PARAMS[@]} ; test $? -eq 1 || exit 1
24
+ ${GREP} " detray::bound_vector" ${INPUT_EX_TRACK_PARAMS[@]} ; test $? -eq 1 || exit 1
25
+ ${GREP} " detray::bound_matrix" ${INPUT_EX_TRACK_PARAMS[@]} ; test $? -eq 1 || exit 1
Original file line number Diff line number Diff line change @@ -12,3 +12,10 @@ repos:
12
12
name : Check includes with quotes
13
13
language : system
14
14
entry : .github/check_quote_includes.sh
15
+
16
+ - repo : local
17
+ hooks :
18
+ - id : check_taboos
19
+ name : Check taboo code patterns
20
+ language : system
21
+ entry : .github/check_taboos.sh
You can’t perform that action at this time.
0 commit comments