Skip to content

Commit

Permalink
JSON -> errorformat text -> dog
Browse files Browse the repository at this point in the history
Rather than magical text formatting.
  • Loading branch information
bcaller committed Feb 3, 2023
1 parent 5d29f33 commit e33b835
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions assets/reviewdog/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,9 @@ runner:
cmd: |
[ -f "$(find $SCRIPTPATH -type f -size +0 -name all_changed_files.txt)" ] &&\
cat $SCRIPTPATH/all_changed_files.txt | grep -q '\.rb$' &&\
brakeman --quiet --no-exit-on-warn --no-exit-on-error --force --format text --text-fields file,line,message,link \
| grep '^\(File\|Line\|Message\|Link\): ' -A1 \
| tr '\n' '\1' \
| sed -e 's/\x01\x01/\n/g' -e 's/\x01/~~~/g' -e 's/~~~Link:/<br><br>/g' \
brakeman --quiet --no-exit-on-warn --no-exit-on-error --force --format json \
| jq -r '.warnings[] | "\(.confidence[0:1]):\(.message)<br><br>Source: \(.link)"' \
| sed "s/$/<br><br>Cc @brave\/sec-team $ASSIGNEES/g" \
|| true
errorformat:
- "File: %f~~~Line: %l~~~Message: %m"
- "%t:%f:%l %m"

0 comments on commit e33b835

Please sign in to comment.