Created
March 23, 2022 18:57
-
-
Save packrat386/fe58973f1be437fd7569454e50cf3663 to your computer and use it in GitHub Desktop.
jq program to filter out specs from `snyk code test`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.runs[0].results | | |
map( | |
select( | |
.locations[0].physicalLocation.artifactLocation.uri | | |
contains("spec") | | |
not | |
) | |
) | | |
map( | |
.locations[0].physicalLocation.artifactLocation.uri as $filename | | |
.locations[0].physicalLocation.region.startLine as $line | | |
.ruleId as $ruleid | | |
.level as $level | | |
.message.text as $message | | |
{ ruleid: $ruleid, level: $level, message: $message, filename: $filename, line: $line } | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment