Skip to content

Commit a353a7a

Browse files
committed
chore: usestdlibvars options deprecation
1 parent c2371bf commit a353a7a

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

pkg/config/linters_settings.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -909,11 +909,11 @@ type UseStdlibVarsSettings struct {
909909
TimeLayout bool `mapstructure:"time-layout"`
910910
CryptoHash bool `mapstructure:"crypto-hash"`
911911
DefaultRPCPath bool `mapstructure:"default-rpc-path"`
912-
OSDevNull bool `mapstructure:"os-dev-null"`
912+
OSDevNull bool `mapstructure:"os-dev-null"` // Deprecated
913913
SQLIsolationLevel bool `mapstructure:"sql-isolation-level"`
914914
TLSSignatureScheme bool `mapstructure:"tls-signature-scheme"`
915915
ConstantKind bool `mapstructure:"constant-kind"`
916-
SyslogPriority bool `mapstructure:"syslog-priority"`
916+
SyslogPriority bool `mapstructure:"syslog-priority"` // Deprecated
917917
}
918918

919919
type UnconvertSettings struct {

pkg/config/loader.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,11 +411,21 @@ func (l *Loader) handleLinterOptionDeprecations() {
411411

412412
// Deprecated since v1.58.0
413413
if l.cfg.LintersSettings.SlogLint.ContextOnly {
414-
l.log.Warnf("The configuration option `linters.sloglint.context-only` is deprecated, please use `linters.sloglint.context`")
414+
l.log.Warnf("The configuration option `linters.sloglint.context-only` is deprecated, please use `linters.sloglint.context`.")
415415
if l.cfg.LintersSettings.SlogLint.Context == "" {
416416
l.cfg.LintersSettings.SlogLint.Context = "all"
417417
}
418418
}
419+
420+
// Deprecated since v1.51.0
421+
if l.cfg.LintersSettings.UseStdlibVars.OSDevNull {
422+
l.log.Warnf("The configuration option `linters.usestdlibvars.os-dev-null` is deprecated.")
423+
}
424+
425+
// Deprecated since v1.51.0
426+
if l.cfg.LintersSettings.UseStdlibVars.SyslogPriority {
427+
l.log.Warnf("The configuration option `linters.usestdlibvars.syslog-priority` is deprecated.")
428+
}
419429
}
420430

421431
func (l *Loader) handleEnableOnlyOption() error {

0 commit comments

Comments
 (0)