gin/.golangci.yml
Bo-Yi Wu 8ab47c694e
ci(lint): update tooling and workflows for consistency (#3834)
* chore: update tooling and workflows for consistency

- Update the version of a tool in the GitHub workflow from `v1.52.2` to `v1.55.2`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* chore: refactor linter configuration in CI

- Remove the `depguard` linter from the `.golangci.yml` configuration

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* ci: refine CI workflow and test configurations

- Disable caching in the GitHub Actions workflow for `gin.yml`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* refactor: refactor return logic in tree operations

- Modify multiple return statements in `tree.go` to return a specific value instead of nothing

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

---------

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-01 11:03:26 +08:00

58 lines
1016 B
YAML

run:
timeout: 5m
linters:
enable:
- asciicheck
- dogsled
- durationcheck
- errcheck
- errorlint
- exportloopref
- gci
- gofmt
- goimports
- gosec
- misspell
- nakedret
- nilerr
- nolintlint
- revive
- wastedassign
linters-settings:
gosec:
# To select a subset of rules to run.
# Available rules: https://github.com/securego/gosec#available-rules
# Default: [] - means include all rules
includes:
- G102
- G106
- G108
- G109
- G111
- G112
- G201
- G203
issues:
exclude-rules:
- linters:
- structcheck
- unused
text: "`data` is unused"
- linters:
- staticcheck
text: "SA1019:"
- linters:
- revive
text: "var-naming:"
- linters:
- revive
text: "exported:"
- path: _test\.go
linters:
- gosec # security is not make sense in tests
- linters:
- revive
path: _test\.go