Skip to content

Commit

Permalink
Consistent golangci linter
Browse files Browse the repository at this point in the history
* Fix existing code format issue
* Exclude generated code from linter
* Use full linter to be consistent in CI
  • Loading branch information
haoming29 committed Jan 31, 2024
1 parent bcdbe63 commit cf5def1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@

run:
# Pelican has gotten large enough that the GitHub Action sometimes
# times out on a cold cache
timeout: 3m
skip-files:
- param/parameters.go
- param/parameters_struct.go
- token_utils/token_scopes.go

linters:
enable:
- gofmt
- gofmt
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ repos:
- repo: https://github.com/golangci/golangci-lint
rev: v1.55.2
hooks:
- id: golangci-lint
- id: golangci-lint-full
2 changes: 1 addition & 1 deletion generate/scope_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func GenTokenScope() {
defer f.Close()

err = tokenTemplate.Execute(f, struct {
Scopes []ScopeName
Scopes []ScopeName
StorageScopes []ScopeName
}{
Scopes: scopes,
Expand Down

0 comments on commit cf5def1

Please sign in to comment.