All analyzers
gohawk ships a focused set of analyzers rather than a general-purpose lint catalog. Every check identifies the kind of claim it makes:
- Defect means the available evidence establishes broken or ineffective behavior.
- Hazard means the behavior is risky, but harm depends on a wider runtime contract.
- Policy means valid Go violates an intentionally selected engineering convention.
Kind is descriptive metadata and does not change whether a check is enabled by default.
Concurrency and synchronization
These analyzers check goroutine lifecycles, channel use, and synchronization.
channelsafety
Checks channel operations for use after close.
concurrentcapture
Checks locals mutated by goroutines launched repeatedly.
goroutineownership
Checks that proven goroutine completion obligations are honored.
lockorder
Checks contradictory mutex acquisition order and unreleased return paths.
producerlifecycle
Checks that goroutine producers cannot outlive their receivers.
Resources and lifecycle
These analyzers check resource ownership, cleanup, and lifetimes.
cancellationownership
Checks context and signal-derived cancellation functions proved lost on a normal return path.
deferinloop
Checks cleanup defers whose lifetime extends across loop iterations.
processownership
Checks that started os/exec commands are waited on or transferred to a wait owner.
resourcelifetime
Checks owned files, SQL handles, HTTP responses, and compressors are released on every path.