Skip to content

Commit

Permalink
chore: refactor linter settings and file structure
Browse files Browse the repository at this point in the history
- Remove `deadcode` linter and `structcheck` from `.golangci.yml`
- Add settings for `depguard` linter in `.golangci.yml`
- Rename `example/main.go` to `_example/main.go`

Signed-off-by: appleboy <[email protected]>
  • Loading branch information
appleboy committed Mar 24, 2024
1 parent 56c4a56 commit 8e1e61f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ linters:
fast: false
enable:
- bodyclose
- deadcode
- depguard
- dogsled
- dupl
Expand All @@ -29,15 +28,31 @@ linters:
- nolintlint
- rowserrcheck
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace
- gofumpt

linters-settings:
depguard:
rules:
Main:
files:
- $all
- "!$test"
allow:
- $gostd
- github.com/gin-gonic/gin
Test:
files:
- $test
allow:
- $gostd
- github.com/gin-gonic/gin
- github.com/stretchr/testify

run:
timeout: 3m
File renamed without changes.

0 comments on commit 8e1e61f

Please sign in to comment.