Skip to content

Commit c41b849

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

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

pkg/config/loader.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -336,11 +336,10 @@ func (l *Loader) handleDeprecation() error {
336336
}
337337
l.cfg.Output.ShowStats = l.cfg.Run.ShowStats || l.cfg.Output.ShowStats
338338

339-
// The 2 options are true by default.
340339
// Deprecated since v1.63.0
341-
if !l.cfg.Output.UniqByLine {
340+
if l.cfg.Output.UniqByLine != nil {
342341
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
342+
l.cfg.Issues.UniqByLine = *l.cfg.Output.UniqByLine
344343
}
345344

346345
// 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)