Skip to content

Commit fd9a0f2

Browse files
build(deps): bump github.com/manuelarte/funcorder from 0.2.1 to 0.3.0 (#5743)
Co-authored-by: Fernandez Ludovic <[email protected]>
1 parent 66dba64 commit fd9a0f2

File tree

6 files changed

+13
-3
lines changed

6 files changed

+13
-3
lines changed

.golangci.next.reference.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,9 @@ linters:
539539
# Checks if the exported methods of a structure are placed before the non-exported ones.
540540
# Default: true
541541
struct-method: false
542+
# Checks if the constructors and/or structure methods are sorted alphabetically.
543+
# Default: false
544+
alphabetical: true
542545

543546
funlen:
544547
# Checks the number of lines in a function.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ require (
7373
github.com/ldez/usetesting v0.4.3
7474
github.com/leonklingele/grouper v1.1.2
7575
github.com/macabu/inamedparam v0.2.0
76-
github.com/manuelarte/funcorder v0.2.1
76+
github.com/manuelarte/funcorder v0.3.0
7777
github.com/maratori/testableexamples v1.0.0
7878
github.com/maratori/testpackage v1.1.1
7979
github.com/matoous/godox v1.1.0

go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jsonschema/golangci.next.jsonschema.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,6 +1317,11 @@
13171317
"description": "Checks if the exported methods of a structure are placed before the non-exported ones.",
13181318
"type": "boolean",
13191319
"default": true
1320+
},
1321+
"alphabetical": {
1322+
"description": "Checks if the constructors and/or structure methods are sorted alphabetically.",
1323+
"type": "boolean",
1324+
"default": false
13201325
}
13211326
}
13221327
},

pkg/config/linters_settings.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,7 @@ type ForbidigoPattern struct {
428428
type FuncOrderSettings struct {
429429
Constructor bool `mapstructure:"constructor,omitempty"`
430430
StructMethod bool `mapstructure:"struct-method,omitempty"`
431+
Alphabetical bool `mapstructure:"alphabetical,omitempty"`
431432
}
432433

433434
type FunlenSettings struct {

pkg/golinters/funcorder/funcorder.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ func New(settings *config.FuncOrderSettings) *goanalysis.Linter {
1717
cfg[a.Name] = map[string]any{
1818
analyzer.ConstructorCheckName: settings.Constructor,
1919
analyzer.StructMethodCheckName: settings.StructMethod,
20+
analyzer.AlphabeticalCheckName: settings.Alphabetical,
2021
}
2122
}
2223

0 commit comments

Comments
 (0)