Skip to content

Commit

Permalink
feat(ci): test 52 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Zygimantass committed Jan 16, 2025
1 parent 8a9f619 commit 5a3e640
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
17 changes: 17 additions & 0 deletions .github/52-problem-matcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"problemMatcher": [
{
"owner": "cosmos-52-ql",
"pattern": [
{
"regexp": ""\"(.+)\",\"(.+)\",\"(.+)\",\"(.+)\",\"(.+)\",\"(.+)\",\"(.+)\",\"(.+)\",\"(.+)\",
"file": 5,
"line": 6,
"column": 7,
"severity": 3,
"message": 2,
}
]
}
]
}
24 changes: 5 additions & 19 deletions .github/workflows/52.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,31 +42,17 @@ jobs:
codeql-db/go
${{ steps.codeql-init.outputs.codeql-path }} database analyze \
--format=sarif-latest \
--output=codeql-results.sarif \
--format=csv\
--output=codeql-results.csv \
codeql-db/go \
skip-mev/cosmos-52-ql
- name: Install jq
uses: dcarbone/[email protected]
- name: Add problem matcher
run: echo "::add-matcher::.github/52-problem-matcher.json"
- name: Annotate code with findings
working-directory: ./tests/simapp
run: |
set -eoux pipefail
cat codeql-results.sarif
issues=$(jq -r '
.runs[].results[] |
. as $r |
($r.locations[0].physicalLocation.artifactLocation.uri | select(. != null)) as $file |
($r.locations[0].physicalLocation.region.startLine | select(. != null)) as $line |
($r.message.text | gsub("[\r\n]"; " ")) as $msg |
[$file, $line, $msg] | @tsv
' codeql-results.sarif )
while IFS=$'\t' read -r file line msg; do
file="${file#file://}"
echo "::warning file=$file,line=$line::$msg"
done <<< "$issues"
cat codeql-results.csv

0 comments on commit 5a3e640

Please sign in to comment.