types/strict/go
The type checker runs in strict mode
Implements types/strict for go.
| Severity | warning |
| Tiers | 1, 2 |
| Stacks | go |
| Scope | each |
| Kind | expr |
| Source | library v0.4.0 |
| Selected by | fleetlint-recommended@v0.4.0 |
Requirement
The compiler checks the types of every build; there is no separate type checker to make strict. Warnings the compiler can raise are covered by lint/strict.
Why
A lenient type checker lets untyped and implicitly dynamic values through, which is where the bugs it exists to catch hide.
Applies when
falseCheck
trueFix
Switch the type checker to strict mode (see https://fleetlint.org/stacks/).
Agent instruction: Switch the type checker to strict mode and list the errors that appear instead of adding ignores.
Sources
- https://fleetlint.org/baseline/#static-analysis (convention)
- https://fleetlint.org/stacks/#go (convention)
Generated by fleetlint docs from catalog v0.4.0.