service

package
v1.31.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderWidth    = 40
	LabelWidth     = 25
	SectionPadding = 2
	ItemPadding    = 4
)

Standard formatting constants

View Source
const (
	ColorReset  = "\x1b[0m"
	ColorRed    = "\x1b[31m"
	ColorYellow = "\x1b[33m"
	ColorGreen  = "\x1b[32m"
	ColorCyan   = "\x1b[36m"
	ColorBold   = "\x1b[1m"
)

ANSI color codes for consistent color usage

View Source
const RepositoryURL = "https://github.com/ludo-technologies/pyscn"

RepositoryURL is the canonical GitHub repository for pyscn. Reports and CLI output link here so users who only ever run the tool can still find the project.

Variables

View Source
var ExampleSystemAnalysisConfig = `` /* 414-byte string literal not displayed */

Example configuration file content for documentation

Functions

func ArchitectureRulesFromPyscnConfig added in v1.25.0

func ArchitectureRulesFromPyscnConfig(cfg *config.PyscnConfig) *domain.ArchitectureRules

ArchitectureRulesFromPyscnConfig extracts explicit architecture rules from pyscn config.

func BuildCommunityGraphData added in v1.25.0

func BuildCommunityGraphData(response *domain.CommunityAnalysisResult, threshold int) communityGraphData

BuildCommunityGraphData converts a community analysis result into the compact graph payload used by the HTML visualization. When the module count exceeds threshold, the graph collapses to one node per community so the layout stays responsive. A threshold <= 0 falls back to communityGraphNodeThreshold.

func EncodeJSON

func EncodeJSON(v interface{}) (string, error)

EncodeJSON returns an indented JSON string for the given value.

func EncodeYAML

func EncodeYAML(v interface{}) (string, error)

EncodeYAML returns a YAML string for the given value.

func EscapeHTML added in v1.22.5

func EscapeHTML(value string) string

func EscapeHTMLSlice added in v1.22.5

func EscapeHTMLSlice(values []string) []string

func FindProjectRoot added in v1.25.0

func FindProjectRoot(paths []string) string

FindProjectRoot locates the project root from the given paths by finding their discovered config file first, then falling back to the common parent and standard Python project markers.

func GenerateHTMLFooter

func GenerateHTMLFooter() string

GenerateHTMLFooter generates the standard HTML footer

func GenerateMetricCard

func GenerateMetricCard(value, label string) string

GenerateMetricCard generates a metric card HTML

func GenerateSectionHeader

func GenerateSectionHeader(title string) string

GenerateSectionHeader generates a section header

func GenerateSinglePageContent

func GenerateSinglePageContent(content string) string

GenerateSinglePageContent generates a single page content wrapper (no tabs)

func GenerateStarLink() string

GenerateStarLink renders the GitHub call-to-action shown in report footers. It is a plain link rather than a remote badge image so reports stay self-contained and do not phone home when opened.

func GenerateStatusBadge

func GenerateStatusBadge(text, severity string) string

GenerateStatusBadge generates a status badge based on severity

func GenerateTabButton

func GenerateTabButton(id, label string, active bool) string

GenerateTabButton generates a tab button

func GenerateTabContent

func GenerateTabContent(id string, active bool, content string) string

GenerateTabContent generates a tab content wrapper

func GenerateTabScript

func GenerateTabScript() string

GenerateTabScript generates the JavaScript for tab switching

func GenerateTabsEnd

func GenerateTabsEnd() string

GenerateTabsEnd generates the end of a tabbed interface

func GenerateTabsMiddle

func GenerateTabsMiddle() string

GenerateTabsMiddle generates the middle section between tab buttons and content

func GenerateTabsStart

func GenerateTabsStart() string

GenerateTabsStart generates the start of a tabbed interface

func HasExplicitArchitectureConfig added in v1.25.0

func HasExplicitArchitectureConfig(rules *domain.ArchitectureRules) bool

HasExplicitArchitectureConfig reports whether architecture rules were configured by the user.

func IsInteractiveEnvironment added in v1.1.0

func IsInteractiveEnvironment() bool

IsInteractiveEnvironment returns true if the environment appears to be an interactive TTY session (and not CI)

func IsSSH added in v1.1.0

func IsSSH() bool

IsSSH returns true if the session is running over SSH

func JoinEscapedHTML added in v1.22.5

func JoinEscapedHTML(values []string, separator string) string

func LoadAnalysisTimingFactors added in v1.24.1

func LoadAnalysisTimingFactors() map[domain.AnalysisKind]float64

LoadAnalysisTimingFactors returns calibration factors recorded by previous runs on this project. Returns an empty map when no usable cache exists. Disabled under `go test` so test runs neither read nor pollute the cache.

func NewErrorCategorizer

func NewErrorCategorizer() domain.ErrorCategorizer

NewErrorCategorizer creates a new error categorizer

func NewParallelExecutor

func NewParallelExecutor() domain.ParallelExecutor

NewParallelExecutor creates a new parallel executor

func NewProgressManager

func NewProgressManager() domain.ProgressManager

NewProgressManager creates a new progress manager

func NewSimpleTask

func NewSimpleTask(name string, enabled bool, execute func(context.Context) (interface{}, error)) domain.ExecutableTask

NewSimpleTask creates a new simple task

func OpenBrowser

func OpenBrowser(url string) error

OpenBrowser opens the specified URL in the default browser

func SafeHTMLID added in v1.22.5

func SafeHTMLID(value string) string

func UpdateAnalysisTimingFactors added in v1.24.1

func UpdateAnalysisTimingFactors(estimatedSeconds, actualSeconds map[domain.AnalysisKind]float64)

UpdateAnalysisTimingFactors records observed task durations against their estimates, smoothing with previously stored factors. Failures are ignored: the cache only improves progress estimation and must never affect analysis.

func WriteCommunityHTMLSummary added in v1.25.0

func WriteCommunityHTMLSummary(builder *strings.Builder, response *domain.CommunityAnalysisResult)

WriteCommunityHTMLSummary writes a concise community section for unified analyze HTML output.

func WriteCommunityTextSummary added in v1.25.0

func WriteCommunityTextSummary(writer io.Writer, response *domain.CommunityAnalysisResult)

WriteCommunityTextSummary writes a concise community section for unified analyze text output.

func WriteJSON

func WriteJSON(w io.Writer, v interface{}) error

WriteJSON writes indented JSON for the given value to the writer.

func WriteYAML

func WriteYAML(w io.Writer, v interface{}) error

WriteYAML writes YAML for the given value to the writer.

Types

