From 12561ba8f6e14bfbb3c609f405e146c885e8559d Mon Sep 17 00:00:00 2001 From: NathanJPhillips Date: Thu, 12 Jan 2017 10:44:18 +0000 Subject: [PATCH] Prevent recognising lines by prefix Add colon to end of pattern to prevent recognising lines that start with the number of a valid line --- scripts/run_lint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/run_lint.sh b/scripts/run_lint.sh index f2f1a41d811..0d20d091cc0 100755 --- a/scripts/run_lint.sh +++ b/scripts/run_lint.sh @@ -49,7 +49,7 @@ for file in $diff_files; do # Include line 0 errors (e.g. copyright) lint_grep_filter+=$file - lint_grep_filter+=":0" + lint_grep_filter+=":0:" # We first filter only the lines that start with a commit hash # Then we filter out the ones that come from the start commit @@ -66,7 +66,7 @@ for file in $diff_files; do # The format from the linting script is filepath:linenum: [error type] # So we build the first bit to filter out relevant lines - LINE_FILTER=$file:$LINENUM + LINE_FILTER=$file:$LINENUM: # Add the line filter on to the grep expression as we want # lines that match any of the line filters