Documentation
¶
Overview ¶
Package analyze holds the Gx go/analysis passes: route packages (GX3005) and safe HTML conversions (GX7001). gx lint runs them over a module and the lintplugin package registers them with golangci-lint (REQ-TLS-03).
Index ¶
Constants ¶
This section is empty.
Variables ¶
var EnumCoverage = &analysis.Analyzer{
Name: "gxenum",
Doc: "report a gx.Enum map that misses a constant of its type (GX5001)",
Run: runEnum,
}
EnumCoverage reports a gx.Enum[T] map that misses a constant of T (GX5001, REQ-STY-05).
var RoutePackage = &analysis.Analyzer{
Name: "gxroutepkg",
Doc: "report code other than route types in a route package (GX3005)",
Run: runRoutePackage,
}
RoutePackage reports code other than route types in a route package (GX3005, REQ-RTE-20).
var RuntimeClass = &analysis.Analyzer{
Name: "gxclassruntime",
Doc: "report a gx.Cx argument built at runtime (GX5003)",
Run: runRuntimeClass,
}
RuntimeClass reports a gx.Cx argument built at runtime with fmt.Sprintf, fmt.Sprint, strings.Join or a non-constant concatenation (GX5003, REQ-STY-11).
var SafeHTML = &analysis.Analyzer{
Name: "gxsafehtml",
Doc: "report a gx.SafeHTML conversion of a non-constant value without //gx:trusted (GX7001)",
Run: runSafeHTML,
}
SafeHTML reports a gx.SafeHTML conversion of a non-constant value without //gx:trusted on the same line (GX7001, SI-01).