From 59af97a6a98f87545c35bc7c0c38ebd10fbbe105 Mon Sep 17 00:00:00 2001 From: Rumen Vasilev Date: Wed, 20 Sep 2023 13:23:15 +0200 Subject: [PATCH] fix linting errors --- internal/config/config.go | 9 +++++---- internal/core/signatures/signatures.go | 2 +- internal/pkg/scan/localpath/localpath-impl.go | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/internal/config/config.go b/internal/config/config.go index 8031a11..b7ac3fd 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -27,11 +27,12 @@ var defaultIgnoreExtensions = []string{"jpg", "jpeg", "png", "gif", "bmp", "tiff var defaultIgnorePaths = []string{"node_modules/", "vendor/bundle", "vendor/cache", "/proc/"} type Config struct { - Signatures Signatures `mapstructure:"signatures" yaml:"signatures"` Github Github `mapstructure:"github" yaml:"github"` - Gitlab `mapstructure:"gitlab" yaml:"gitlab"` - Global Global `mapstructure:"global" yaml:"global"` - Local Local `mapstructure:"local" yaml:"local"` + Local Local `mapstructure:"local" yaml:"local"` + Signatures Signatures `mapstructure:"signatures" yaml:"signatures"` + + Gitlab `mapstructure:"gitlab" yaml:"gitlab"` + Global Global `mapstructure:"global" yaml:"global"` } type Global struct { diff --git a/internal/core/signatures/signatures.go b/internal/core/signatures/signatures.go index 38e36ac..1effa03 100644 --- a/internal/core/signatures/signatures.go +++ b/internal/core/signatures/signatures.go @@ -231,8 +231,8 @@ func getPart(sigDef SignatureDef) string { } type DiscoverOutput struct { - Content string Sig Signature + Content string LineNum int } diff --git a/internal/pkg/scan/localpath/localpath-impl.go b/internal/pkg/scan/localpath/localpath-impl.go index 9990dac..056e305 100644 --- a/internal/pkg/scan/localpath/localpath-impl.go +++ b/internal/pkg/scan/localpath/localpath-impl.go @@ -86,7 +86,7 @@ func doFileScan(filename string, sess *core.Session) { } // Add a new finding and increment the total - fin.Initialize(sess.Config.Global.ScanType, "") + _ = fin.Initialize(sess.Config.Global.ScanType, "") sess.AddFinding(fin) // print the current finding to stdout