Cli

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AskUserToSelectFile

func AskUserToSelectFile() []string

func DecorateMaintainabilityIndex

func DecorateMaintainabilityIndex(mi int, analyze *pb.Analyze) string

func Round

func Round(num float64) int

func StyleChoices

func StyleChoices(text string) lipgloss.Style

func StyleCommand

func StyleCommand(text string) lipgloss.Style

func StyleHelp

func StyleHelp(text string) lipgloss.Style

func StyleHowToQuit added in v0.16.0

func StyleHowToQuit(text string) lipgloss.Style

func StyleNumberBox

func StyleNumberBox(number string, label string, sublabel string) lipgloss.Style

func StyleScreen

func StyleScreen(text string) lipgloss.Style

func StyleSubTitle

func StyleSubTitle(text string) lipgloss.Style

func StyleTitle

func StyleTitle(text string) lipgloss.Style

func StyleUrl

func StyleUrl(text string) lipgloss.Style

func ToFixed

func ToFixed(num float64, precision int) float64

Types

type Component

type Component interface {

	// Returns the content of the component
	Render() string

	// Updates attached model
	Update(msg tea.Msg)
}

type ComponentFileTable

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

func NewComponentFileTable

func NewComponentFileTable(isInteractive bool, files []*pb.File) *ComponentFileTable

func (*ComponentFileTable) Init

func (v *ComponentFileTable) Init()

func (*ComponentFileTable) Render

func (v *ComponentFileTable) Render() string

func (*ComponentFileTable) Sort

func (v *ComponentFileTable) Sort(sortColumnIndex int)

func (*ComponentFileTable) SortByCommits

func (v *ComponentFileTable) SortByCommits()

func (*ComponentFileTable) SortByCyclomaticComplexity

func (v *ComponentFileTable) SortByCyclomaticComplexity()

func (*ComponentFileTable) SortByLoc

func (v *ComponentFileTable) SortByLoc()

func (*ComponentFileTable) SortByName

func (v *ComponentFileTable) SortByName()

func (*ComponentFileTable) SortByRisk

func (v *ComponentFileTable) SortByRisk()

func (*ComponentFileTable) Update

func (v *ComponentFileTable) Update(msg tea.Msg)

type ComponentSearch

type ComponentSearch struct {
	Expression string
	// contains filtered or unexported fields
}

func NewComponentSearch

func NewComponentSearch(expression string) *ComponentSearch

func (*ComponentSearch) HasSearch

func (v *ComponentSearch) HasSearch() bool

func (*ComponentSearch) IsEnabled

func (v *ComponentSearch) IsEnabled() bool

func (*ComponentSearch) Match

func (v *ComponentSearch) Match(value string) bool

func (*ComponentSearch) Render

func (v *ComponentSearch) Render() string

func (*ComponentSearch) Toggle

func (v *ComponentSearch) Toggle(expression string)

func (*ComponentSearch) Update

func (v *ComponentSearch) Update(msg tea.Msg)

type ComponentStatisticsOverview

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

func NewComponentStatisticsOverview

func NewComponentStatisticsOverview(files []*pb.File, aggregated Analyzer.Aggregated) *ComponentStatisticsOverview

func (*ComponentStatisticsOverview) Render

func (v *ComponentStatisticsOverview) Render() string

func (*ComponentStatisticsOverview) Update

func (v *ComponentStatisticsOverview) Update(msg tea.Msg)

type ComponentTableClass

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

func NewComponentTableClass

func NewComponentTableClass(isInteractive bool, files []*pb.File) *ComponentTableClass

func (*ComponentTableClass) Init

func (v *ComponentTableClass) Init()

func (*ComponentTableClass) Render

func (v *ComponentTableClass) Render() string

func (*ComponentTableClass) Sort

func (v *ComponentTableClass) Sort(sortColumnIndex int)

func (*ComponentTableClass) SortByCyclomaticComplexity

func (v *ComponentTableClass) SortByCyclomaticComplexity()

func (*ComponentTableClass) SortByLloc

func (v *ComponentTableClass) SortByLloc()

func (*ComponentTableClass) SortByMaintainabilityIndex

func (v *ComponentTableClass) SortByMaintainabilityIndex()

