Skip to content

Commit 6accfb8

Browse files
authored
fix(detector/vuls2): fix postConvert (#2205)
1 parent 203bc80 commit 6accfb8

File tree

6 files changed

+5378
-478
lines changed

6 files changed

+5378
-478
lines changed

.golangci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ linters:
1111
- revive
1212
- staticcheck
1313
settings:
14+
misspell: # https://golangci-lint.run/usage/linters/#misspell
15+
ignore-rules:
16+
- "Criterias"
1417
revive: # https://golangci-lint.run/usage/linters/#revive
1518
rules:
1619
- name: blank-imports

detector/vuls2/db_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package vuls2
1+
package vuls2_test
22

33
import (
44
"path/filepath"
@@ -11,6 +11,7 @@ import (
1111
"github.com/MaineK00n/vuls2/pkg/db/common"
1212
"github.com/MaineK00n/vuls2/pkg/db/common/types"
1313
"github.com/future-architect/vuls/config"
14+
"github.com/future-architect/vuls/detector/vuls2"
1415
)
1516

1617
func Test_shouldDownload(t *testing.T) {
@@ -108,7 +109,7 @@ func Test_shouldDownload(t *testing.T) {
108109
return
109110
}
110111
}
111-
got, err := shouldDownload(tt.args.vuls2Conf, tt.args.now)
112+
got, err := vuls2.ShouldDownload(tt.args.vuls2Conf, tt.args.now)
112113
if (err != nil) != tt.wantErr {
113114
t.Errorf("shouldDownload() error = %v, wantErr %v", err, tt.wantErr)
114115
return

detector/vuls2/export_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package vuls2
2+
3+
var (
4+
ShouldDownload = shouldDownload
5+
6+
PostConvert = postConvert
7+
)
8+
9+
type Source source

0 commit comments

Comments
 (0)