diff --git a/.golangci.reference.yml b/.golangci.reference.yml index bff571126a43..cc682aa3528c 100644 --- a/.golangci.reference.yml +++ b/.golangci.reference.yml @@ -359,8 +359,8 @@ linters-settings: # Section configuration to compare against. # Section names are case-insensitive and may contain parameters in (). - # The order of sections is always `standard > default > custom > blank > dot`, - # it cannot be changed and doesn't follow the order of `sections` option. + # The default order of sections is `standard > default > custom > blank > dot`, + # If enable custom-order, it follows the order of `sections` option. # Default: ["standard", "default"] sections: - standard # Standard section: captures all standard packages. @@ -373,6 +373,10 @@ linters-settings: # Default: true skip-generated: false + # Enable custom order of sections. If specified, make the section order the same as the order of `sections`. + # Default: false + custom-order: false + gocognit: # Minimal code complexity to report # Default: 30 (but we recommend 10-20) diff --git a/go.mod b/go.mod index 9b94befa14cb..d58286101034 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/breml/errchkjson v0.3.0 github.com/butuzov/ireturn v0.1.1 github.com/charithe/durationcheck v0.0.9 - github.com/daixiang0/gci v0.5.0 + github.com/daixiang0/gci v0.6.0 github.com/denis-tingaikin/go-header v0.4.3 github.com/esimonov/ifshort v1.0.4 github.com/fatih/color v1.13.0 diff --git a/go.sum b/go.sum index e5ea9aea54ce..f7a2f59b057b 100644 --- a/go.sum +++ b/go.sum @@ -132,8 +132,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsr github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/daixiang0/gci v0.5.0 h1:3+Z8nb/4dhJQYjpEbG4wt5na+KFJJTZ++PVEq/MVKX4= -github.com/daixiang0/gci v0.5.0/go.mod h1:EpVfrztufwVgQRXjnX4zuNinEpLj5OmMjtu/+MB0V0c= +github.com/daixiang0/gci v0.6.0 h1:lAQiaHASB8mfRaef9DS/hh7sIPnAQRFlvIJbC58f1Rs= +github.com/daixiang0/gci v0.6.0/go.mod h1:EpVfrztufwVgQRXjnX4zuNinEpLj5OmMjtu/+MB0V0c= github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=