Skip to content

Commit

Permalink
Update to linter 1.60.3 (#173)
Browse files Browse the repository at this point in the history
Signed-off-by: Faisal Memon <fymemon@yahoo.com>
  • Loading branch information
faisal-memon authored Aug 27, 2024
1 parent cef5075 commit 1c72433
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
15 changes: 9 additions & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,31 @@ run:
# timeout for analysis, e.g. 30s, 5m, default is 1m
deadline: 10m

skip-dirs:
issues:
exclude-dirs:
- testdata$
- test/mock

skip-files:
exclude-files:
- ".*\\.pb\\.go"

linters:
enable:
- bodyclose
- depguard
- dupword
- durationcheck
- errorlint
- gocritic
- gofmt
- goimports
- revive
- gosec
- misspell
- nakedret
- nilerr
- prealloc
- revive
- unconvert
- unparam
- whitespace
- gocritic

linters-settings:
revive:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ else
endif
go_path := PATH="$(go_bin_dir):$(PATH)"

golangci_lint_version = v1.52.2
golangci_lint_version = v1.60.3
golangci_lint_dir = $(build_dir)/golangci_lint/$(golangci_lint_version)
golangci_lint_bin = $(golangci_lint_dir)/golangci-lint
golangci_lint_cache = $(golangci_lint_dir)/cache
Expand Down
4 changes: 2 additions & 2 deletions pkg/disk/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func WriteJWTBundleSet(jwkSet *jwtbundle.Set, dir string, jwtBundleFilename stri
func WriteJWTSVID(jwtSVID *jwtsvid.SVID, dir, jwtSVIDFilename string) error {
filePath := path.Join(dir, jwtSVIDFilename)

return os.WriteFile(filePath, []byte(jwtSVID.Marshal()), os.ModePerm)
return os.WriteFile(filePath, []byte(jwtSVID.Marshal()), 0600)
}

func writeJSON(certs map[string]any, dir, filename string) error {
Expand All @@ -47,5 +47,5 @@ func writeJSON(certs map[string]any, dir, filename string) error {

filePath := path.Join(dir, filename)

return os.WriteFile(filePath, file, os.ModePerm)
return os.WriteFile(filePath, file, 0600)
}

0 comments on commit 1c72433

Please sign in to comment.