Documentation
¶
Overview ¶
Package configlint finds config keys that can be deleted without changing what gofer actually runs with (`gofer config lint`, gofer-arsj). The test for every key is empirical: delete it, load the config again through the real loader and the real agent defaults, and compare the effective result. No separate rule table is kept, so the verdicts follow whatever the defaults are in this build.
Index ¶
Constants ¶
const ( KindRemove = "remove" // the key can be deleted (`--fix` deletes it) KindExtends = "extends" // the agent can be rewritten with extends: builtin (hint only) KindUnknown = "unknown" // gofer does not know the key and ignores it (typo?); never fixed )
Finding kinds.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Finding ¶
type Finding struct {
File string // absolute path
Line int // 1-based line of the key
Path string // dotted key path, e.g. agents.claude.detect
Kind string
Reason string
Suggestion string // KindExtends: the rewritten agent block
Lines int // lines saved
}
Finding is one report line.
type FixResult ¶
FixResult describes what Fix changed.
func Fix ¶
Fix deletes every removable key, one at a time on the current text, keeping a deletion only while the effective config stays the same (two keys can each be redundant alone yet not together). Each changed file is backed up first; the result is loaded again and compared before Fix returns — any difference restores all files.