Skip to content

Commit 18df538

Browse files
author
Mateus Oliveira
authored
🌱 Enable govet settings and fix issue found (#4465)
Fix linter error `nilness: impossible condition: nil != nil (govet)` ``` golangci-lint run pkg/plugins/golang/v4/scaffolds/edit.go:60:9: nilness: impossible condition: nil != nil (govet) if err != nil && s.multigroup != s.config.IsMultiGroup() { ^ make: *** [lint] Error 1 ``` Signed-off-by: Mateus Oliveira <[email protected]>
1 parent f051464 commit 18df538

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.golangci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ issues:
1717
- gosec
1818

1919
linters-settings:
20+
govet:
21+
enable-all: true
22+
disable:
23+
- fieldalignment
24+
- shadow
2025
revive:
2126
rules:
2227
# The following rules are recommended https://github.com/mgechev/revive#recommended-configuration

pkg/plugins/golang/v4/scaffolds/edit.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,6 @@ func (s *editScaffolder) Scaffold() error {
5656
}
5757
str := string(bs)
5858

59-
// Ignore the error encountered, if the file is already in desired format.
60-
if err != nil && s.multigroup != s.config.IsMultiGroup() {
61-
return err
62-
}
63-
6459
if s.multigroup {
6560
_ = s.config.SetMultiGroup()
6661
} else {

0 commit comments

Comments
 (0)