linter: update usetesting linter to match old behavior
What changed, and why it matters
This commit only changes a linter configuration file. It tells the project's Go linting tool to enforce a specific style rule about test code. There is no change to the actual LND software that runs on nodes, and no security issue is present.
No action required. This is a non-functional tooling/configuration change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch adds a single configuration option context-background: true under the usetesting linter section in .golangci.yml. This linter rule flags uses of context.Background() inside tests where t.Context() could be used instead. It is a code-quality/style enforcement change with no functional or security impact on the lnd binary.
Changed components
.golangci.ymlInspect captured patch +3 / −0
diff --git a/.golangci.yml b/.golangci.yml
index 3225c5c..239ea38 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -187,6 +187,9 @@ linters:
rules:
json: snake
+ usetesting:
+ context-background: true
+
whitespace:
multi-if: true
multi-func: true
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.