type AnalyzeConfigurationLoaderImpl added in v1.16.0

type AnalyzeConfigurationLoaderImpl struct{}

AnalyzeConfigurationLoaderImpl resolves and loads config for AnalyzeUseCase.

func NewAnalyzeConfigurationLoader added in v1.16.0

func NewAnalyzeConfigurationLoader() *AnalyzeConfigurationLoaderImpl

NewAnalyzeConfigurationLoader creates a new analyze configuration loader.

func (*AnalyzeConfigurationLoaderImpl) LoadAnalyzeExecutionConfig added in v1.16.0

func (l *AnalyzeConfigurationLoaderImpl) LoadAnalyzeExecutionConfig(configPath string, targetPath string) (domain.AnalyzeExecutionConfig, error)

LoadAnalyzeExecutionConfig resolves the effective config path and loads the AnalyzeUseCase-specific settings it needs.

type AnalyzeFormatter

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

AnalyzeFormatter handles formatting of unified analysis reports

func NewAnalyzeFormatter

func NewAnalyzeFormatter() *AnalyzeFormatter

NewAnalyzeFormatter creates a new analyze formatter

func (*AnalyzeFormatter) Write

func (f *AnalyzeFormatter) Write(response *domain.AnalyzeResponse, format domain.OutputFormat, writer io.Writer) error

Write formats and writes the unified analysis response

type CBOConfigurationLoaderImpl added in v1.4.0

type CBOConfigurationLoaderImpl struct{}

CBOConfigurationLoaderImpl implements the CBOConfigurationLoader interface

func NewCBOConfigurationLoader added in v1.4.0

func NewCBOConfigurationLoader() *CBOConfigurationLoaderImpl

NewCBOConfigurationLoader creates a new CBO configuration loader service

func (*CBOConfigurationLoaderImpl) FindDefaultConfigFile added in v1.4.0

func (cl *CBOConfigurationLoaderImpl) FindDefaultConfigFile(targetPath string) string

FindDefaultConfigFile discovers the config file governing targetPath.

func (*CBOConfigurationLoaderImpl) LoadConfig added in v1.4.0

func (cl *CBOConfigurationLoaderImpl) LoadConfig(path string) (*domain.CBORequest, error)

LoadConfig loads CBO configuration from the specified path using TOML-only strategy

func (*CBOConfigurationLoaderImpl) LoadDefaultConfig added in v1.4.0

func (cl *CBOConfigurationLoaderImpl) LoadDefaultConfig(targetPath string) *domain.CBORequest

LoadDefaultConfig loads the default CBO configuration, first checking for .pyscn.toml

func (*CBOConfigurationLoaderImpl) MergeConfig added in v1.4.0

func (cl *CBOConfigurationLoaderImpl) MergeConfig(base *domain.CBORequest, override *domain.CBORequest) *domain.CBORequest

MergeConfig merges CLI flags with configuration file

type CBOFormatterImpl

type CBOFormatterImpl struct{}

CBOFormatterImpl implements CBOOutputFormatter interface

func NewCBOFormatter

func NewCBOFormatter() *CBOFormatterImpl

NewCBOFormatter creates a new CBO output formatter

func (*CBOFormatterImpl) Format

func (f *CBOFormatterImpl) Format(response *domain.CBOResponse, format domain.OutputFormat) (string, error)

Format formats the CBO analysis response according to the specified format

func (*CBOFormatterImpl) Write

func (f *CBOFormatterImpl) Write(response *domain.CBOResponse, format domain.OutputFormat, writer io.Writer) error

Write writes the formatted output to the writer

type CBOServiceImpl

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

CBOServiceImpl implements the CBOService interface

func NewCBOService

func NewCBOService() *CBOServiceImpl

NewCBOService creates a new CBO service implementation

func (*CBOServiceImpl) Analyze

Analyze performs CBO analysis on multiple files

func (*CBOServiceImpl) AnalyzeFile

func (s *CBOServiceImpl) AnalyzeFile(ctx context.Context, filePath string, req domain.CBORequest) (*domain.CBOResponse, error)

AnalyzeFile analyzes a single Python file

func (*CBOServiceImpl) AnalyzeSnapshot added in v1.21.0

func (s *CBOServiceImpl) AnalyzeSnapshot(ctx context.Context, snapshot *ProjectSnapshot, req domain.CBORequest) (*domain.CBOResponse, error)

AnalyzeSnapshot performs CBO analysis using already parsed project files.

type CloneConfigurationLoader

type CloneConfigurationLoader struct{}

CloneConfigurationLoader implements the domain.CloneConfigurationLoader interface

func NewCloneConfigurationLoader

func NewCloneConfigurationLoader() *CloneConfigurationLoader

NewCloneConfigurationLoader creates a new clone configuration loader

func (*CloneConfigurationLoader) FindDefaultConfigFile

func (c *CloneConfigurationLoader) FindDefaultConfigFile(targetPath string) string

FindDefaultConfigFile discovers the config file governing targetPath.

func (*CloneConfigurationLoader) GetDefaultCloneConfig

func (c *CloneConfigurationLoader) GetDefaultCloneConfig(targetPath string) *domain.CloneRequest

GetDefaultCloneConfig returns clone detection configuration discovered from targetPath, or built-in defaults when no config file applies.

func (*CloneConfigurationLoader) LoadCloneConfig

func (c *CloneConfigurationLoader) LoadCloneConfig(configPath string) (*domain.CloneRequest, error)

LoadCloneConfig loads clone detection configuration from file using TOML-only strategy

func (*CloneConfigurationLoader) MergeConfig added in v1.16.0

MergeConfig merges request values over loaded clone configuration. Zero values (0, "", nil) in override mean "not set" and preserve the config-backed base value; any other value is an explicit override.

func (*CloneConfigurationLoader) SaveCloneConfig

func (c *CloneConfigurationLoader) SaveCloneConfig(cloneConfig *domain.CloneRequest, configPath string) error

SaveCloneConfig saves clone detection configuration to a TOML file

type CloneHTMLData

type CloneHTMLData struct {
	OverallScore OverallScoreData      `json:"overall_score"`
	Response     *domain.CloneResponse `json:"response"`
	ScoreDetails ScoreData             `json:"score_details"`
}

CloneHTMLData represents clone detection data for HTML template

type CloneOutputFormatter

type CloneOutputFormatter struct{}

CloneOutputFormatter implements the domain.CloneOutputFormatter interface

func NewCloneOutputFormatter

func NewCloneOutputFormatter() *CloneOutputFormatter

NewCloneOutputFormatter creates a new clone output formatter

