Skip to content

Commit befeaf5

Browse files
build(deps): bump github.com/manuelarte/embeddedstructfieldcheck from 0.3.0 to 0.4.0 (#6012)
Co-authored-by: Fernandez Ludovic <[email protected]>
1 parent 58226c8 commit befeaf5

File tree

6 files changed

+17
-4
lines changed

6 files changed

+17
-4
lines changed

.golangci.next.reference.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,9 @@ linters:
392392
- "0C0C"
393393

394394
embeddedstructfieldcheck:
395+
# Checks that there is an empty space between the embedded fields and regular fields.
396+
# Default: true
397+
empty-line: false
395398
# Checks that sync.Mutex and sync.RWMutex are not used as embedded fields.
396399
# Default: false
397400
forbid-mutex: true

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ require (
7676
github.com/ldez/usetesting v0.5.0
7777
github.com/leonklingele/grouper v1.1.2
7878
github.com/macabu/inamedparam v0.2.0
79-
github.com/manuelarte/embeddedstructfieldcheck v0.3.0
79+
github.com/manuelarte/embeddedstructfieldcheck v0.4.0
8080
github.com/manuelarte/funcorder v0.5.0
8181
github.com/maratori/testableexamples v1.0.0
8282
github.com/maratori/testpackage v1.1.1

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
@@ -1126,6 +1126,11 @@
11261126
"type": "object",
11271127
"additionalProperties": false,
11281128
"properties": {
1129+
"empty-line": {
1130+
"description": "Checks that there is an empty space between the embedded fields and regular fields.",
1131+
"type": "boolean",
1132+
"default": false
1133+
},
11291134
"forbid-mutex": {
11301135
"description": "Checks that sync.Mutex and sync.RWMutex are not used as embedded fields.",
11311136
"type": "boolean",

pkg/config/linters_settings.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ var defaultLintersSettings = LintersSettings{
2424
Dupl: DuplSettings{
2525
Threshold: 150,
2626
},
27+
EmbeddedStructFieldCheck: EmbeddedStructFieldCheckSettings{
28+
EmptyLine: true,
29+
},
2730
ErrorLint: ErrorLintSettings{
2831
Errorf: true,
2932
ErrorfMulti: true,
@@ -380,6 +383,7 @@ type DupWordSettings struct {
380383

381384
type EmbeddedStructFieldCheckSettings struct {
382385
ForbidMutex bool `mapstructure:"forbid-mutex"`
386+
EmptyLine bool `mapstructure:"empty-line"`
383387
}
384388

385389
type ErrcheckSettings struct {

pkg/golinters/embeddedstructfieldcheck/embeddedstructfieldcheck.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ func New(settings *config.EmbeddedStructFieldCheckSettings) *goanalysis.Linter {
1212

1313
if settings != nil {
1414
cfg = map[string]any{
15-
analyzer.ForbidMutexName: settings.ForbidMutex,
15+
analyzer.ForbidMutexCheck: settings.ForbidMutex,
16+
analyzer.EmptyLineCheck: settings.EmptyLine,
1617
}
1718
}
1819

0 commit comments

Comments
 (0)