Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev: clean deprecated options #4673

Merged
merged 4 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 1 addition & 34 deletions .golangci.next.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -279,23 +279,11 @@ linters-settings:
# Default: false
check-blank: true

# DEPRECATED comma-separated list of pairs of the form pkg:regex
#
# the regex is used to ignore names within pkg. (default "fmt:.*").
# see https://github.com/kisielk/errcheck#the-deprecated-method for details
ignore: fmt:.*,io/ioutil:^Read.*

# To disable the errcheck built-in exclude list.
# See `-excludeonly` option in https://github.com/kisielk/errcheck#excluding-functions for details.
# Default: false
disable-default-exclusions: true

# DEPRECATED use exclude-functions instead.
#
# Path to a file containing a list of functions to exclude from checking.
# See https://github.com/kisielk/errcheck#excluding-functions for details.
exclude: /path/to/file.txt

# List of functions to exclude from checking, where each entry is a single function to exclude.
# See https://github.com/kisielk/errcheck#excluding-functions for details.
exclude-functions:
Expand Down Expand Up @@ -431,9 +419,6 @@ linters-settings:
ignore-comments: true

gci:
# DEPRECATED: use `sections` and `prefix(github.com/org/project)` instead.
local-prefixes: github.com/org/project

# Section configuration to compare against.
# Section names are case-insensitive and may contain parameters in ().
# The default order of sections is `standard > default > custom > blank > dot > alias > localmodule`,
Expand Down Expand Up @@ -637,17 +622,14 @@ linters-settings:
# The option is passed to the ruleguard 'debug-group' argument.
# Default: ""
debug: 'emptyDecl'
# Deprecated, use 'failOn' param.
# If set to true, identical to failOn='all', otherwise failOn=''
failOnError: false
ldez marked this conversation as resolved.
Show resolved Hide resolved
# Determines the behavior when an error occurs while parsing ruleguard files.
# If flag is not set, log error and skip rule files that contain an error.
# If flag is set, the value must be a comma-separated list of error conditions.
# - 'all': fail on all errors.
# - 'import': ruleguard rule imports a package that cannot be found.
# - 'dsl': gorule file does not comply with the ruleguard DSL.
# Default: ""
failOn: dsl
failOn: dsl,import
# Comma-separated list of file paths containing ruleguard rules.
# If a path is relative, it is relative to the directory where the golangci-lint command is executed.
# The special '${configDir}' variable is substituted with the absolute directory containing the golangci config file.
Expand Down Expand Up @@ -724,9 +706,6 @@ linters-settings:
replacement: 'a[b:]'

gofumpt:
# Deprecated: use the global `run.go` instead.
lang-version: "1.17"

# Module path which contains the source code being formatted.
# Default: ""
module-path: github.com/org/project
Expand Down Expand Up @@ -830,8 +809,6 @@ linters-settings:
local_replace_directives: false

gosimple:
# Deprecated: use the global `run.go` instead.
go: "1.15"
# Sxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
# Default: ["*"]
checks: [ "all" ]
Expand Down Expand Up @@ -2059,15 +2036,11 @@ linters-settings:
extra-start-span-signatures:
- "github.com/user/repo/telemetry/trace.Start:opentelemetry"
staticcheck:
# Deprecated: use the global `run.go` instead.
go: "1.15"
# SAxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
# Default: ["*"]
checks: [ "all" ]

stylecheck:
# Deprecated: use the global `run.go` instead.
go: "1.15"
# STxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
# Default: ["*"]
checks: [ "all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022" ]
Expand Down Expand Up @@ -2291,9 +2264,6 @@ linters-settings:
# Suggest the use of rpc.DefaultXXPath.
# Default: false
default-rpc-path: true
# DEPRECATED Suggest the use of os.DevNull.
# Default: false
os-dev-null: true
# Suggest the use of sql.LevelXX.String().
# Default: false
sql-isolation-level: true
Expand All @@ -2303,9 +2273,6 @@ linters-settings:
# Suggest the use of constant.Kind.String().
# Default: false
constant-kind: true
# DEPRECATED Suggest the use of syslog.Priority.
# Default: false
syslog-priority: true