func (*CloneOutputFormatter) FormatCloneResponse

func (f *CloneOutputFormatter) FormatCloneResponse(response *domain.CloneResponse, format domain.OutputFormat, writer io.Writer) error

FormatCloneResponse formats a clone response according to the specified format

func (*CloneOutputFormatter) FormatCloneStatistics

func (f *CloneOutputFormatter) FormatCloneStatistics(stats *domain.CloneStatistics, format domain.OutputFormat, writer io.Writer) error

FormatCloneStatistics formats clone statistics

type CloneService

type CloneService struct {
}

CloneService implements the domain.CloneService interface

func NewCloneService

func NewCloneService() *CloneService

NewCloneService creates a new clone service

func (*CloneService) AnalyzeSnapshot added in v1.30.0

func (s *CloneService) AnalyzeSnapshot(ctx context.Context, snapshot *ProjectSnapshot, req *domain.CloneRequest) (*domain.CloneResponse, error)

AnalyzeSnapshot performs clone detection from source captured by a project snapshot.

func (*CloneService) ComputeSimilarity

func (s *CloneService) ComputeSimilarity(ctx context.Context, fragment1, fragment2 string) (float64, error)

ComputeSimilarity computes similarity between two code fragments

func (*CloneService) DetectClones

func (s *CloneService) DetectClones(ctx context.Context, req *domain.CloneRequest) (*domain.CloneResponse, error)

DetectClones performs clone detection on the given request

func (*CloneService) DetectClonesInFiles

func (s *CloneService) DetectClonesInFiles(ctx context.Context, filePaths []string, req *domain.CloneRequest) (*domain.CloneResponse, error)

DetectClonesInFiles performs clone detection on specific files

type CommunityAnalysisServiceImpl added in v1.25.0

type CommunityAnalysisServiceImpl struct{}

CommunityAnalysisServiceImpl implements domain.CommunityAnalysisService.

func NewCommunityAnalysisService added in v1.25.0

func NewCommunityAnalysisService() *CommunityAnalysisServiceImpl

NewCommunityAnalysisService creates a new community analysis service.

func (*CommunityAnalysisServiceImpl) Analyze added in v1.25.0

Analyze performs community detection over the module dependency graph.

func (*CommunityAnalysisServiceImpl) AnalyzeGraph added in v1.30.0

AnalyzeGraph performs community detection over a caller-owned dependency graph.

type CommunityConfigurationLoaderImpl added in v1.25.0

type CommunityConfigurationLoaderImpl struct{}

CommunityConfigurationLoaderImpl implements domain.CommunityConfigurationLoader.

func NewCommunityConfigurationLoader added in v1.25.0

func NewCommunityConfigurationLoader() *CommunityConfigurationLoaderImpl

NewCommunityConfigurationLoader creates a new community configuration loader.

func (*CommunityConfigurationLoaderImpl) FindDefaultConfigFile added in v1.25.0

func (cl *CommunityConfigurationLoaderImpl) FindDefaultConfigFile(targetPath string) string

FindDefaultConfigFile discovers the config file governing targetPath.

func (*CommunityConfigurationLoaderImpl) LoadConfig added in v1.25.0

LoadConfig loads community configuration from the specified path.

func (*CommunityConfigurationLoaderImpl) LoadDefaultConfig added in v1.25.0

func (cl *CommunityConfigurationLoaderImpl) LoadDefaultConfig(targetPath string) *domain.CommunityAnalysisRequest

LoadDefaultConfig loads the default community configuration, checking for project config first.

func (*CommunityConfigurationLoaderImpl) MergeConfig added in v1.25.0

MergeConfig merges configuration file values with request overrides.

type CommunityFormatter added in v1.25.0

type CommunityFormatter struct{}

CommunityFormatter formats community analysis results for output.

func NewCommunityFormatter added in v1.25.0

func NewCommunityFormatter() *CommunityFormatter

NewCommunityFormatter creates a community analysis formatter.

func (*CommunityFormatter) Format added in v1.25.0

Format formats community analysis results according to the requested output format.

func (*CommunityFormatter) Write added in v1.25.0

func (f *CommunityFormatter) Write(response *domain.CommunityAnalysisResult, format domain.OutputFormat, writer io.Writer) error

Write formats and writes community analysis output.

type ComplexityHTMLData

type ComplexityHTMLData struct {
	OverallScore OverallScoreData           `json:"overall_score"`
	Response     *domain.ComplexityResponse `json:"response"`
	ScoreDetails ScoreData                  `json:"score_details"`
}

ComplexityHTMLData represents complexity analysis data for HTML template

type ComplexityServiceImpl

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

ComplexityServiceImpl implements the ComplexityService interface

func NewComplexityService

func NewComplexityService() *ComplexityServiceImpl

NewComplexityService creates a new complexity service implementation

func (*ComplexityServiceImpl) Analyze

Analyze performs complexity analysis on multiple files

func (*ComplexityServiceImpl) AnalyzeFile

AnalyzeFile analyzes a single Python file

func (*ComplexityServiceImpl) AnalyzeSnapshot added in v1.21.0

AnalyzeSnapshot performs complexity analysis using already parsed project files.

type ConfigurationLoaderImpl

type ConfigurationLoaderImpl struct{}

ConfigurationLoaderImpl implements the ConfigurationLoader interface

func NewConfigurationLoader

func NewConfigurationLoader() *ConfigurationLoaderImpl

NewConfigurationLoader creates a new configuration loader service

func (*ConfigurationLoaderImpl) CreateConfigTemplate

func (c *ConfigurationLoaderImpl) CreateConfigTemplate(path string) error

CreateConfigTemplate creates a template configuration file

func (*ConfigurationLoaderImpl) FindDefaultConfigFile

func (c *ConfigurationLoaderImpl) FindDefaultConfigFile(targetPath string) string

FindDefaultConfigFile discovers the config file governing targetPath.

func (*ConfigurationLoaderImpl) GetDefaultThresholds

func (c *ConfigurationLoaderImpl) GetDefaultThresholds() (low, medium int)

GetDefaultThresholds returns the default complexity thresholds

func (*ConfigurationLoaderImpl) LoadConfig

LoadConfig loads configuration from the specified path

func (*ConfigurationLoaderImpl) LoadDefaultConfig

func (c *ConfigurationLoaderImpl) LoadDefaultConfig(targetPath string) *domain.ComplexityRequest

LoadDefaultConfig loads the default configuration, first checking for .pyscn.toml

func (*ConfigurationLoaderImpl) MergeConfig

MergeConfig merges CLI flags with configuration file

