diff --git a/.travis.yml b/.travis.yml index d636072a..e93b2cfb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: go go: - - "1.10" + - "1.11" sudo: required @@ -16,6 +16,7 @@ install: - chmod +x $HOME/.local/bin/prototool script: +- diff -u <(echo -n) <(gofmt -l -s $(go list -f '{{.Dir}}') | grep -v '/vendor/') - prototool format -d api/v3/clairpb/clair.proto - prototool lint api/v3/clairpb/clair.proto - go test $(glide novendor | grep -v contrib) diff --git a/ext/featurens/driver_test.go b/ext/featurens/driver_test.go index 8493c0cc..0d46b0b6 100644 --- a/ext/featurens/driver_test.go +++ b/ext/featurens/driver_test.go @@ -45,8 +45,8 @@ func TestMultipleNamespaceDetector(t *testing.T) { testData := []MultipleNamespaceTestData{ { ExpectedNamespaces: []database.Namespace{ - database.Namespace{Name: "debian:8", VersionFormat: "dpkg"}, - database.Namespace{Name: "alpine:v3.3", VersionFormat: "dpkg"}, + {Name: "debian:8", VersionFormat: "dpkg"}, + {Name: "alpine:v3.3", VersionFormat: "dpkg"}, }, Files: tarutil.FilesMap{ "etc/os-release": []byte(` diff --git a/ext/vulnsrc/rhel/rhel.go b/ext/vulnsrc/rhel/rhel.go index f4cbce8f..cbba913a 100644 --- a/ext/vulnsrc/rhel/rhel.go +++ b/ext/vulnsrc/rhel/rhel.go @@ -372,7 +372,7 @@ func severity(def definition) database.Severity { case "Critical": return database.CriticalSeverity default: - log.Warning("could not determine vulnerability severity from: %s.", def.Title) + log.Warningf("could not determine vulnerability severity from: %s.", def.Title) return database.UnknownSeverity } } diff --git a/ext/vulnsrc/ubuntu/ubuntu.go b/ext/vulnsrc/ubuntu/ubuntu.go index 662c40ba..2f040c0b 100644 --- a/ext/vulnsrc/ubuntu/ubuntu.go +++ b/ext/vulnsrc/ubuntu/ubuntu.go @@ -416,7 +416,7 @@ func SeverityFromPriority(priority string) database.Severity { case "critical": return database.CriticalSeverity default: - log.Warning("could not determine a vulnerability severity from: %s", priority) + log.Warningf("could not determine a vulnerability severity from: %s", priority) return database.UnknownSeverity } } diff --git a/updater_test.go b/updater_test.go index bb2a8e60..c1a623d9 100644 --- a/updater_test.go +++ b/updater_test.go @@ -132,7 +132,7 @@ func newmockUpdaterDatastore() *mockUpdaterDatastore { vuln, ok := session.copy.vulnerabilities[id] r = append(r, database.NullableVulnerability{ VulnerabilityWithAffected: vuln, - Valid: ok, + Valid: ok, }) } return r, nil