From 16eb2933f045f9907c439dd51ec66cccb781a8b0 Mon Sep 17 00:00:00 2001 From: Manuel Vogel <8409778+mavogel@users.noreply.github.com> Date: Wed, 26 Mar 2025 16:53:40 +0100 Subject: [PATCH] fix: linter Signed-off-by: Manuel Vogel <8409778+mavogel@users.noreply.github.com> --- .golangci.yml | 4 +++- cmd/git-chglog/fs.go | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index f3500e03..bb470b01 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -88,7 +88,7 @@ linters: - misspell - nakedret - dupl - - depguard + #- depguard TODO fix later presets: - bugs @@ -106,6 +106,8 @@ issues: - dupl - gosec - unparam + - testifylint + - depguard # Independently from option `exclude` we use default exclude patterns, # it can be disabled by this option. To list all diff --git a/cmd/git-chglog/fs.go b/cmd/git-chglog/fs.go index 9b091d89..f2c547b8 100644 --- a/cmd/git-chglog/fs.go +++ b/cmd/git-chglog/fs.go @@ -34,6 +34,7 @@ func (*osFileSystem) Exists(path string) bool { func (*osFileSystem) MkdirP(path string) error { if _, err := os.Stat(path); os.IsNotExist(err) { + //nolint:gosec return os.MkdirAll(path, os.ModePerm) } return nil @@ -45,5 +46,6 @@ func (*osFileSystem) Create(name string) (File, error) { } func (*osFileSystem) WriteFile(path string, content []byte) error { + //nolint:gosec return os.WriteFile(path, content, os.ModePerm) }