Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadDetector ¶
LoadDetector composes upstream + embedded + ~/.ctxcop/*.toml + $CTXCOP_RULES, applies $CTXCOP_DISABLE_RULES, caches.
Panic recovery: a single bad rule (regex compile, etc.) must never crash a hook handler. On panic we fall back to upstream defaults.
func ProjectConfigPath ¶
func ProjectConfigPath() string
ProjectConfigPath returns the discovered .ctxcop.toml path or "".
func ProjectSkipPaths ¶
func ProjectSkipPaths() []string
ProjectSkipPaths returns the project's skip_paths, fed into skiplist via main's SkipPathsFromProject wiring.
Types ¶
type RuleInfo ¶
type RuleInfo struct {
ID string
Description string
Source Source
SourcePath string
Disabled bool
// Overridden is true when a higher-priority source redefined this ID.
// Source/SourcePath then hold the *effective* (winning) definition, and
// OverriddenFrom names the source that was shadowed. This is what lets
// `rules list` report effective state instead of the pre-override lie.
Overridden bool
OverriddenFrom Source
}
Click to show internal directories.
Click to hide internal directories.