func (*ConfigurationLoaderImpl) ValidateConfig

func (c *ConfigurationLoaderImpl) ValidateConfig(req *domain.ComplexityRequest) error

ValidateConfig validates a configuration request

type DIAntipatternConfigurationLoaderImpl added in v1.16.0

type DIAntipatternConfigurationLoaderImpl struct{}

DIAntipatternConfigurationLoaderImpl implements the DIAntipatternConfigurationLoader interface

func NewDIAntipatternConfigurationLoader added in v1.16.0

func NewDIAntipatternConfigurationLoader() *DIAntipatternConfigurationLoaderImpl

NewDIAntipatternConfigurationLoader creates a new DI anti-pattern configuration loader service

func (*DIAntipatternConfigurationLoaderImpl) FindDefaultConfigFile added in v1.16.0

func (cl *DIAntipatternConfigurationLoaderImpl) FindDefaultConfigFile(targetPath string) string

FindDefaultConfigFile discovers the config file governing targetPath.

func (*DIAntipatternConfigurationLoaderImpl) LoadConfig added in v1.16.0

LoadConfig loads DI anti-pattern configuration from the specified path using TOML-only strategy

func (*DIAntipatternConfigurationLoaderImpl) LoadDefaultConfig added in v1.16.0

func (cl *DIAntipatternConfigurationLoaderImpl) LoadDefaultConfig(targetPath string) *domain.DIAntipatternRequest

LoadDefaultConfig loads the default DI anti-pattern configuration, first checking for .pyscn.toml

func (*DIAntipatternConfigurationLoaderImpl) MergeConfig added in v1.16.0

MergeConfig merges CLI flags with configuration file

type DIAntipatternFormatter added in v1.16.0

type DIAntipatternFormatter struct{}

DIAntipatternFormatter implements the DIAntipatternOutputFormatter interface

func NewDIAntipatternFormatter added in v1.16.0

func NewDIAntipatternFormatter() *DIAntipatternFormatter

NewDIAntipatternFormatter creates a new DI anti-pattern formatter

func (*DIAntipatternFormatter) Format added in v1.16.0

Format formats the analysis response according to the specified format

func (*DIAntipatternFormatter) Write added in v1.16.0

Write writes the formatted output to the writer

type DIAntipatternServiceImpl added in v1.16.0

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

DIAntipatternServiceImpl implements the DIAntipatternService interface

func NewDIAntipatternService added in v1.16.0

func NewDIAntipatternService() *DIAntipatternServiceImpl

NewDIAntipatternService creates a new DI anti-pattern service

func (*DIAntipatternServiceImpl) Analyze added in v1.16.0

Analyze performs DI anti-pattern analysis on multiple files

func (*DIAntipatternServiceImpl) AnalyzeFile added in v1.16.0

AnalyzeFile analyzes a single Python file

func (*DIAntipatternServiceImpl) AnalyzeSnapshot added in v1.30.0

AnalyzeSnapshot performs DI analysis from the canonical parsed project.

type DeadCodeConfigurationLoaderImpl

type DeadCodeConfigurationLoaderImpl struct{}

DeadCodeConfigurationLoaderImpl implements the DeadCodeConfigurationLoader interface

func NewDeadCodeConfigurationLoader

func NewDeadCodeConfigurationLoader() *DeadCodeConfigurationLoaderImpl

NewDeadCodeConfigurationLoader creates a new dead code configuration loader service

func (*DeadCodeConfigurationLoaderImpl) FindDefaultConfigFile

func (cl *DeadCodeConfigurationLoaderImpl) FindDefaultConfigFile(targetPath string) string

FindDefaultConfigFile discovers the config file governing targetPath.

func (*DeadCodeConfigurationLoaderImpl) LoadConfig

LoadConfig loads dead code configuration from the specified path using TOML-only strategy

func (*DeadCodeConfigurationLoaderImpl) LoadDefaultConfig

func (cl *DeadCodeConfigurationLoaderImpl) LoadDefaultConfig(targetPath string) *domain.DeadCodeRequest

LoadDefaultConfig loads the default dead code configuration, first checking for .pyscn.toml

func (*DeadCodeConfigurationLoaderImpl) MergeConfig

MergeConfig merges CLI flags with configuration file

func (*DeadCodeConfigurationLoaderImpl) SaveConfig

SaveConfig saves dead code configuration to a TOML file

func (*DeadCodeConfigurationLoaderImpl) ValidateConfig

ValidateConfig validates a dead code configuration

type DeadCodeFormatterImpl

type DeadCodeFormatterImpl struct{}

DeadCodeFormatterImpl implements the DeadCodeFormatter interface

func NewDeadCodeFormatter

func NewDeadCodeFormatter() *DeadCodeFormatterImpl

NewDeadCodeFormatter creates a new dead code formatter service

func (*DeadCodeFormatterImpl) Format

Format formats the dead code analysis response according to the specified format

func (*DeadCodeFormatterImpl) FormatFinding

func (f *DeadCodeFormatterImpl) FormatFinding(finding domain.DeadCodeFinding, format domain.OutputFormat) (string, error)

FormatFinding formats a single dead code finding

func (*DeadCodeFormatterImpl) Write

func (f *DeadCodeFormatterImpl) Write(response *domain.DeadCodeResponse, format domain.OutputFormat, writer io.Writer) error

Write writes the formatted dead code output to the writer

type DeadCodeHTMLData

type DeadCodeHTMLData struct {
	OverallScore OverallScoreData         `json:"overall_score"`
	Response     *domain.DeadCodeResponse `json:"response"`
	ScoreDetails ScoreData                `json:"score_details"`
}

DeadCodeHTMLData represents dead code analysis data for HTML template

type DeadCodeServiceImpl

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

DeadCodeServiceImpl implements the DeadCodeService interface

func NewDeadCodeService

func NewDeadCodeService() *DeadCodeServiceImpl

NewDeadCodeService creates a new dead code service implementation

func (*DeadCodeServiceImpl) Analyze

Analyze performs dead code analysis on multiple files

func (*DeadCodeServiceImpl) AnalyzeFile

func (s *DeadCodeServiceImpl) AnalyzeFile(ctx context.Context, filePath string, req domain.DeadCodeRequest) (*domain.FileDeadCode, error)

AnalyzeFile analyzes a single Python file for dead code

func (*DeadCodeServiceImpl) AnalyzeFunction

func (s *DeadCodeServiceImpl) AnalyzeFunction(ctx context.Context, functionCFG interface{}, req domain.DeadCodeRequest) (*domain.FunctionDeadCode, error)

