Skip to content

Commit 5f1446c

Browse files
committed
feat: use a pointer for the deprecated option
1 parent 6592b7e commit 5f1446c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/config/loader.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,9 @@ func (l *Loader) handleDeprecation() error {
338338

339339
// The 2 options are true by default.
340340
// Deprecated since v1.63.0
341-
if !l.cfg.Output.UniqByLine {
341+
if l.cfg.Output.UniqByLine != nil {
342342
l.log.Warnf("The configuration option `output.uniq-by-line` is deprecated, please use `issues.uniq-by-line`")
343-
l.cfg.Issues.UniqByLine = l.cfg.Output.UniqByLine
343+
l.cfg.Issues.UniqByLine = *l.cfg.Output.UniqByLine
344344
}
345345

346346
// Deprecated since v1.57.0

pkg/config/output.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ type Output struct {
5252
Format string `mapstructure:"format"`
5353

5454
// Deprecated: use [Issues.UniqByLine] instead.
55-
UniqByLine bool `mapstructure:"uniq-by-line"`
55+
UniqByLine *bool `mapstructure:"uniq-by-line"`
5656
}
5757

5858
func (o *Output) Validate() error {

0 commit comments

Comments
 (0)