Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ linters-settings:
disabled: false
- name: redefines-builtin-id
disabled: false
# todo: enable once we've upgraded to v2, as the validation schema
# used by the github v1 action does not have this rule yet
# - name: redundant-test-main-exit
# disabled: false
- name: superfluous-else
disabled: false
- name: time-naming
Expand Down
5 changes: 1 addition & 4 deletions cmd/osv-scanner/fix/testmain_test.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package fix

import (
"os"
"testing"

"github.com/google/osv-scanner/v2/internal/testutility"
)

func TestMain(m *testing.M) {
code := m.Run()
m.Run()

testutility.CleanSnapshots(m)

os.Exit(code)
}
5 changes: 1 addition & 4 deletions cmd/osv-scanner/internal/cmd/testmain_test.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package cmd

import (
"os"
"testing"

"github.com/google/osv-scanner/v2/internal/testutility"
)

func TestMain(m *testing.M) {
code := m.Run()
m.Run()

testutility.CleanSnapshots(m)

os.Exit(code)
}
5 changes: 1 addition & 4 deletions cmd/osv-scanner/scan/image/testmain_test.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package image_test

import (
"os"
"testing"

"github.com/google/osv-scanner/v2/internal/testutility"
)

func TestMain(m *testing.M) {
code := m.Run()
m.Run()

testutility.CleanSnapshots(m)

os.Exit(code)
}
5 changes: 1 addition & 4 deletions cmd/osv-scanner/scan/testmain_test.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package scan_test

import (
"os"
"testing"

"github.com/google/osv-scanner/v2/internal/testutility"
)

func TestMain(m *testing.M) {
code := m.Run()
m.Run()

testutility.CleanSnapshots(m)

os.Exit(code)
}
3 changes: 1 addition & 2 deletions cmd/osv-scanner/testmain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ func TestMain(m *testing.M) {
if err != nil {
panic(err)
}
code := m.Run()
m.Run()

testutility.CleanSnapshots(m)

os.RemoveAll("./fixtures/.git")
os.Exit(code)
}
5 changes: 1 addition & 4 deletions cmd/osv-scanner/update/testmain_test.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package update_test

import (
"os"
"testing"

"github.com/google/osv-scanner/v2/internal/testutility"
)

func TestMain(m *testing.M) {
code := m.Run()
m.Run()

testutility.CleanSnapshots(m)

os.Exit(code)
}
5 changes: 1 addition & 4 deletions internal/ci/testmain_test.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package ci_test

import (
"os"
"testing"

"github.com/google/osv-scanner/v2/internal/testutility"
)

func TestMain(m *testing.M) {
code := m.Run()
m.Run()

testutility.CleanSnapshots(m)

os.Exit(code)
}
5 changes: 1 addition & 4 deletions internal/datasource/testmain_test.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package datasource_test

import (
"os"
"testing"

"github.com/google/osv-scanner/v2/internal/testutility"
)

func TestMain(m *testing.M) {
code := m.Run()
m.Run()

testutility.CleanSnapshots(m)

os.Exit(code)
}
5 changes: 1 addition & 4 deletions internal/output/testmain_test.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package output_test

import (
"os"
"testing"

"github.com/google/osv-scanner/v2/internal/testutility"
)

func TestMain(m *testing.M) {
code := m.Run()
m.Run()

testutility.CleanSnapshots(m)

os.Exit(code)
}
5 changes: 1 addition & 4 deletions internal/remediation/testmain_test.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package remediation_test

import (
"os"
"testing"

"github.com/google/osv-scanner/v2/internal/testutility"
)

func TestMain(m *testing.M) {
code := m.Run()
m.Run()

testutility.CleanSnapshots(m)

os.Exit(code)
}
5 changes: 1 addition & 4 deletions internal/resolution/lockfile/testmain_test.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package lockfile_test

import (
"os"
"testing"

"github.com/google/osv-scanner/v2/internal/testutility"
)

func TestMain(m *testing.M) {
code := m.Run()
m.Run()

testutility.CleanSnapshots(m)

os.Exit(code)
}
5 changes: 1 addition & 4 deletions internal/resolution/manifest/testmain_test.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package manifest_test

import (
"os"
"testing"

"github.com/google/osv-scanner/v2/internal/testutility"
)

func TestMain(m *testing.M) {
code := m.Run()
m.Run()

testutility.CleanSnapshots(m)

os.Exit(code)
}
5 changes: 1 addition & 4 deletions internal/resolution/testmain_test.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package resolution_test

import (
"os"
"testing"

"github.com/google/osv-scanner/v2/internal/testutility"
)

func TestMain(m *testing.M) {
code := m.Run()
m.Run()

testutility.CleanSnapshots(m)

os.Exit(code)
}
5 changes: 1 addition & 4 deletions internal/sourceanalysis/testmain_test.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package sourceanalysis_test

import (
"os"
"testing"

"github.com/google/osv-scanner/v2/internal/testutility"
)

func TestMain(m *testing.M) {
code := m.Run()
m.Run()

testutility.CleanSnapshots(m)

os.Exit(code)
}
5 changes: 1 addition & 4 deletions pkg/models/testmain_test.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package models_test

import (
"os"
"testing"

"github.com/google/osv-scanner/v2/internal/testutility"
)

func TestMain(m *testing.M) {
code := m.Run()
m.Run()

testutility.CleanSnapshots(m)

os.Exit(code)
}
5 changes: 1 addition & 4 deletions pkg/osvscanner/testmain_test.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package osvscanner_test

import (
"os"
"testing"

"github.com/google/osv-scanner/v2/internal/testutility"
)

func TestMain(m *testing.M) {
code := m.Run()
m.Run()

testutility.CleanSnapshots(m)

os.Exit(code)
}