Skip to content

Commit

Permalink
Fix/Update linter
Browse files Browse the repository at this point in the history
Signed-off-by: Ulysses Souza <[email protected]>
  • Loading branch information
ulyssessouza committed Nov 8, 2024
1 parent 9679621 commit 0a06205
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
8 changes: 3 additions & 5 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
run:
# Timeout for analysis, e.g. 30s, 5m.
# Default: 1m
timeout: 3m

timeout: 2m

# This file contains only configs which differ from defaults.
# All possible options can be found here https://github.com/golangci/golangci-lint/blob/master/.golangci.reference.yml
Expand Down Expand Up @@ -178,9 +177,8 @@ linters:
- durationcheck # checks for two durations multiplied together
- errname # checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error
- errorlint # finds code that will cause problems with the error wrapping scheme introduced in Go 1.13
- execinquery # checks query string in Query function which reads your Go src files and warning it finds
- exhaustive # checks exhaustiveness of enum switch statements
- exportloopref # checks for pointers to enclosing loop variables
- copyloopvar # checks for pointers to enclosing loop variables
- forbidigo # forbids identifiers
- funlen # tool for detection of long functions
- gocheckcompilerdirectives # validates go compiler directive comments (//go:)
Expand All @@ -192,7 +190,7 @@ linters:
- gocyclo # computes and checks the cyclomatic complexity of functions
- godot # checks if comments end in a period
- goimports # in addition to fixing imports, goimports also formats your code in the same style as gofmt
- gomnd # detects magic numbers
- mnd # detects magic numbers
- gomoddirectives # manages the use of 'replace', 'retract', and 'excludes' directives in go.mod
- gomodguard # allow and block lists linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations
- goprintffuncname # checks that printf-like functions are named with f at the end
Expand Down
1 change: 0 additions & 1 deletion dao/default_dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ func (d *DefaultDao) ImportMap(m map[string]string) {
defer d.Unlock()

for k, v := range m {
v := v
d.m[k] = &v
}
}
Expand Down
2 changes: 1 addition & 1 deletion envlang.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"io"
"os"

"github.com/antlr4-go/antlr/v4"
antlr "github.com/antlr4-go/antlr/v4"
"github.com/ulyssessouza/envlang/dao"
"github.com/ulyssessouza/envlang/gen/fileparser"
"github.com/ulyssessouza/envlang/handlers"
Expand Down
2 changes: 1 addition & 1 deletion handlers/valuehandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package handlers
import (
"strings"

"github.com/antlr4-go/antlr/v4"
antlr "github.com/antlr4-go/antlr/v4"
log "github.com/sirupsen/logrus"
"github.com/ulyssessouza/envlang/gen/valueparser"
)
Expand Down
2 changes: 1 addition & 1 deletion handlers/valuehandler_helper.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package handlers

import (
"github.com/antlr4-go/antlr/v4"
antlr "github.com/antlr4-go/antlr/v4"
log "github.com/sirupsen/logrus"
"github.com/ulyssessouza/envlang/dao"
"github.com/ulyssessouza/envlang/gen/valueparser"
Expand Down

0 comments on commit 0a06205

Please sign in to comment.