mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-02-02 18:28:41 +08:00
chore(golangci-lint): lint配置兼容性修复
This commit is contained in:
parent
f78f44e00f
commit
491e6cef09
@ -13,14 +13,15 @@ run:
|
|||||||
# Include test files or not.
|
# Include test files or not.
|
||||||
# Default: true
|
# Default: true
|
||||||
tests: false
|
tests: false
|
||||||
|
go: "1.20"
|
||||||
|
|
||||||
# Which dirs to skip: issues from them won't be reported.
|
# Which dirs to skip: issues from them won't be reported.
|
||||||
# Can use regexp here: `generated.*`, regexp is applied on full path.
|
# Can use regexp here: `generated.*`, regexp is applied on full path.
|
||||||
# Default value is empty list,
|
# Default value is empty list,
|
||||||
# but default dirs are skipped independently of this option's value (see skip-dirs-use-default).
|
# but default dirs are skipped independently of this option's value (see skip-dirs-use-default).
|
||||||
# "/" will be replaced by current OS file path separator to properly work on Windows.
|
# "/" will be replaced by current OS file path separator to properly work on Windows.
|
||||||
skip-dirs:
|
# skip-dirs:
|
||||||
- internal/library/hggen/internal
|
# - internal/library/hggen/internal
|
||||||
|
|
||||||
# Which files to skip: they will be analyzed, but issues from them won't be reported.
|
# Which files to skip: they will be analyzed, but issues from them won't be reported.
|
||||||
# Default value is empty list,
|
# Default value is empty list,
|
||||||
@ -28,7 +29,7 @@ run:
|
|||||||
# we confidently recognize autogenerated files.
|
# we confidently recognize autogenerated files.
|
||||||
# If it's not please let us know.
|
# If it's not please let us know.
|
||||||
# "/" will be replaced by current OS file path separator to properly work on Windows.
|
# "/" will be replaced by current OS file path separator to properly work on Windows.
|
||||||
skip-files: []
|
# skip-files: []
|
||||||
|
|
||||||
|
|
||||||
# Main linters configurations.
|
# Main linters configurations.
|
||||||
@ -71,7 +72,10 @@ issues:
|
|||||||
- linters:
|
- linters:
|
||||||
- gocritic
|
- gocritic
|
||||||
text: "unnecessaryDefer:"
|
text: "unnecessaryDefer:"
|
||||||
|
exclude-dirs:
|
||||||
|
- internal/library/hggen/internal
|
||||||
|
exclude-files: []
|
||||||
|
|
||||||
|
|
||||||
# https://golangci-lint.run/usage/linters
|
# https://golangci-lint.run/usage/linters
|
||||||
linters-settings:
|
linters-settings:
|
||||||
@ -176,7 +180,7 @@ linters-settings:
|
|||||||
# Select the Go version to target.
|
# Select the Go version to target.
|
||||||
# Default: 1.13
|
# Default: 1.13
|
||||||
# Deprecated: use the global `run.go` instead.
|
# Deprecated: use the global `run.go` instead.
|
||||||
go: "1.15"
|
# go: "1.15"
|
||||||
# Sxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
|
# Sxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
|
||||||
# Default: ["*"]
|
# Default: ["*"]
|
||||||
checks: [
|
checks: [
|
||||||
@ -187,7 +191,9 @@ linters-settings:
|
|||||||
govet:
|
govet:
|
||||||
# Report about shadowed variables.
|
# Report about shadowed variables.
|
||||||
# Default: false
|
# Default: false
|
||||||
check-shadowing: true
|
# check-shadowing: true
|
||||||
|
enable:
|
||||||
|
- shadow
|
||||||
# Settings per analyzer.
|
# Settings per analyzer.
|
||||||
settings:
|
settings:
|
||||||
# Analyzer name, run `go tool vet help` to see all analyzers.
|
# Analyzer name, run `go tool vet help` to see all analyzers.
|
||||||
@ -263,7 +269,7 @@ linters-settings:
|
|||||||
# Select the Go version to target.
|
# Select the Go version to target.
|
||||||
# Default: "1.13"
|
# Default: "1.13"
|
||||||
# Deprecated: use the global `run.go` instead.
|
# Deprecated: use the global `run.go` instead.
|
||||||
go: "1.15"
|
# go: "1.15"
|
||||||
# SAxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
|
# SAxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
|
||||||
# Default: ["*"]
|
# Default: ["*"]
|
||||||
checks: [ "all","-SA1019","-SA4015","-SA1029","-SA1016","-SA9003","-SA4006","-SA6003" ]
|
checks: [ "all","-SA1019","-SA4015","-SA1029","-SA1016","-SA9003","-SA4006","-SA6003" ]
|
||||||
|
Loading…
Reference in New Issue
Block a user