AnalyzeFunction analyzes a single function for dead code

func (*DeadCodeServiceImpl) AnalyzeSnapshot added in v1.21.0

AnalyzeSnapshot performs dead code analysis using already parsed project files.

type ErrorCategorizerImpl

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

ErrorCategorizerImpl implements the ErrorCategorizer interface

func (*ErrorCategorizerImpl) Categorize

func (ec *ErrorCategorizerImpl) Categorize(err error) *domain.CategorizedError

Categorize determines the category of an error

func (*ErrorCategorizerImpl) GetRecoverySuggestions

func (ec *ErrorCategorizerImpl) GetRecoverySuggestions(category domain.ErrorCategory) []string

GetRecoverySuggestions returns recovery suggestions for an error category

type FileOutputWriter

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

FileOutputWriter writes reports to files or provided writers and optionally opens HTML in a browser.

func NewFileOutputWriter

func NewFileOutputWriter(status io.Writer) *FileOutputWriter

NewFileOutputWriter creates a new FileOutputWriter.

func (*FileOutputWriter) Write

func (w *FileOutputWriter) Write(writer io.Writer, outputPath string, format domain.OutputFormat, noOpen bool, writeFunc func(io.Writer) error) error

Write implements domain.ReportWriter.

type FileReaderImpl

type FileReaderImpl struct{}

FileReaderImpl implements the FileReader interface

func NewFileReader

func NewFileReader() *FileReaderImpl

NewFileReader creates a new file reader service

func (*FileReaderImpl) CollectPythonFiles

func (f *FileReaderImpl) CollectPythonFiles(paths []string, recursive bool, includePatterns, excludePatterns []string) ([]string, error)

CollectPythonFiles recursively finds all Python files in the given paths

func (*FileReaderImpl) FileExists

func (f *FileReaderImpl) FileExists(path string) (bool, error)

FileExists checks if a file exists

func (*FileReaderImpl) GetFileInfo

func (f *FileReaderImpl) GetFileInfo(path string) (os.FileInfo, error)

GetFileInfo provides additional information about a file

func (*FileReaderImpl) IsValidPythonFile

func (f *FileReaderImpl) IsValidPythonFile(path string) bool

IsValidPythonFile checks if a file is a valid Python file

func (*FileReaderImpl) ReadFile

func (f *FileReaderImpl) ReadFile(path string) ([]byte, error)

ReadFile reads the content of a file

func (*FileReaderImpl) ValidatePaths

func (f *FileReaderImpl) ValidatePaths(paths []string) error

ValidatePaths validates that all provided paths exist and are accessible

type FormatUtils

type FormatUtils struct{}

FormatUtils provides shared formatting utilities

func NewFormatUtils

func NewFormatUtils() *FormatUtils

NewFormatUtils creates a new format utilities instance

func (*FormatUtils) ConvertToStandardRisk

func (f *FormatUtils) ConvertToStandardRisk(risk string) RiskLevel

ConvertToStandardRisk converts various risk representations to standard format

func (*FormatUtils) FormatDuration

func (f *FormatUtils) FormatDuration(durationMs int64) string

FormatDuration formats duration in milliseconds consistently

func (*FormatUtils) FormatFileStats

func (f *FormatUtils) FormatFileStats(analyzed, total, skipped int) string

FormatFileStats creates standardized file statistics

func (*FormatUtils) FormatLabel

func (f *FormatUtils) FormatLabel(label string, value interface{}) string

FormatLabel creates a consistently formatted label with right alignment

func (*FormatUtils) FormatLabelWithIndent

func (f *FormatUtils) FormatLabelWithIndent(indent int, label string, value interface{}) string

FormatLabelWithIndent creates a formatted label with specific indentation

func (*FormatUtils) FormatMainHeader

func (f *FormatUtils) FormatMainHeader(title string) string

FormatMainHeader creates a standardized main header

func (*FormatUtils) FormatPercentage

func (f *FormatUtils) FormatPercentage(value float64) string

FormatPercentage formats a percentage value consistently

func (*FormatUtils) FormatRiskDistribution

func (f *FormatUtils) FormatRiskDistribution(high, medium, low int) string

FormatRiskDistribution creates a standardized risk distribution section

func (*FormatUtils) FormatRiskWithColor

func (f *FormatUtils) FormatRiskWithColor(risk RiskLevel) string

FormatRiskWithColor formats a risk level with appropriate color

func (*FormatUtils) FormatSectionHeader

func (f *FormatUtils) FormatSectionHeader(title string) string

FormatSectionHeader creates a standardized section header

func (*FormatUtils) FormatSectionSeparator

func (f *FormatUtils) FormatSectionSeparator() string

FormatSectionSeparator creates a section separator

func (*FormatUtils) FormatSummaryStats

func (f *FormatUtils) FormatSummaryStats(stats map[string]interface{}) string

FormatSummaryStats creates a standardized summary statistics section

func (*FormatUtils) FormatTableHeader

func (f *FormatUtils) FormatTableHeader(columns ...string) string

FormatTableHeader creates a table header with consistent formatting

func (*FormatUtils) FormatWarningsSection

func (f *FormatUtils) FormatWarningsSection(warnings []string) string

FormatWarningsSection creates a standardized warnings section

func (*FormatUtils) GetRiskColor

func (f *FormatUtils) GetRiskColor(risk RiskLevel) string

GetRiskColor returns the appropriate color for a risk level

type HTMLFormatterImpl

type HTMLFormatterImpl struct{}

HTMLFormatterImpl provides common HTML formatting functionality with Lighthouse-style scoring

func NewHTMLFormatter

func NewHTMLFormatter() *HTMLFormatterImpl

NewHTMLFormatter creates a new HTML formatter service

func (*HTMLFormatterImpl) CalculateCloneScore

func (f *HTMLFormatterImpl) CalculateCloneScore(response *domain.CloneResponse) ScoreData

CalculateCloneScore calculates a Lighthouse-style score for clone detection

func (*HTMLFormatterImpl) CalculateComplexityScore

func (f *HTMLFormatterImpl) CalculateComplexityScore(response *domain.ComplexityResponse) ScoreData

CalculateComplexityScore calculates a Lighthouse-style score (0-100) for complexity

func (*HTMLFormatterImpl) CalculateDeadCodeScore

func (f *HTMLFormatterImpl) CalculateDeadCodeScore(response *domain.DeadCodeResponse) ScoreData

CalculateDeadCodeScore calculates a Lighthouse-style score for dead code detection

func (*HTMLFormatterImpl) CalculateOverallScore

