Skip to content

Commit 259f177

Browse files
renovate[bot]jade-guiton-ddmx-psi
authored
Update module mvdan.cc/gofumpt to v0.11.0 (#15674)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [mvdan.cc/gofumpt](https://redirect.github.com/mvdan/gofumpt) | `v0.9.2` → `v0.11.0` | ![age](https://developer.mend.io/api/mc/badges/age/go/mvdan.cc%2fgofumpt/v0.11.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/go/mvdan.cc%2fgofumpt/v0.9.2/v0.11.0?slim=true) | --- > [!WARNING] > Some dependencies could not be looked up. Check the [Dependency Dashboard](../issues/8903) for more information. --- ### Release Notes <details> <summary>mvdan/gofumpt (mvdan.cc/gofumpt)</summary> ### [`v0.11.0`](https://redirect.github.com/mvdan/gofumpt/blob/HEAD/CHANGELOG.md#v0110---2026-07-27) [Compare Source](https://redirect.github.com/mvdan/gofumpt/compare/v0.10.0...v0.11.0) Like v0.10.0, this release is based on Go 1.26's gofmt, and requires Go 1.25 or later. The multi-line function call rule introduced in v0.10.0 proved controversial, so it is now the extra rule `balance_calls`, disabled by default. It is also narrowed to only place the closing parenthesis on its own line when the opening parenthesis ends a line. See [#&#8203;74](https://redirect.github.com/mvdan/gofumpt/issues/74). Avoid crashing when compiled with tinygo for Wasm, which lacks recover support, by detecting commented-out code without the parser's bailout panic. See [#&#8203;230](https://redirect.github.com/mvdan/gofumpt/issues/230). Produce stable output in a single pass when a lone var declaration is adjacent to a single-element var group, which previously required a second run. See [#&#8203;355](https://redirect.github.com/mvdan/gofumpt/issues/355). Keep the parentheses around an expression which begins with a composite literal of the form `T{...}`, such as `(s{}.Foo())`, as they are required when the expression starts an `if`, `for`, or `switch` clause. See [#&#8203;356](https://redirect.github.com/mvdan/gofumpt/issues/356). ### [`v0.10.0`](https://redirect.github.com/mvdan/gofumpt/blob/HEAD/CHANGELOG.md#v0100---2026-05-04) [Compare Source](https://redirect.github.com/mvdan/gofumpt/compare/v0.9.2...v0.10.0) This release is based on Go 1.26's gofmt, and requires Go 1.25 or later. A new rule is introduced to drop unnecessary parentheses around expressions where the inner expression is unambiguous on its own, such as `f((3))`. Parentheses are kept where they are useful, such as on binary expressions. See [#&#8203;44](https://redirect.github.com/mvdan/gofumpt/issues/44). A new rule is introduced to require multi-line function calls to match the opening and closing parenthesis in terms of the use of newlines. See [#&#8203;74](https://redirect.github.com/mvdan/gofumpt/issues/74). The `-extra` flag now accepts a comma-separated list of rule names to enable individual extra rules, rather than enabling all of them at once. See [#&#8203;339](https://redirect.github.com/mvdan/gofumpt/issues/339). The following changes are included as well: - Avoid crashing on `go.mod` files without a `module` directive - [#&#8203;350](https://redirect.github.com/mvdan/gofumpt/issues/350) - Avoid failing when an ignored directory cannot be read - [#&#8203;351](https://redirect.github.com/mvdan/gofumpt/issues/351) - Avoid prefixing more kinds of commented-out Go code with spaces - [#&#8203;230](https://redirect.github.com/mvdan/gofumpt/issues/230) - Avoid prefixing a shebang comment with a space - [#&#8203;237](https://redirect.github.com/mvdan/gofumpt/issues/237) - Narrow the newlines on assignments rule to ignore complex cases - [#&#8203;354](https://redirect.github.com/mvdan/gofumpt/issues/354) - Fix three bugs which caused a second gofumpt run to make changes - [#&#8203;132](https://redirect.github.com/mvdan/gofumpt/issues/132), [#&#8203;345](https://redirect.github.com/mvdan/gofumpt/issues/345) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - "on tuesday" - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yODAuMCIsInVwZGF0ZWRJblZlciI6IjQzLjI4MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jade Guiton <jade.guiton@datadoghq.com> Co-authored-by: Pablo Baeyens <pablo.baeyens@datadoghq.com>
1 parent c9f489a commit 259f177

68 files changed

Lines changed: 362 additions & 188 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cmd/builder/internal/builder/main.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ func GetModules(cfg *Config) error {
200200
if semver.MajorMinor(coreDepVersion) != betaVersion {
201201
return fmt.Errorf(
202202
"%w: core collector version calculated by component dependencies %q does not match configured version %q. %s",
203-
ErrVersionMismatch, coreDepVersion, betaVersion, skipStrictMsg)
203+
ErrVersionMismatch, coreDepVersion, betaVersion, skipStrictMsg,
204+
)
204205
}
205206

206207
for _, mod := range cfg.allComponents() {
@@ -218,7 +219,8 @@ func GetModules(cfg *Config) error {
218219
if semver.MajorMinor(moduleDepVersion) != semver.MajorMinor(version) {
219220
return fmt.Errorf(
220221
"%w: component %q version calculated by dependencies %q does not match configured version %q. %s",
221-
ErrVersionMismatch, module, moduleDepVersion, version, skipStrictMsg)
222+
ErrVersionMismatch, module, moduleDepVersion, version, skipStrictMsg,
223+
)
222224
}
223225
}
224226

cmd/mdatagen/internal/cfggen/generation.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,8 @@ func formatSimpleValue(md *ConfigMetadata, name string, defaultValue any, rootPa
763763
value := defaultValues[keyName]
764764
exps = append(
765765
exps,
766-
fmt.Sprintf("%q: %v", keyName, FormatDefaultValue(md.Values, name, value, rootPackage, componentPackage)))
766+
fmt.Sprintf("%q: %v", keyName, FormatDefaultValue(md.Values, name, value, rootPackage, componentPackage)),
767+
)
767768
}
768769
return fmt.Sprintf("map[string]%s{%s}", typeExpr, strings.Join(exps, ", "))
769770
}

