Skip to content

Commit

Permalink
disable if else in gocritic lint
Browse files Browse the repository at this point in the history
  • Loading branch information
gabotechs committed Jan 31, 2024
1 parent 91e9e70 commit 2236d69
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ linters-settings:
check-all: true
goimports:
local-prefixes: dep-tree
gocritic:
disabled-checks:
- ifElseChain
revive:
confidence: 0.8

Expand Down
8 changes: 3 additions & 5 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,11 @@ func filesFromArgs(args []string) ([]string, error) {
abs, err := filepath.Abs(arg)
if err != nil {
errs = append(errs, err)
continue
}
if !utils.FileExists(abs) {
} else if !utils.FileExists(abs) {
errs = append(errs, fmt.Errorf("file %s does not exist", arg))
continue
} else {
result = append(result, abs)
}
result = append(result, abs)
}
if len(result) == 0 {
if len(errs) == 1 {
Expand Down
1 change: 0 additions & 1 deletion internal/js/workspaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ func (w *Workspaces) ResolveFromWorkspaces(unresolved string) (string, error) {
var pkgJson *packageJson
for {
entry, ok := w.ws[firstSlice]
//nolint:gocritic
if ok {
pkgJson = entry
break
Expand Down

0 comments on commit 2236d69

Please sign in to comment.