diff --git a/.golangci.yml b/.golangci.yml index c650e7f5..d356b584 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -49,7 +49,7 @@ linters: - sqlclosecheck - staticcheck - structcheck - # - stylecheck + - stylecheck - thelper - tparallel - typecheck diff --git a/checks/checkforcontent.go b/checks/checkforcontent.go index 0f96d929..c14145dc 100644 --- a/checks/checkforcontent.go +++ b/checks/checkforcontent.go @@ -82,7 +82,7 @@ func ExtractFullpath(fn string) (string, bool) { // Using the http.get instead of the lib httpClient because // the default checker.HTTPClient caches everything in the memory and it causes oom. -func getHttpResponse(url string) (*http.Response, error) { +func getHTTPResponse(url string) (*http.Response, error) { //https://securego.io/docs/rules/g107.html //nolint resp, err := http.Get(url) @@ -122,7 +122,7 @@ func CheckFilesContent(checkName, shellPathFnPattern string, url = strings.Replace(url, "{archive_format}", "tarball/", 1) url = strings.Replace(url, "{/ref}", r.GetDefaultBranch(), 1) - resp, err := getHttpResponse(url) + resp, err := getHTTPResponse(url) if err != nil { return checker.MakeRetryResult(checkName, err) } diff --git a/checks/frozen_deps.go b/checks/frozen_deps.go index 4e0530eb..c533c07e 100644 --- a/checks/frozen_deps.go +++ b/checks/frozen_deps.go @@ -153,7 +153,7 @@ func validateGitHubActionWorkflow(path string, content []byte, logf func(s strin Name string `yaml:"name"` Steps []struct { Name string `yaml:"name"` - Id string `yaml:"id"` + ID string `yaml:"id"` Uses string `yaml:"uses"` } }