deadcode

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package deadcode implements the `supermodel dead-code` command. It calls the Supermodel API to identify functions and files with no callers, then renders the results as a table or JSON.

This is a vertical slice. It must not import any other slice package. It may import from the shared kernel: internal/api, internal/cache, internal/config, internal/ui, internal/build.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, cfg *config.Config, dir string, opts Options) error

Run finds functions with no incoming call edges and prints them.

Types

type Options

type Options struct {
	Force          bool   // bypass cache
	Output         string // "human" | "json"
	IncludeExports bool   // include exported (public) functions in results
}

Options configures the dead-code command.

type Result

type Result struct {
	Name string `json:"name"`
	File string `json:"file"`
}

Result is a function with no detected callers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL