Fix lint issues: stylecheck linter (#487)

Co-authored-by: Naveen <172697+naveensrinivasan@users.noreply.github.com>
This commit is contained in:
Chris McGehee 2021-05-22 10:45:32 -07:00 committed by GitHub
parent 35fece6491
commit 26d17907a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -49,7 +49,7 @@ linters:
- sqlclosecheck
- staticcheck
- structcheck
# - stylecheck
- stylecheck
- thelper
- tparallel
- typecheck

View File

@ -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)
}

View File

@ -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"`
}
}