cmd/mdatagen/internal/command.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ func run(ymlPath string) error {
142142
err = inlineReplaceWithFns(
143143
filepath.Join(tmplDir, "readme.md.tmpl"),
144144
filepath.Join(ymlDir, "README.md"),
145-
md, statusStart, statusEnd, md.GeneratedPackageName, importRootPath, nil)
145+
md, statusStart, statusEnd, md.GeneratedPackageName, importRootPath, nil,
146+
)
146147
if err != nil {
147148
return err
148149
}
@@ -501,7 +502,8 @@ func templatize(tmplFile string, funcMap template.FuncMap) *template.Template {
501502
New(filepath.Base(tmplFile)).
502503
Option("missingkey=error").
503504
Funcs(funcMap).
504-
ParseFS(TemplateFS, "templates/helper.tmpl", strings.ReplaceAll(tmplFile, "\\", "/")))
505+
ParseFS(TemplateFS, "templates/helper.tmpl", strings.ReplaceAll(tmplFile, "\\", "/")),
506+
)
505507
}
506508

507509
func executeTemplate(tmplFile string, md Metadata, goPackage, importRootPath string, fns template.FuncMap) ([]byte, error) {

cmd/mdatagen/internal/metric.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ func validateSemConvMetricURL(rawURL, semConvVersion, metricName string) error {
146146
if !re.MatchString(rawURL) {
147147
return fmt.Errorf(
148148
"invalid semantic-conventions URL: want https://github.com/open-telemetry/semantic-conventions/blob/%s/*#%s, got %q",
149-
semConvVersion, anchor, rawURL)
149+
semConvVersion, anchor, rawURL,
150+
)
150151
}
151152
return nil
152153
}

component/componenttest/configtest.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ func checkStructFieldTags(f reflect.StructField) error {
103103
case "squash":
104104
if (f.Type.Kind() != reflect.Struct) && (f.Type.Kind() != reflect.Ptr || f.Type.Elem().Kind() != reflect.Struct) {
105105
return fmt.Errorf(
106-
"attempt to squash non-struct type on field %q", f.Name)
106+
"attempt to squash non-struct type on field %q", f.Name,
107+
)
107108
}
108109
case "remain":
109110
if f.Type.Kind() != reflect.Map && f.Type.Kind() != reflect.Interface {
@@ -128,7 +129,8 @@ func checkStructFieldTags(f reflect.StructField) error {
128129
"field %q has config tag %q which doesn't satisfy %q",
129130
f.Name,
130131
fieldTag,
131-
configFieldTagRegExp.String())
132+
configFieldTagRegExp.String(),
133+
)
132134
}
133135
}
134136

config/configgrpc/client_middleware_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ func newTestClientMiddleware(name string) extension.Extension {
8181

8282
// Continue the call with our updated context
8383
return invoker(newCtx, method, req, reply, cc, opts...)
84-
}),
84+
},
85+
),
8586
}, nil
8687
},
8788
}

config/configgrpc/server_middleware_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ func newTestServerMiddleware(name string) extension.Extension {
5555
) (any, error) {
5656
ctx = context.WithValue(ctx, middlewareCallsKey, append(getMiddlewareCalls(ctx), name))
5757
return handler(ctx, req)
58-
})}, nil
58+
},
59+
)}, nil
5960
},
6061
}
6162
}

config/confighttp/client_middleware_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ func newTestClientMiddleware(name string) component.Component {
5656
resp.ContentLength = int64(len(newBody))
5757

5858
return resp, nil
59-
}), nil
59+
},
60+
), nil
6061
}, nil
6162
},
6263
}

config/confighttp/confighttp_example_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ func ExampleServerConfig() {
2121
context.Background(),
2222
host.GetExtensions(),
2323
componenttest.NewNopTelemetrySettings(),
24-
http.HandlerFunc(func(http.ResponseWriter, *http.Request) {}))
24+
http.HandlerFunc(func(http.ResponseWriter, *http.Request) {}),
25+
)
2526
if err != nil {
2627
panic(err)
2728
}

config/confighttp/server.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,8 @@ func (sc *ServerConfig) ToServer(ctx context.Context, extensions map[component.I
284284
}),
285285
otelhttp.WithMeterProvider(settings.MeterProvider),
286286
},
287-
serverOpts.OtelhttpOpts...)
287+
serverOpts.OtelhttpOpts...,
288+
)
288289

289290
// Enable OpenTelemetry observability plugin.
290291
handler = otelhttp.NewHandler(handler, "", otelOpts...)

0 commit comments

Comments
 (0)