func (f *HTMLFormatterImpl) CalculateOverallScore(scores []ScoreData, projectName string) OverallScoreData

CalculateOverallScore calculates weighted average of all scores

func (*HTMLFormatterImpl) FormatCloneAsHTML

func (f *HTMLFormatterImpl) FormatCloneAsHTML(response *domain.CloneResponse, projectName string) (string, error)

FormatCloneAsHTML formats clone detection as HTML

func (*HTMLFormatterImpl) FormatComplexityAsHTML

func (f *HTMLFormatterImpl) FormatComplexityAsHTML(response *domain.ComplexityResponse, projectName string) (string, error)

FormatComplexityAsHTML formats complexity analysis as HTML

func (*HTMLFormatterImpl) FormatDeadCodeAsHTML

func (f *HTMLFormatterImpl) FormatDeadCodeAsHTML(response *domain.DeadCodeResponse, projectName string) (string, error)

FormatDeadCodeAsHTML formats dead code analysis as HTML

type HTMLTemplate

type HTMLTemplate struct {
	Title       string
	Subtitle    string
	GeneratedAt time.Time
	Version     string
	Duration    int64
	ScoreValue  int
	ScoreGrade  string
	ShowScore   bool
}

HTMLTemplate provides a standard HTML template for all reports

func (*HTMLTemplate) GenerateHTMLHeader

func (t *HTMLTemplate) GenerateHTMLHeader() string

GenerateHTMLHeader generates the standard HTML header with consistent styling

type LCOMConfigurationLoaderImpl added in v1.11.0

type LCOMConfigurationLoaderImpl struct{}

LCOMConfigurationLoaderImpl implements the LCOMConfigurationLoader interface

func NewLCOMConfigurationLoader added in v1.11.0

func NewLCOMConfigurationLoader() *LCOMConfigurationLoaderImpl

NewLCOMConfigurationLoader creates a new LCOM configuration loader service

func (*LCOMConfigurationLoaderImpl) FindDefaultConfigFile added in v1.11.0

func (cl *LCOMConfigurationLoaderImpl) FindDefaultConfigFile(targetPath string) string

FindDefaultConfigFile discovers the config file governing targetPath.

func (*LCOMConfigurationLoaderImpl) LoadConfig added in v1.11.0

func (cl *LCOMConfigurationLoaderImpl) LoadConfig(path string) (*domain.LCOMRequest, error)

LoadConfig loads LCOM configuration from the specified path using TOML-only strategy

func (*LCOMConfigurationLoaderImpl) LoadDefaultConfig added in v1.11.0

func (cl *LCOMConfigurationLoaderImpl) LoadDefaultConfig(targetPath string) *domain.LCOMRequest

LoadDefaultConfig loads the default LCOM configuration, first checking for .pyscn.toml

func (*LCOMConfigurationLoaderImpl) MergeConfig added in v1.11.0

MergeConfig merges CLI flags with configuration file

type LCOMFormatterImpl added in v1.11.0

type LCOMFormatterImpl struct{}

LCOMFormatterImpl implements LCOMOutputFormatter interface

func NewLCOMFormatter added in v1.11.0

func NewLCOMFormatter() *LCOMFormatterImpl

NewLCOMFormatter creates a new LCOM output formatter

func (*LCOMFormatterImpl) Format added in v1.11.0

func (f *LCOMFormatterImpl) Format(response *domain.LCOMResponse, format domain.OutputFormat) (string, error)

Format formats the LCOM analysis response according to the specified format

func (*LCOMFormatterImpl) Write added in v1.11.0

func (f *LCOMFormatterImpl) Write(response *domain.LCOMResponse, format domain.OutputFormat, writer io.Writer) error

Write writes the formatted output to the writer

type LCOMServiceImpl added in v1.11.0

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

LCOMServiceImpl implements the LCOMService interface

func NewLCOMService added in v1.11.0

func NewLCOMService() *LCOMServiceImpl

NewLCOMService creates a new LCOM service implementation

func (*LCOMServiceImpl) Analyze added in v1.11.0

Analyze performs LCOM analysis on multiple files

func (*LCOMServiceImpl) AnalyzeFile added in v1.11.0

func (s *LCOMServiceImpl) AnalyzeFile(ctx context.Context, filePath string, req domain.LCOMRequest) (*domain.LCOMResponse, error)

AnalyzeFile analyzes a single Python file

func (*LCOMServiceImpl) AnalyzeSnapshot added in v1.21.0

func (s *LCOMServiceImpl) AnalyzeSnapshot(ctx context.Context, snapshot *ProjectSnapshot, req domain.LCOMRequest) (*domain.LCOMResponse, error)

AnalyzeSnapshot performs LCOM analysis using already parsed project files.

type MockDataConfigurationLoaderImpl added in v1.7.0

type MockDataConfigurationLoaderImpl struct{}

MockDataConfigurationLoaderImpl implements the MockDataConfigurationLoader interface

func NewMockDataConfigurationLoader added in v1.7.0

func NewMockDataConfigurationLoader() *MockDataConfigurationLoaderImpl

NewMockDataConfigurationLoader creates a new mock data configuration loader service

func (*MockDataConfigurationLoaderImpl) FindDefaultConfigFile added in v1.7.0

func (cl *MockDataConfigurationLoaderImpl) FindDefaultConfigFile(targetPath string) string

FindDefaultConfigFile discovers the config file governing targetPath.

func (*MockDataConfigurationLoaderImpl) LoadConfig added in v1.7.0

LoadConfig loads mock data configuration from the specified path using TOML-only strategy

func (*MockDataConfigurationLoaderImpl) LoadDefaultConfig added in v1.7.0

func (cl *MockDataConfigurationLoaderImpl) LoadDefaultConfig(targetPath string) *domain.MockDataRequest

LoadDefaultConfig loads the default mock data configuration, first checking for .pyscn.toml

func (*MockDataConfigurationLoaderImpl) MergeConfig added in v1.7.0

MergeConfig merges CLI flags with configuration file

type MockDataFormatterImpl added in v1.7.0

type MockDataFormatterImpl struct{}

MockDataFormatterImpl implements the MockDataFormatter interface

func NewMockDataFormatter added in v1.7.0

func NewMockDataFormatter() *MockDataFormatterImpl

NewMockDataFormatter creates a new mock data formatter service

func (*MockDataFormatterImpl) Format added in v1.7.0

Format formats the mock data analysis response according to the specified format

func (*MockDataFormatterImpl) Write added in v1.7.0

func (f *MockDataFormatterImpl) Write(response *domain.MockDataResponse, format domain.OutputFormat, writer io.Writer) error

