Skip to content

Commit

Permalink
YETUS-1176. linecomments_end should always execute (#275)
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
  • Loading branch information
aw-was-here committed May 4, 2022
1 parent 81f581b commit 6339446
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions precommit/src/main/shell/core.d/linecomments.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ function bugsystem_linecomments_trigger
declare text
declare column

if [[ ! -f "${PATCH_DIR}/results-full.txt" ]]; then
return 0
if [[ -f "${PATCH_DIR}/results-full.txt" ]]; then
# sort the file such that all files and lines are now next to each other
sort -k1,1 -k2,2n -k3,3n -k4,4 "${PATCH_DIR}/results-full.txt" > "${PATCH_DIR}/linecomments-sorted.txt"
mv "${PATCH_DIR}/linecomments-sorted.txt" "${PATCH_DIR}/results-full.txt"
else
touch "${PATCH_DIR}/results-full.txt"
fi

# sort the file such that all files and lines are now next to each other
sort -k1,1 -k2,2n -k3,3n -k4,4 "${PATCH_DIR}/results-full.txt" > "${PATCH_DIR}/linecomments-sorted.txt"
mv "${PATCH_DIR}/linecomments-sorted.txt" "${PATCH_DIR}/results-full.txt"

while read -r line;do
fn=${line%%:*}
fn=${fn#./} # strip off any leading ./
Expand Down

0 comments on commit 6339446

Please sign in to comment.