Skip to content

Commit bcd61fe

Browse files
committed
Exclude test directory from style checks in preparedGrep
1 parent cb62352 commit bcd61fe

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/check_style.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fi
3737

3838
function preparedGrep
3939
{
40-
git grep -nIE "$1" -- '*.h' '*.cpp' | grep -v "${EXCLUDE_FILES_JOINED}"
40+
git grep -nIE "$1" -- '*.h' '*.cpp' ':!test/' | grep -v "${EXCLUDE_FILES_JOINED}"
4141
return $?
4242
}
4343

@@ -60,7 +60,7 @@ FORMATERROR=$(
6060
preparedGrep "[a-zA-Z0-9_][[:space:]]*[*][a-zA-Z_]" | grep -E -v -e "return [*]" -e ":[0-9]+:[[:space:]]*\*[[:space:]]" -e "//" | addPrefix "Pointer star should be left-aligned"
6161
preparedGrep "move\(.+\)" | grep -v "std::move" | grep -E "[^a-z]move" | addPrefix "Use std::move"
6262
preparedGrep "forward\(.+\)" | grep -v "std::forward" | grep -E "[^a-z]forward" | addPrefix "Use std::forward"
63-
) | grep -E -v -e "^\[[^]]*\] [a-zA-Z./]*:[0-9]*:[[:space:]]*/[/*]" -e "^\[[^]]*\] test/" || true
63+
) | grep -E -v -e "^\[[^]]*\] [a-zA-Z./]*:[0-9]*:[[:space:]]*/[/*]" || true
6464
)
6565

6666
# Special error handling for `using namespace std;` exclusion, since said statement can be present in the test directory

0 commit comments

Comments
 (0)