Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfd9a0f2

Browse files
build(deps): bump github.com/manuelarte/funcorder from 0.2.1 to 0.3.0 (#5743)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
1 parent66dba64 commitfd9a0f2

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/usetestingv0.4.3
7474
github.com/leonklingele/grouperv1.1.2
7575
github.com/macabu/inamedparamv0.2.0
76-
github.com/manuelarte/funcorderv0.2.1
76+
github.com/manuelarte/funcorderv0.3.0
7777
github.com/maratori/testableexamplesv1.0.0
7878
github.com/maratori/testpackagev1.1.1
7979
github.com/matoous/godoxv1.1.0

‎go.sum‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing 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
typeFuncOrderSettingsstruct {
429429
Constructorbool`mapstructure:"constructor,omitempty"`
430430
StructMethodbool`mapstructure:"struct-method,omitempty"`
431+
Alphabeticalbool`mapstructure:"alphabetical,omitempty"`
431432
}
432433

433434
typeFunlenSettingsstruct {

‎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)

[8]ページ先頭

©2009-2025 Movatter.jp