Skip to content

Commit

Permalink
Update linter config
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Schoknecht committed Dec 15, 2024
1 parent b48cb69 commit b5d0994
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
go-version: '1.23'

- name: Build
run: go build -v ./...
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.23'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
# Require: The version of golangci-lint to use.
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
version: v1.56
version: v1.61

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down
12 changes: 2 additions & 10 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,30 +65,22 @@ linters:
- funlen
- cyclop
- gofumpt
- deadcode
- interfacer
- maligned
- nosnakecase
- scopelint
- structcheck
- varcheck
- wrapcheck
- stylecheck
- testableexamples
- ifshort
- errcheck
- nestif
- exhaustivestruct
- govet
- musttag
- nilnil
- gomnd
- gocritic # suggests some changes that are not necessarily better
- gocognit
- dupl
- golint
- ireturn
- unused
- exportloopref
- execinquery

issues:
max-ame-issues: 50
Expand Down
2 changes: 1 addition & 1 deletion generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func generateCmd(_ *cobra.Command, _ []string) error {
func generatePassword(baseBytes string, length int) (string, error) {
var password string

for i := 0; i < length; i++ {
for range length {
val, err := rand.Int(rand.Reader, big.NewInt(int64(len(baseBytes))))
if err != nil {
return "", err
Expand Down

0 comments on commit b5d0994

Please sign in to comment.