Skip to content

Commit

Permalink
feat: embed code context into SARIF output
Browse files Browse the repository at this point in the history
This is preparation for Fingerprints that are coming in next version of csdiff.

csutils/csdiff#168

> It hashes the data that csdiff uses in its matching algorithm
> and the line content without spaces. For this fingerprint to
> be computed, the results need to include the line content for
> the key event in the format produced by `csgrep --embed-context`.
  • Loading branch information
jamacku committed May 3, 2024
1 parent d33b5fa commit ddda960
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ shellcheck_version=$(get_shellcheck_version)
# GitHub requires an absolute path, so let's remove the './' prefix from it.
csgrep \
--strip-path-prefix './' \
--embed-context 4 \
--mode=sarif \
--set-scan-prop='tool:ShellCheck' \
--set-scan-prop="tool-version:${shellcheck_version}" \
Expand Down

0 comments on commit ddda960

Please sign in to comment.