cmd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// VendorDirPrefix is the vendor directory prefix for exclusion.
	VendorDirPrefix = "vendor" + string(filepath.Separator)
	// VendorDirInPath is the vendor directory marker when it appears in a path.
	VendorDirInPath = string(filepath.Separator) + VendorDirPrefix
	// DSStoreFile is the macOS Finder metadata file that should always be excluded.
	DSStoreFile = ".DS_Store"
	// GitDirPrefix is the Git directory prefix for exclusion.
	GitDirPrefix = ".git" + string(filepath.Separator)
	// GitDirInPath is the Git directory marker when it appears in a path.
	GitDirInPath = string(filepath.Separator) + GitDirPrefix
	// NodeModulesDirPrefix is the node_modules directory prefix for exclusion.
	NodeModulesDirPrefix = "node_modules" + string(filepath.Separator)
	// NodeModulesDirInPath is the node_modules directory marker when it appears in a path.
	NodeModulesDirInPath = string(filepath.Separator) + NodeModulesDirPrefix
)

Directory exclusion constants.

Variables

View Source
var (
	Version = "dev"     //nolint:gochecknoglobals // Build-time variables meant to be overridden
	Commit  = "unknown" //nolint:gochecknoglobals
	Date    = "unknown" //nolint:gochecknoglobals
)

Version information - can be overridden during build.

Functions

func AddFlags

func AddFlags(rootCmd *cobra.Command)

AddFlags adds all flags to the root command.

func BuildConfigFromFlags

func BuildConfigFromFlags(cmd *cobra.Command, args []string) (*config.Config, error)

BuildConfigFromFlags extracts flag values and builds a merged configuration. This function handles the common config-building logic shared between run and stats commands.

func GetBuildDate

func GetBuildDate() string

GetBuildDate returns build date.

func GetCommit

func GetCommit() string

GetCommit returns commit hash.

func GetVersion

func GetVersion() string

GetVersion returns version information including build info.

func NewRootCommand

func NewRootCommand() *cobra.Command

NewRootCommand creates the root Cobra command.

func NewStatsCommand

func NewStatsCommand() *cobra.Command

NewStatsCommand creates the stats command.

func PrintVersion

func PrintVersion()

PrintVersion prints version information.

Types

type CrawlOptions

type CrawlOptions struct {
	Filter          *gogenfilter.Filter
	IncludeVendor   bool
	IncludeNodeMods bool
	FileCheck       fileCheckFunc
	FChan           chan string
}

CrawlOptions contains the common options for crawling operations.

type FlagValues

type FlagValues struct {
	ConfigFile         string
	Vendor             bool
	Verbose            bool
	Threshold          int
	Files              bool
	Profile            bool
	FilterGenerated    bool
	IncludeSQLC        bool
	IncludeTempl       bool
	IncludeProtobuf    bool
	IncludeMockgen     bool
	IncludeStringer    bool
	IncludePatterns    []string
	ExcludePatterns    []string
	Semantic           bool
	Structural         bool
	Paths              []string
	DetectionMethods   string
	Timeout            string
	IncludeNodeModules bool
	Only               string
	Incremental        bool
	Since              string
	CacheDir           string
	ClearCache         bool
	Workers            int
	DiffMode           string
}

FlagValues holds the extracted flag values needed for config building.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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