This is an automated email from the ASF dual-hosted git repository.
aw pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/yetus.git
The following commit(s) were added to refs/heads/main by this push:
new 71b107c YETUS-1058. Strip leading ./ from linecomments (#203)
71b107c is described below
commit 71b107cc3463d574eb817855f1e3c9f29c4c325e
Author: Allen Wittenauer <[email protected]>
AuthorDate: Wed Nov 18 20:38:57 2020 -0800
YETUS-1058. Strip leading ./ from linecomments (#203)
---
precommit/src/main/shell/core.d/linecomments.sh | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/precommit/src/main/shell/core.d/linecomments.sh
b/precommit/src/main/shell/core.d/linecomments.sh
index 4ccd5e0..a8fdfc4 100755
--- a/precommit/src/main/shell/core.d/linecomments.sh
+++ b/precommit/src/main/shell/core.d/linecomments.sh
@@ -63,10 +63,7 @@ function bugsystem_linecomments_queue
fi
rol=${line/#${file}:}
- if [[ "${file}" =~ ^\./ ]]; then
- file=${file:2}
- fi
-
+ file=${file#./}
linenum=${rol%%:*}
rol=${rol/#${linenum}:}
columncheck=${rol%%:*}
@@ -109,6 +106,7 @@ function bugsystem_linecomments_trigger
while read -r line;do
fn=${line%%:*}
+ fn=${fn#./} # strip off any leading ./
rol=${line/#${fn}:}
linenum=${rol%%:*}
rol=${rol/#${linenum}:}
@@ -129,4 +127,4 @@ function bugsystem_linecomments_trigger
"${bugs}_linecomments_end"
fi
done
-}
\ No newline at end of file
+}