diff --git a/.golangci.yml b/.golangci.yml index 04cda8c..4e03a03 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -19,12 +19,15 @@ linters: - errcheck - gosimple - govet + - ineffassign - staticcheck - typecheck - unused + - errchkjson - errname - errorlint - execinquery + - gocritic - goerr113 - gofumpt - gosec @@ -38,7 +41,10 @@ linters: linters-settings: gosec: excludes: + - G101 + - G112 - G402 + - G404 - G501 - G505 exclude-generated: true @@ -63,3 +69,7 @@ linters-settings: - unusedresult staticcheck: checks: ["all", "-SA1019"] + gocritic: + enabled-tags: + - style + - performance diff --git a/internal/cli/action_run.go b/internal/cli/action_run.go index 1e3449e..56ade78 100644 --- a/internal/cli/action_run.go +++ b/internal/cli/action_run.go @@ -135,8 +135,7 @@ func (a *action) runGetImportedModules(c *cli.Context) (map[string]Module, error return mapImportedModules, nil } -// Return deps file content and useDepFile or not -func (a *action) runReadDepsFile(c *cli.Context) (string, bool, error) { +func (a *action) runReadDepsFile(c *cli.Context) (depsStr string, useDepFile bool, err error) { // Try to read from url first if a.flags.depsURL != "" { depsURL, err := url.Parse(a.flags.depsURL)