Enable and fix nolintlint,bodyclose,gosimple linters

Signed-off-by: Oleksandr Redko <Oleksandr_Redko@epam.com>
This commit is contained in:
Oleksandr Redko committed 2023-10-25 12:26:51 +03:00
1 parent 84bbfb068c
commit bf2c37f35c
6 files changed
+10 -10

No files matched your search

+3 -3
View File
@@ -32,7 +32,7 @@ linters:
# - prealloc
- typecheck
# - asciicheck
# - bodyclose
- bodyclose
# - dogsled
# - dupl
# - errcheck
@@ -58,14 +58,14 @@ linters:
# - gomodguard
# - goprintffuncname
# - gosec (gas)
# - gosimple (megacheck)
- gosimple
# - interfacer
# - lll
# - maligned
# - nestif
# - nlreturn
# - noctx
# - nolintlint
- nolintlint
# - rowserrcheck
# - scopelint
# - sqlclosecheck
+1 -1
View File
@@ -85,7 +85,7 @@ func editAction(cmd *cobra.Command, args []string) error {
logrus.Info("Aborting, as requested by saving the file with empty content")
return nil
}
if bytes.Compare(yBytes, yContent) == 0 {
if bytes.Equal(yBytes, yContent) {
logrus.Info("Aborting, no changes made to the instance")
return nil
}
+1 -1
View File
@@ -11,7 +11,7 @@ const UnixPathMax = 108
// Stat is a selection of syscall.Stat_t
type Stat struct {
Uid uint32 //nolint:revive
Gid uint32 //nolint:revive
Gid uint32
}
func SysStat(fi fs.FileInfo) (Stat, bool) {
+1 -1
View File
@@ -14,7 +14,7 @@ const UnixPathMax = 104
// Stat is a selection of syscall.Stat_t
type Stat struct {
Uid uint32 //nolint:revive
Gid uint32 //nolint:revive
Gid uint32
}
func SysStat(fi fs.FileInfo) (Stat, bool) {
+1 -1
View File
@@ -14,7 +14,7 @@ const UnixPathMax = 108
// Stat is a selection of syscall.Stat_t
type Stat struct {
Uid uint32 //nolint:revive
Gid uint32 //nolint:revive
Gid uint32
}
func SysStat(_ fs.FileInfo) (Stat, bool) {
+3 -3
View File
@@ -18,13 +18,13 @@ type User struct {
User string
Uid uint32 //nolint:revive
Group string
Gid uint32 //nolint:revive
Gid uint32
Home string
}
type Group struct {
Name string
Gid uint32 //nolint:revive
Gid uint32
}
var users map[string]User
@@ -77,7 +77,7 @@ func LookupGroup(name string) (Group, error) {
const (
fallbackUser = "lima"
fallbackUid = 1000 //nolint:revive
fallbackGid = 1000 //nolint:revive
fallbackGid = 1000
)
var cache struct {