Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnalyzeCommand ¶ added in v1.33.0
func AnalyzeCommand(analyzeOpts ...AnalyzeOption) *cobra.Command
AnalyzeCommand creates the "analyze" cobra command with optional embedder configuration. Embedders can inject domain-specific expensive functions, loop keywords, and cost overrides via AnalyzeOption functions.
func DocCommand ¶ added in v1.18.0
DocCommand creates the "doc" cobra command with optional embedder configuration. Embedders can pass WithEnv to supply a fully configured environment (preferred) or WithRegistry to merge Go-registered packages into the default doc environment.
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func LSPCommand ¶ added in v1.26.0
LSPCommand creates the "lsp" cobra command with optional embedder configuration. Embedders can pass WithRegistry or WithEnv to inject Go-registered symbols for semantic analysis.
func LintCommand ¶ added in v1.18.0
LintCommand creates the "lint" cobra command with optional embedder configuration. Embedders can pass WithRegistry or WithEnv to inject Go-registered symbols for semantic analysis.
func MCPCommand ¶ added in v1.39.0
MCPCommand creates the "mcp" cobra command with optional embedder configuration.
Types ¶
type AnalyzeOption ¶ added in v1.33.0
AnalyzeOption configures the analyze command for embedder integration.
func WithExpensiveFunctions ¶ added in v1.33.0
func WithExpensiveFunctions(patterns ...string) AnalyzeOption
WithExpensiveFunctions appends expensive function patterns to the config. Embedders use this to inject domain-specific patterns (e.g., "statedb:*").
func WithFunctionCosts ¶ added in v1.33.0
func WithFunctionCosts(costs map[string]int) AnalyzeOption
WithFunctionCosts sets per-function cost overrides.
func WithLoopKeywords ¶ added in v1.33.0
func WithLoopKeywords(keywords ...string) AnalyzeOption
WithLoopKeywords appends loop keyword symbols to the config. Embedders use this for domain-specific iteration forms.
func WithSuppressionPrefix ¶ added in v1.33.0
func WithSuppressionPrefix(prefix string) AnalyzeOption
WithSuppressionPrefix sets the suppression comment prefix.
type Option ¶ added in v1.18.0
type Option func(*cmdConfig)
Option configures an exported command factory (LintCommand, DocCommand).
func WithEnv ¶ added in v1.18.0
WithEnv injects a fully configured LEnv. For the doc command this is the environment used for documentation queries. For the lint command the env's Runtime.Registry is used for semantic analysis.
func WithRegistry ¶ added in v1.18.0
func WithRegistry(reg *lisp.PackageRegistry) Option
WithRegistry injects a PackageRegistry for semantic analysis. The registry's Go-registered builtins, special ops, and macros are merged with stdlib symbols so that the linter recognises embedder-provided functions.