Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

chore(lint): enable wastedassign (#10103)

Vikrant Guptaf2f3a7b24ad0
diff --git a/.golangci.yml b/.golangci.yml
index d5fdafa9f6..5d801f24b4 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -12,6 +12,7 @@ linters:
- misspell
- nilnil
- sloglint
+ - wastedassign
- unparam
- unused
settings:
diff --git a/pkg/telemetrytraces/condition_builder.go b/pkg/telemetrytraces/condition_builder.go
index ef7f3d6c79..d2ce8208a4 100644
--- a/pkg/telemetrytraces/condition_builder.go
+++ b/pkg/telemetrytraces/condition_builder.go
@@ -279,7 +279,7 @@ func (c *conditionBuilder) buildSpanScopeCondition(key *telemetrytypes.Telemetry
return "", errors.NewInvalidInputf(errors.CodeInvalidInput, "span scope field %s only supports '=' operator", key.Name)
}
- isTrue := false
+ var isTrue bool
switch v := value.(type) {
case bool:
isTrue = v