Skip to content

Commit

Permalink
feat: update to csdiff 3.3.0
Browse files Browse the repository at this point in the history
* csdiff: match findings by line content without spaces if available
* csgrep --hash-v1: match csdiff/v1 fingerprint prefix
* sarif: initial implementation of csdiff/v1 fingerprints
* sarif: add descriptions for ShellCheck rules

https://github.com/csutils/csdiff/releases/tag/csdiff-3.3.0
  • Loading branch information
jamacku committed May 13, 2024
1 parent 1c1e617 commit aba7ca1
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM fedora@sha256:4e007f288dce23966216be81ef62ba05d139b9338f327c1d1c73b7167dd47
ARG fedora="40"
ARG arch="x86_64"

ARG version_csdiff="3.2.2-1"
ARG version_csdiff="3.3.0-1"
ARG version_shellcheck="0.9.0-6"

ARG rpm_csdiff="csdiff-${version_csdiff}.fc${fedora}.${arch}.rpm"
Expand Down
2 changes: 1 addition & 1 deletion test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM fedora@sha256:4e007f288dce23966216be81ef62ba05d139b9338f327c1d1c73b7167dd47
ARG fedora="40"
ARG arch="x86_64"

ARG version_csdiff="3.2.2-1"
ARG version_csdiff="3.3.0-1"
ARG version_shellcheck="0.9.0-6"

ARG rpm_csdiff="csdiff-${version_csdiff}.fc${fedora}.${arch}.rpm"
Expand Down
27 changes: 24 additions & 3 deletions test/fixtures/generate_SARIF/test.sarif
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,15 @@
]
},
"name": "SC2034",
"shortDescription": {
"text": "SC2034"
},
"help": {
"text": "Defect reference: https://github.com/koalaman/shellcheck/wiki/SC2034",
"markdown": "Defect reference: [SC2034](https://github.com/koalaman/shellcheck/wiki/SC2034)"
},
"fullDescription": {
"text": "Defect reference: https://github.com/koalaman/shellcheck/wiki/SC2034"
}
},
{
Expand All @@ -39,9 +45,15 @@
]
},
"name": "SC2115",
"shortDescription": {
"text": "SC2115"
},
"help": {
"text": "Defect reference: https://github.com/koalaman/shellcheck/wiki/SC2115",
"markdown": "Defect reference: [SC2115](https://github.com/koalaman/shellcheck/wiki/SC2115)"
},
"fullDescription": {
"text": "Defect reference: https://github.com/koalaman/shellcheck/wiki/SC2115"
}
}
]
Expand Down Expand Up @@ -98,7 +110,10 @@
}
]
}
]
],
"fingerprints": {
"csdiff/v0": "64c37c2cd555f4d61c6e05ebd224beb8147d77bf"
}
},
{
"ruleId": "SHELLCHECK_WARNING: warning[SC2115]",
Expand Down Expand Up @@ -150,7 +165,10 @@
}
]
}
]
],
"fingerprints": {
"csdiff/v0": "d9a3f3f1027ba2a0ca5dc7eb24d7d8b09dbe2b1d"
}
},
{
"ruleId": "SHELLCHECK_WARNING: warning[SC2115]",
Expand Down Expand Up @@ -202,7 +220,10 @@
}
]
}
]
],
"fingerprints": {
"csdiff/v0": "d9a3f3f1027ba2a0ca5dc7eb24d7d8b09dbe2b1d"
}
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion test/show_versions.bats
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ setup () {
assert_success
assert_output \
"ShellCheck: 0.9.0
csutils: 3.2.2"
csutils: 3.3.0"
}

0 comments on commit aba7ca1

Please sign in to comment.