Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Lint Rule: modifies-value-receiver #5517

Merged
merged 3 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,6 @@ linters-settings:
# TBD - often triggered in tests
- name: unhandled-error
disabled: true
# this one looks like it's catching real errors, need to enable it
- name: modifies-value-receiver
disabled: true
# often looks like a red herring, needs investigation
- name: flag-parameter
disabled: true
Expand Down
7 changes: 4 additions & 3 deletions cmd/agent/app/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,11 @@ func (b *Builder) getProcessors(rep reporter.Reporter, mFactory metrics.Factory,

// GetHTTPServer creates an HTTP server that provides sampling strategies and baggage restrictions to client libraries.
func (c HTTPServerConfiguration) getHTTPServer(manager configmanager.ClientConfigManager, mFactory metrics.Factory, logger *zap.Logger) *http.Server {
if c.HostPort == "" {
c.HostPort = defaultHTTPServerHostPort
hostPort := c.HostPort
if hostPort == "" {
hostPort = defaultHTTPServerHostPort
}
return httpserver.NewHTTPServer(c.HostPort, manager, mFactory, logger)
return httpserver.NewHTTPServer(hostPort, manager, mFactory, logger)
}

// GetThriftProcessor gets a TBufferedServer backed Processor using the collector configuration
Expand Down
7 changes: 4 additions & 3 deletions model/dependencies.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@

// ApplyDefaults applies defaults to the DependencyLink.
func (d DependencyLink) ApplyDefaults() DependencyLink {
if d.Source == "" {
d.Source = JaegerDependencyLinkSource
dd := d
if dd.Source == "" {
dd.Source = JaegerDependencyLinkSource

Check warning on line 27 in model/dependencies.go

View check run for this annotation

Codecov / codecov/patch

model/dependencies.go#L27

Added line #L27 was not covered by tests
}
return d
return dd
}
FlamingSaint marked this conversation as resolved.
Show resolved Hide resolved
Loading