Documentation
¶
Overview ¶
Package clishared holds helpers shared across krit's verb-specific CLI packages (internal/cli/<verb>/).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindConfigInDir ¶ added in v0.2.0
FindConfigInDir probes dir for the first present file in config.Filenames and returns its path, or "" when none is present (or dir is empty).
func ParseRuleNameSetCSV ¶ added in v0.2.0
ParseRuleNameSetCSV parses a comma-separated list of rule names into a lookup set. Whitespace around each name is trimmed. Empty input returns an empty (non-nil) map so callers can index it without nil checks.
Shared by --disable-rules / --enable-rules on both the CLI and daemon paths. A trailing comma or whitespace-only token produces an empty-string entry — harmless because no real rule has ID "".
func ScanModuleKotlinFiles ¶
ScanModuleKotlinFiles finds and parses all .kt files under the module's source roots.
func SimpleName ¶
SimpleName extracts the last dot-separated segment of an FQN, stripping any trailing parenthesised arity/signature.
func SplitPositional ¶
SplitPositional pulls up to max leading non-flag arguments out of args and returns them alongside the remaining (flag) arguments. Once a flag appears, all subsequent arguments are treated as flag args.
Types ¶
type MultiString ¶ added in v0.2.0
type MultiString []string
MultiString is a flag.Value that accumulates repeated --flag value invocations into a slice.
func (*MultiString) Set ¶ added in v0.2.0
func (m *MultiString) Set(value string) error
func (*MultiString) String ¶ added in v0.2.0
func (m *MultiString) String() string