func (*ComponentTableClass) SortByName

func (v *ComponentTableClass) SortByName()

func (*ComponentTableClass) SortByNumberOfMethods

func (v *ComponentTableClass) SortByNumberOfMethods()

func (*ComponentTableClass) Update

func (v *ComponentTableClass) Update(msg tea.Msg)

type DoRefreshModel

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

type Screen

type Screen interface {

	// Returns the Tea model used for the screen
	GetModel() tea.Model

	// Returns the name of the screen
	GetScreenName() string

	Reset(files []*pb.File, projectAggregated Analyzer.ProjectAggregated)
}

type ScreenByProgrammingLanguage

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

func (ScreenByProgrammingLanguage) GetModel

func (v ScreenByProgrammingLanguage) GetModel() tea.Model

func (ScreenByProgrammingLanguage) GetScreenName

func (v ScreenByProgrammingLanguage) GetScreenName() string

func (*ScreenByProgrammingLanguage) Reset

func (v *ScreenByProgrammingLanguage) Reset(files []*pb.File, projectAggregated Analyzer.ProjectAggregated)

type ScreenHome

type ScreenHome struct {

	// watchers
	FileWatcher *fsnotify.Watcher
	// contains filtered or unexported fields
}

ScreenHome is the home view

func NewScreenHome

func NewScreenHome(isInteractive bool, files []*pb.File, projectAggregated Analyzer.ProjectAggregated) *ScreenHome

NewScreenHome creates a new ScreenHome

func (ScreenHome) GetModel

func (r ScreenHome) GetModel() modelChoices

Get Tea model

func (*ScreenHome) Render

func (r *ScreenHome) Render()

Render renders the home view and runs the Tea program

func (*ScreenHome) Reset

func (r *ScreenHome) Reset(files []*pb.File, projectAggregated Analyzer.ProjectAggregated)

type ScreenHtmlReport added in v0.16.0

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

func NewScreenHtmlReport added in v0.16.0

func NewScreenHtmlReport(isInteractive bool, files []*pb.File, projectAggregated Analyzer.ProjectAggregated) ScreenHtmlReport

func (ScreenHtmlReport) GetModel added in v0.16.0

func (v ScreenHtmlReport) GetModel() tea.Model

func (ScreenHtmlReport) GetScreenName added in v0.16.0

func (v ScreenHtmlReport) GetScreenName() string

func (*ScreenHtmlReport) Reset added in v0.16.0

func (m *ScreenHtmlReport) Reset(files []*pb.File, projectAggregated Analyzer.ProjectAggregated)

type ScreenRisks

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

func NewScreenRisks

func NewScreenRisks(isInteractive bool, files []*pb.File, projectAggregated Analyzer.ProjectAggregated) ScreenRisks

func (ScreenRisks) GetModel

func (v ScreenRisks) GetModel() tea.Model

func (ScreenRisks) GetScreenName

func (v ScreenRisks) GetScreenName() string

func (*ScreenRisks) Reset

func (v *ScreenRisks) Reset(files []*pb.File, projectAggregated Analyzer.ProjectAggregated)

type ScreenSummary

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

func NewScreenSummary

func NewScreenSummary(isInteractive bool, files []*pb.File, projectAggregated Analyzer.ProjectAggregated) ScreenSummary

func (ScreenSummary) GetModel

func (v ScreenSummary) GetModel() tea.Model

func (ScreenSummary) GetScreenName

func (v ScreenSummary) GetScreenName() string

func (*ScreenSummary) Reset

func (m *ScreenSummary) Reset(files []*pb.File, projectAggregated Analyzer.ProjectAggregated)

type ScreenTableClass

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

func NewScreenTableClass

func NewScreenTableClass(isInteractive bool, files []*pb.File, projectAggregated Analyzer.ProjectAggregated) ScreenTableClass

func (ScreenTableClass) GetModel

func (v ScreenTableClass) GetModel() tea.Model

func (ScreenTableClass) GetScreenName

func (v ScreenTableClass) GetScreenName() string

func (*ScreenTableClass) Reset

func (v *ScreenTableClass) Reset(files []*pb.File, projectAggregated Analyzer.ProjectAggregated)

Jump to

Keyboard shortcuts

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