Daily lint scan from 2026-06-06
Issue Summary
Two minor linting issues accounting for 29 total findings:
- Error discard (10 findings):
json.Marshal error returns are ignored, leading to silent nil bytes on marshal failures.
- Case-insensitive comparison (18 findings): String comparisons using
strings.ToLower/ToUpper instead of strings.EqualFold.
Root Cause
Error Discard
- Test files where JSON marshalling is used without error checking
- Accidental omission of error handling in transient test data setup
Case-Insensitive Comparison
- Inefficient pattern:
strings.ToLower(a) == strings.ToLower(b)
- Should use:
strings.EqualFold(a, b) (more efficient, no allocations)
- Affects config parsing, feature detection, and utilities
Expected Outcome
Error Discard
- Check marshal error and handle appropriately (e.g.,
if err != nil { /* handle */ } or _ = err if truly intentional)
- Tests should validate both success and error paths
Case-Insensitive
- Replace
strings.ToLower(s1) == strings.ToLower(s2) with strings.EqualFold(s1, s2)
- Replace
strings.ToUpper(s1) == strings.ToUpper(s2) with strings.EqualFold(s1, s2)
Remediation Checklist
Notes
- These are low-complexity fixes suitable for batch processing
- Error handling in tests should be explicit or use
_ = err with documented rationale
- No dependencies between the two sub-issues; can be addressed independently
Generated by 🧌 LintMonster · 110.5 AIC · ⌖ 4.45 AIC · ◷
Daily lint scan from 2026-06-06
Issue Summary
Two minor linting issues accounting for 29 total findings:
json.Marshalerror returns are ignored, leading to silent nil bytes on marshal failures.strings.ToLower/ToUpperinstead ofstrings.EqualFold.Root Cause
Error Discard
Case-Insensitive Comparison
strings.ToLower(a) == strings.ToLower(b)strings.EqualFold(a, b)(more efficient, no allocations)Expected Outcome
Error Discard
if err != nil { /* handle */ }or_ = errif truly intentional)Case-Insensitive
strings.ToLower(s1) == strings.ToLower(s2)withstrings.EqualFold(s1, s2)strings.ToUpper(s1) == strings.ToUpper(s2)withstrings.EqualFold(s1, s2)Remediation Checklist
make testto ensure tests still passmake golint-customto verify all findings are resolvedNotes
_ = errwith documented rationale