deadcode

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

@index 미사용 코드 탐지. incoming edge가 없는 함수와 클래스를 dead code 후보로 식별한다.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Kinds       []model.NodeKind
	FilePattern string
	Page        paging.Request
}

Options controls dead code filtering. @intent narrow dead code detection by node kind and file scope

type Result

type Result struct {
	Items      []model.Node
	Pagination paging.Page
}

Result carries one dead-code page plus pagination metadata. @intent let callers expose bounded dead-code responses while preserving legacy fields.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service finds unreachable graph nodes. @intent surface code elements that have no incoming references

func New

func New(db *gorm.DB) *Service

New creates a dead code analysis service. @intent construct a service for querying unused graph nodes

func (*Service) Find

func (s *Service) Find(ctx context.Context, opts Options) ([]model.Node, error)

Find detects unused code with no incoming edges. Used by MCP find_dead_code tool and pre_merge_check prompt.

@return nodes that have zero incoming edges (never called or referenced) @intent detect dead code candidates for cleanup @domainRule file and test nodes are always excluded from results @domainRule supports filtering by node kind and file path pattern

func (*Service) FindPage

func (s *Service) FindPage(ctx context.Context, opts Options) (Result, error)

FindPage detects unused code with no incoming edges and returns one bounded page. @intent push dead-code pagination into the query layer so handlers do not slice full results.

Jump to

Keyboard shortcuts

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