unconvert:
# Remove conversions that force intermediate rounding.
Expand Down
198 changes: 151 additions & 47 deletions jsonschema/golangci.next.jsonschema.json
Original file line number Diff line number Diff line change
Expand Up @@ -749,16 +749,6 @@
"type": "boolean",
"default": false
},
"ignore": {
"description": "DEPRECATED: use `exclude-functions` instead. Comma-separated list of pairs of the form \"pkg:regex\".",
"type": "string",
"default": "fmt:.*"
},
"exclude": {
"description": "DEPRECATED: use `exclude-functions` instead. Path to a file containing a list of functions to exclude from checking.",
"type": "string",
"examples": ["/path/to/file.txt"]
},
"exclude-functions": {
"description": "List of functions to exclude from checking, where each entry is a single function to exclude",
"type": "array",
Expand Down Expand Up @@ -961,11 +951,6 @@
"type": "object",
"additionalProperties": false,
"properties": {
"local-prefixes": {
"description": "DEPRECATED: use 'sections' and 'prefix(github.com/org/project)' instead.",
"type": "string",
"examples": ["github.com/org/project"]
},
"sections": {
"description": "Section configuration to compare against.",
"type": "array",
Expand Down Expand Up @@ -1158,8 +1143,157 @@
"settings": {
"description": "Settings passed to gocritic. Properties must be valid and enabled check names.",
"type": "object",
"propertyNames": {
"$ref": "#/definitions/gocritic-checks"
"additionalProperties": false,
"properties": {
"captLocal": {
"type": "object",
"additionalProperties": false,
"properties": {
"paramsOnly" : {
"type": "boolean",
"default": true
}
}
},
"commentedOutCode": {
"type": "object",
"additionalProperties": false,
"properties": {
"minLength" : {
"type": "number",
"default": 15
}
}
},
"elseif": {
"type": "object",
"additionalProperties": false,
"properties": {
"skipBalanced" : {
"type": "boolean",
"default": true
}
}
},
"hugeParam": {
"type": "object",
"additionalProperties": false,
"properties": {
"sizeThreshold" : {
"type": "number",
"default": 80
}
}
},
"ifElseChain": {
"type": "object",
"additionalProperties": false,
"properties": {
"minThreshold" : {
"type": "number",
"default": 2
}
}
},
"nestingReduce": {
"type": "object",
"additionalProperties": false,
"properties": {
"bodyWidth" : {
"type": "number",
"default": 5
}
}
},
"rangeExprCopy": {
"type": "object",
"additionalProperties": false,
"properties": {
"sizeThreshold" : {
"type": "number",
"default": 512
},
"skipTestFuncs" : {
"type": "boolean",
"default": true
}
}
},
"rangeValCopy": {
"type": "object",
"additionalProperties": false,
"properties": {
"sizeThreshold" : {
"type": "number",
"default": 128
},
"skipTestFuncs" : {
"type": "boolean",
"default": true
}
}
},
"ruleguard": {
"type": "object",
"additionalProperties": false,
"properties": {
"debug" : {
"type": "string"
},
"enable" : {
"type": "string"
},
"disable" : {
"type": "string"
},
"failOn" : {
"type": "string"
},
"rules" : {
"type": "string"
}
}
},
"tooManyResultsChecker": {
"type": "object",
"additionalProperties": false,
"properties": {
"maxResults" : {
"type": "number",
"default": 5
}
}
},
"truncateCmp": {
"type": "object",
"additionalProperties": false,
"properties": {
"skipArchDependent" : {
"type": "boolean",
"default": true
}
}
},
"underef": {
"type": "object",
"additionalProperties": false,
"properties": {
"skipRecvDeref" : {
"type": "boolean",
"default": true
}
}
},
"unnamedResult": {
"type": "object",
"additionalProperties": false,
"properties": {
"checkExported" : {
"type": "boolean",
"default": false
}
}
}
}
},
"disable-all": {
Expand Down Expand Up @@ -1276,11 +1410,6 @@
"type": "boolean",
"default": false
},
"lang-version": {
"description": "Select the Go version to target.",
"type": "string",
"default": "1.15"
},
"module-path": {
"description": " Module path which contains the source code being formatted.",
"type": "string"
Expand Down Expand Up @@ -1480,11 +1609,6 @@
"type": "object",
"additionalProperties": false,
"properties": {
"go": {
"description": "Targeted Go version",
"type": "string",
"default": "1.13"
},
"checks": {
"type": "array",
"items": {
Expand Down Expand Up @@ -2351,11 +2475,6 @@
"type": "object",
"additionalProperties": false,
"properties": {
"go": {
"description": "Targeted Go version",
"type": "string",
"default": "1.13"
},
"checks": {
"type": "array",
"items": {
Expand All @@ -2375,11 +2494,6 @@
"type": "object",
"additionalProperties": false,
"properties": {
"go": {
"description": "Targeted Go version",
"type": "string",
"default": "1.13"
},
"checks": {
"type": "array",
"items": {
Expand Down Expand Up @@ -2877,11 +2991,6 @@
"type": "boolean",
"default": false
},
"os-dev-null": {
"description": "Suggest the use of os.DevNull.",
"type": "boolean",
"default": false
},
"sql-isolation-level": {
"description": "Suggest the use of sql.LevelXX.String().",
"type": "boolean",
Expand All @@ -2896,11 +3005,6 @@
"description": "Suggest the use of constant.Kind.String().",
"type": "boolean",
"default": false
},
"syslog-priority": {
"description": "Suggest the use of syslog.Priority.",
"type": "boolean",
"default": false
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/config/linters_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -909,11 +909,11 @@ type UseStdlibVarsSettings struct {
TimeLayout bool `mapstructure:"time-layout"`
CryptoHash bool `mapstructure:"crypto-hash"`
DefaultRPCPath bool `mapstructure:"default-rpc-path"`
OSDevNull bool `mapstructure:"os-dev-null"`
OSDevNull bool `mapstructure:"os-dev-null"` // Deprecated
ldez marked this conversation as resolved.
Show resolved Hide resolved
SQLIsolationLevel bool `mapstructure:"sql-isolation-level"`
TLSSignatureScheme bool `mapstructure:"tls-signature-scheme"`
ConstantKind bool `mapstructure:"constant-kind"`
SyslogPriority bool `mapstructure:"syslog-priority"`
SyslogPriority bool `mapstructure:"syslog-priority"` // Deprecated
}

type UnconvertSettings struct {
Expand Down
Loading
Loading