Write writes the formatted mock data output to the writer

type MockDataServiceImpl added in v1.7.0

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

MockDataServiceImpl implements the MockDataService interface

func NewMockDataService added in v1.7.0

func NewMockDataService() *MockDataServiceImpl

NewMockDataService creates a new mock data service implementation

func NewMockDataServiceWithConfig added in v1.7.0

func NewMockDataServiceWithConfig(keywords, domains []string) *MockDataServiceImpl

NewMockDataServiceWithConfig creates a mock data service with custom configuration

func (*MockDataServiceImpl) Analyze added in v1.7.0

Analyze performs mock data analysis on multiple files

func (*MockDataServiceImpl) AnalyzeFile added in v1.7.0

func (s *MockDataServiceImpl) AnalyzeFile(ctx context.Context, filePath string, req domain.MockDataRequest) (*domain.FileMockData, error)

AnalyzeFile analyzes a single Python file for mock data

func (*MockDataServiceImpl) AnalyzeSnapshot added in v1.30.0

AnalyzeSnapshot performs mock-data detection from the canonical parsed project without rereading or reparsing source files.

type OutputFormatResolver

type OutputFormatResolver struct{}

OutputFormatResolver resolves output format and file extension selections.

func NewOutputFormatResolver

func NewOutputFormatResolver() *OutputFormatResolver

NewOutputFormatResolver creates an output format resolver.

func (*OutputFormatResolver) Determine

func (r *OutputFormatResolver) Determine(html, json, csv, yaml bool) (domain.OutputFormat, string, error)

Determine preserves the original four-flag resolver contract. With no selection it returns text output without a file extension.

func (*OutputFormatResolver) DetermineAnalyzeReport added in v1.29.0

func (r *OutputFormatResolver) DetermineAnalyzeReport(html, json, csv, yaml, text bool) (domain.OutputFormat, string, error)

DetermineAnalyzeReport resolves the five analyze report flags. With no selection it returns the command's default HTML report.

type OutputFormatterImpl

type OutputFormatterImpl struct{}

OutputFormatterImpl implements the OutputFormatter interface

func NewOutputFormatter

func NewOutputFormatter() *OutputFormatterImpl

NewOutputFormatter creates a new output formatter service

func (*OutputFormatterImpl) Format

Format formats the analysis response according to the specified format

func (*OutputFormatterImpl) FormatSummaryOnly

func (f *OutputFormatterImpl) FormatSummaryOnly(response *domain.ComplexityResponse, format domain.OutputFormat) (string, error)

FormatSummaryOnly formats only the summary information

func (*OutputFormatterImpl) Write

func (f *OutputFormatterImpl) Write(response *domain.ComplexityResponse, format domain.OutputFormat, writer io.Writer) error

Write writes the formatted output to the writer

type OverallScoreData

type OverallScoreData struct {
	Score       int         `json:"score"`
	Color       string      `json:"color"`
	Status      string      `json:"status"`
	Breakdown   []ScoreData `json:"breakdown"`
	ProjectName string      `json:"project_name"`
	Timestamp   string      `json:"timestamp"`
}

OverallScoreData represents the combined score information

type ParallelExecutorImpl

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

ParallelExecutorImpl implements the ParallelExecutor interface

func (*ParallelExecutorImpl) Execute

func (pe *ParallelExecutorImpl) Execute(ctx context.Context, tasks []domain.ExecutableTask) error

Execute runs tasks in parallel with the given configuration

func (*ParallelExecutorImpl) SetMaxConcurrency

func (pe *ParallelExecutorImpl) SetMaxConcurrency(max int)

SetMaxConcurrency sets the maximum number of concurrent tasks

func (*ParallelExecutorImpl) SetTimeout

func (pe *ParallelExecutorImpl) SetTimeout(timeout time.Duration)

SetTimeout sets the timeout for all tasks

type ProgressManagerImpl

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

ProgressManagerImpl implements the ProgressManager interface

func (*ProgressManagerImpl) Close

func (pm *ProgressManagerImpl) Close()

Close cleans up any resources

func (*ProgressManagerImpl) Complete

func (pm *ProgressManagerImpl) Complete(success bool)

Complete marks the progress as completed (finishes the progress bar)

func (*ProgressManagerImpl) Initialize

func (pm *ProgressManagerImpl) Initialize(maxValue int)

Initialize sets up progress tracking with the maximum value

func (*ProgressManagerImpl) IsInteractive

func (pm *ProgressManagerImpl) IsInteractive() bool

IsInteractive returns true if progress bars should be shown

func (*ProgressManagerImpl) SetWriter

func (pm *ProgressManagerImpl) SetWriter(writer io.Writer)

SetWriter sets the output writer for progress bars

func (*ProgressManagerImpl) Start

func (pm *ProgressManagerImpl) Start()

Start starts the progress bar

func (*ProgressManagerImpl) Update

func (pm *ProgressManagerImpl) Update(processed, total int)

Update updates the progress

type ProjectFile added in v1.21.0

type ProjectFile struct {
	Path       string
	AST        *parser.Node
	RawMetrics *analyzer.RawMetricsResult
	ReadErr    error
	ParseErr   error
	// contains filtered or unexported fields
}

ProjectFile stores one Python file after read and parse.

func (*ProjectFile) CFGs added in v1.21.0

CFGs builds CFGs once and shares them across CFG-backed analyzers.

func (*ProjectFile) Parsed added in v1.21.0

func (f *ProjectFile) Parsed() bool

Parsed reports whether the file has a valid parsed AST.

type ProjectModuleGraph added in v1.30.0

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

ProjectModuleGraph is an owned graph projection of a project snapshot. Its analyzer representation remains private to the service layer.

func (*ProjectModuleGraph) Clone added in v1.30.0

Clone returns an independent graph for one analyzer to consume.

type ProjectSnapshot added in v1.21.0

type ProjectSnapshot struct {
	Files []*ProjectFile
	// contains filtered or unexported fields
}

ProjectSnapshot stores the parsed source needed by multiple analyzers.

func BuildAnalysisProjectSnapshot added in v1.30.0

func BuildAnalysisProjectSnapshot(ctx context.Context, analysisPaths, modulePaths []string, options ProjectSnapshotOptions) *ProjectSnapshot

BuildAnalysisProjectSnapshot captures the implementation and importable module surfaces once while retaining their distinct analyzer scopes.

func BuildProjectSnapshot added in v1.21.0

func BuildProjectSnapshot(ctx context.Context, paths []string) *ProjectSnapshot

