mirror of
https://github.com/ivuorinen/go-test-sarif.git
synced 2026-03-01 18:55:49 +00:00
feat: add golangci-lint and restore megalinter config (#22)
* feat: add golangci-lint and restore megalinter config * chore: fix linting, go mod tidy * fix(ci): add golangci-lint action setup to test.yml Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * chore: tweaks * fix(ci): tweaks * fix(ci): disable go_golangci_lint in megalinter * chore: yamllint rules * chore(ci): tweak yml --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
@@ -24,7 +24,11 @@ func ConvertToSARIF(inputFile, outputFile string) error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to read input file: %w", err)
|
||||
}
|
||||
defer f.Close()
|
||||
defer func() {
|
||||
if cerr := f.Close(); cerr != nil {
|
||||
fmt.Fprintf(os.Stderr, "failed to close input file: %v\n", cerr)
|
||||
}
|
||||
}()
|
||||
|
||||
report, err := sarif.New(sarif.Version210)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user