Documentation
¶
Overview ¶
Package linters is a namespace for gh-aw's custom Go analysis linters.
The actual analyzers are implemented in subpackages — see the excessivefuncparams, errormessage, largefunc, and osexitinlibrary subdirectories for analyzer entry points. The package also exposes a compatibility alias (ErrorMessageAnalyzer) that points to the errormessage subpackage analyzer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorMessageAnalyzer = errormessage.Analyzer
ErrorMessageAnalyzer exposes the actionable error-message analyzer.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package ctxbackground implements a Go analysis linter that flags calls to context.Background() inside functions that already receive a context.Context parameter.
|
Package ctxbackground implements a Go analysis linter that flags calls to context.Background() inside functions that already receive a context.Context parameter. |
|
Package errormessage implements a Go analysis linter that enforces actionable error-message patterns in changed files.
|
Package errormessage implements a Go analysis linter that enforces actionable error-message patterns in changed files. |
|
Package errstringmatch implements a Go analysis linter that flags calls to strings.Contains(err.Error(), "literal") that perform brittle substring matching on error messages instead of using errors.Is or errors.As.
|
Package errstringmatch implements a Go analysis linter that flags calls to strings.Contains(err.Error(), "literal") that perform brittle substring matching on error messages instead of using errors.Is or errors.As. |
|
Package excessivefuncparams implements a Go analysis linter that flags functions with too many positional parameters.
|
Package excessivefuncparams implements a Go analysis linter that flags functions with too many positional parameters. |
|
Package fileclosenotdeferred implements a Go analysis linter that flags file operations where Close() is not immediately deferred.
|
Package fileclosenotdeferred implements a Go analysis linter that flags file operations where Close() is not immediately deferred. |
|
internal
|
|
|
nolint
Package nolint provides shared helpers for nolint-directive detection used by linters within pkg/linters.
|
Package nolint provides shared helpers for nolint-directive detection used by linters within pkg/linters. |
|
Package largefunc implements a Go analysis linter that flags functions whose body exceeds a configurable line threshold.
|
Package largefunc implements a Go analysis linter that flags functions whose body exceeds a configurable line threshold. |
|
Package manualmutexunlock implements a Go analysis linter that flags mutex Unlock() calls that are not deferred, which can lead to deadlocks if a panic or early return occurs between Lock() and Unlock().
|
Package manualmutexunlock implements a Go analysis linter that flags mutex Unlock() calls that are not deferred, which can lead to deadlocks if a panic or early return occurs between Lock() and Unlock(). |
|
Package osexitinlibrary implements a Go analysis linter that flags os.Exit calls in library (pkg/) packages.
|
Package osexitinlibrary implements a Go analysis linter that flags os.Exit calls in library (pkg/) packages. |
|
Package panicinlibrarycode implements a Go analysis linter that flags panic() calls in library (pkg/) packages.
|
Package panicinlibrarycode implements a Go analysis linter that flags panic() calls in library (pkg/) packages. |
|
Package rawloginlib implements a Go analysis linter that flags standard log package calls in library (pkg/) packages.
|
Package rawloginlib implements a Go analysis linter that flags standard log package calls in library (pkg/) packages. |
|
Package regexpcompileinfunction implements a Go analysis linter that flags calls to regexp.MustCompile() and regexp.Compile() inside function bodies.
|
Package regexpcompileinfunction implements a Go analysis linter that flags calls to regexp.MustCompile() and regexp.Compile() inside function bodies. |
|
Package ssljson implements a Go analysis linter that validates .github/skills/*/ssl.json files against the SSL specification rules.
|
Package ssljson implements a Go analysis linter that validates .github/skills/*/ssl.json files against the SSL specification rules. |
Click to show internal directories.
Click to hide internal directories.