chore: fix lint

main
sudo pacman -Syu 2023-02-25 23:11:10 +07:00
parent 5916d0a0dd
commit 2c8523a857
2 changed files with 11 additions and 2 deletions

View File

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

View File

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