BuildProjectSnapshot reads and parses each file once for the full analyze command.

func BuildProjectSnapshotWithOptions added in v1.21.0

func BuildProjectSnapshotWithOptions(ctx context.Context, paths []string, options ProjectSnapshotOptions) *ProjectSnapshot

BuildProjectSnapshotWithOptions reads and parses each file once with analyzer-scoped caches.

func (*ProjectSnapshot) BuildDependencyGraph added in v1.30.0

func (s *ProjectSnapshot) BuildDependencyGraph(ctx context.Context, graphOptions *domain.ModuleGraphOptions) (*ProjectModuleGraph, error)

BuildDependencyGraph projects the snapshot's successfully parsed files into a new dependency graph. The returned graph is owned by the caller.

func (*ProjectSnapshot) Coverage added in v1.30.0

func (s *ProjectSnapshot) Coverage() domain.AnalysisCoverage

Coverage reports project-wide read and parse coverage from the snapshot.

func (*ProjectSnapshot) FileProjections added in v1.30.0

func (s *ProjectSnapshot) FileProjections() []*ProjectFile

FileProjections returns independent copies of the captured project files.

func (*ProjectSnapshot) ModuleCoverage added in v1.30.0

func (s *ProjectSnapshot) ModuleCoverage() domain.AnalysisCoverage

ModuleCoverage reports read and parse coverage for every file that defines the captured dependency-graph surface, including stub-only modules.

func (*ProjectSnapshot) Paths added in v1.21.0

func (s *ProjectSnapshot) Paths() []string

Paths returns the file paths represented by the snapshot.

type ProjectSnapshotOptions added in v1.21.0

type ProjectSnapshotOptions struct {
	IncludeRawMetrics bool
	ProjectRoot       string
}

ProjectSnapshotOptions controls which optional per-file analysis caches are built.

type RiskLevel

type RiskLevel string

RiskLevel represents the standard risk levels across all tools

const (
	RiskHigh   RiskLevel = "High"
	RiskMedium RiskLevel = "Medium"
	RiskLow    RiskLevel = "Low"
)

type ScoreData

type ScoreData struct {
	Score    int    `json:"score"`
	Label    string `json:"label"`
	Color    string `json:"color"`
	Status   string `json:"status"`
	Category string `json:"category"`
}

ScoreData represents scoring information for HTML output

type SimpleTask

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

SimpleTask is a basic implementation of ExecutableTask

func (*SimpleTask) Execute

func (t *SimpleTask) Execute(ctx context.Context) (interface{}, error)

Execute runs the task and returns the result

func (*SimpleTask) IsEnabled

func (t *SimpleTask) IsEnabled() bool

IsEnabled returns whether the task should be executed

func (*SimpleTask) Name

func (t *SimpleTask) Name() string

Name returns the name of the task

type SystemAnalysisConfigurationLoaderImpl

type SystemAnalysisConfigurationLoaderImpl struct{}

SystemAnalysisConfigurationLoaderImpl implements the SystemAnalysisConfigurationLoader interface

func NewSystemAnalysisConfigurationLoader

func NewSystemAnalysisConfigurationLoader() *SystemAnalysisConfigurationLoaderImpl

NewSystemAnalysisConfigurationLoader creates a new system analysis configuration loader

func (*SystemAnalysisConfigurationLoaderImpl) LoadConfig

LoadConfig loads configuration from the specified path using the shared TomlConfigLoader

func (*SystemAnalysisConfigurationLoaderImpl) LoadDefaultConfig

func (cl *SystemAnalysisConfigurationLoaderImpl) LoadDefaultConfig(targetPath string) *domain.SystemAnalysisRequest

LoadDefaultConfig returns the built-in defaults. System analysis config is resolved by the caller, so there is nothing to discover from targetPath.

func (*SystemAnalysisConfigurationLoaderImpl) MergeConfig

MergeConfig merges CLI flags with configuration file

type SystemAnalysisConfigurationLoaderWithFlags

type SystemAnalysisConfigurationLoaderWithFlags struct {
	*SystemAnalysisConfigurationLoaderImpl
}

SystemAnalysisConfigurationLoaderWithFlags extends the base loader with CLI flag integration

func NewSystemAnalysisConfigurationLoaderWithFlags

func NewSystemAnalysisConfigurationLoaderWithFlags() *SystemAnalysisConfigurationLoaderWithFlags

NewSystemAnalysisConfigurationLoaderWithFlags creates a configuration loader that integrates CLI flags

func (*SystemAnalysisConfigurationLoaderWithFlags) LoadConfigWithFlags

LoadConfigWithFlags loads configuration and merges with CLI flags

type SystemAnalysisFormatterImpl

type SystemAnalysisFormatterImpl struct{}

SystemAnalysisFormatterImpl implements the SystemAnalysisOutputFormatter interface

func NewSystemAnalysisFormatter

func NewSystemAnalysisFormatter() *SystemAnalysisFormatterImpl

NewSystemAnalysisFormatter creates a new system analysis output formatter

func (*SystemAnalysisFormatterImpl) Format

Format formats the system analysis response according to the specified format

func (*SystemAnalysisFormatterImpl) Write

Write writes the formatted output to the writer

type SystemAnalysisServiceImpl

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

SystemAnalysisServiceImpl implements the SystemAnalysisService interface

func NewSystemAnalysisService

func NewSystemAnalysisService() *SystemAnalysisServiceImpl

NewSystemAnalysisService creates a new system analysis service implementation

func (*SystemAnalysisServiceImpl) Analyze

Analyze performs comprehensive system analysis including dependencies, architecture, and quality metrics

func (*SystemAnalysisServiceImpl) AnalyzeArchitecture

AnalyzeArchitecture performs architecture validation only

func (*SystemAnalysisServiceImpl) AnalyzeDependencies

AnalyzeDependencies performs dependency analysis only

func (*SystemAnalysisServiceImpl) AnalyzeGraph added in v1.30.0

AnalyzeGraph performs system analysis over a caller-owned dependency graph.

func (*SystemAnalysisServiceImpl) BuildModuleLayerMap added in v1.25.0

func (s *SystemAnalysisServiceImpl) BuildModuleLayerMap(graph *analyzer.DependencyGraph, rules *domain.ArchitectureRules) map[string]string

BuildModuleLayerMap maps each module to a layer based on ArchitectureRules.

func (*SystemAnalysisServiceImpl) ResolveArchitectureRules added in v1.25.0

ResolveArchitectureRules returns resolved architecture rules with style presets applied.

Jump to

Keyboard shortcuts

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