We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1da83f1 commit f177aebCopy full SHA for f177aeb
check-grammars-crates.sh
@@ -107,8 +107,11 @@ if [ "$(ls -A $COMPARE)" ]; then
107
for METRIC in "${METRICS[@]}"
108
do
109
110
- PREFIX_METRIC="\.$METRIC"
111
- FILES=`grep -r -l $PREFIX_METRIC $COMPARE | head -$MT_THRESHOLD`
+ # Find metrics as whole words
+ MATCH_PATTERN="\b\.$METRIC\b"
112
+ # Exclude these patterns for metrics
113
+ EXCLUDE_PATTERN="$METRIC("
114
+ FILES=`grep -r -L $EXCLUDE_PATTERN $COMPARE | xargs grep -l $MATCH_PATTERN 2>/dev/null | head -$MT_THRESHOLD`
115
if [ -n "$FILES" ]
116
then
117
mkdir -p $OUTPUT_DIR/$METRIC
0 commit comments