From 1df5b46c18c74fae14c73761facc6e67e28cf9bd Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Thu, 16 Oct 2025 10:25:00 +0300 Subject: [PATCH] docs: improve modernize reference --- .golangci.next.reference.yml | 74 ++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 36 deletions(-) diff --git a/.golangci.next.reference.yml b/.golangci.next.reference.yml index 1226d3eefa52..bc88db36c93f 100644 --- a/.golangci.next.reference.yml +++ b/.golangci.next.reference.yml @@ -2115,43 +2115,45 @@ linters: - '^http\.StatusText$' modernize: + # List of analyzers to disable. + # By default, all analyzers are enabled. disable: - # Replace interface{} with any. - - any - # Replace for-range over b.N with b.Loop. - - bloop - # Replace []byte(fmt.Sprintf) with fmt.Appendf. - - fmtappendf - # Remove redundant re-declaration of loop variables. - - forvar - # Replace explicit loops over maps with calls to maps package. - - mapsloop - # Replace if/else statements with calls to min or max. - - minmax - # Simplify code by using go1.26's new(expr). - - newexpr - # Suggest replacing omitempty with omitzero for struct fields. - - omitzero - # Replace 3-clause for loops with for-range over integers. - - rangeint - # Replace reflect.TypeOf(x) with TypeFor[T](). - - reflecttypefor - # Replace loops with slices.Contains or slices.ContainsFunc. - - slicescontains - # Replace sort.Slice with slices.Sort for basic types. - - slicessort - # Use iterators instead of Len/At-style APIs. - - stditerators - # Replace HasPrefix/TrimPrefix with CutPrefix. - - stringscutprefix - # Replace ranging over Split/Fields with SplitSeq/FieldsSeq. - - stringsseq - # Replace += with strings.Builder. - - stringsbuilder - # Replace context.WithCancel with t.Context in tests. - - testingcontext - # Replace wg.Add(1)/go/wg.Done() with wg.Go. - - waitgroup + # Replace interface{} with any. + - any + # Replace for-range over b.N with b.Loop. + - bloop + # Replace []byte(fmt.Sprintf) with fmt.Appendf. + - fmtappendf + # Remove redundant re-declaration of loop variables. + - forvar + # Replace explicit loops over maps with calls to maps package. + - mapsloop + # Replace if/else statements with calls to min or max. + - minmax + # Simplify code by using go1.26's new(expr). + - newexpr + # Suggest replacing omitempty with omitzero for struct fields. + - omitzero + # Replace 3-clause for loops with for-range over integers. + - rangeint + # Replace reflect.TypeOf(x) with TypeFor[T](). + - reflecttypefor + # Replace loops with slices.Contains or slices.ContainsFunc. + - slicescontains + # Replace sort.Slice with slices.Sort for basic types. + - slicessort + # Use iterators instead of Len/At-style APIs. + - stditerators + # Replace HasPrefix/TrimPrefix with CutPrefix. + - stringscutprefix + # Replace ranging over Split/Fields with SplitSeq/FieldsSeq. + - stringsseq + # Replace += with strings.Builder. + - stringsbuilder + # Replace context.WithCancel with t.Context in tests. + - testingcontext + # Replace wg.Add(1)/go/wg.Done() with wg.Go. + - waitgroup musttag: # A set of custom functions to check in addition to the builtin ones.