project

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package project provides a general-purpose project analyzer command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunDeps

func RunDeps(w io.Writer, args []string, opts Options) error

RunDeps runs the dependency analysis subcommand.

func RunDocs

func RunDocs(w io.Writer, args []string, opts Options) error

RunDocs runs the documentation check subcommand.

func RunGit

func RunGit(w io.Writer, args []string, opts Options) error

RunGit runs the git info subcommand.

func RunHealth

func RunHealth(w io.Writer, args []string, opts Options) error

RunHealth runs the health score subcommand.

func RunInfo

func RunInfo(w io.Writer, args []string, opts Options) error

RunInfo runs the full project analysis.

Types

type DepsReport

type DepsReport struct {
	Go     *GoDeps     `json:"go,omitempty"`
	Node   *NodeDeps   `json:"node,omitempty"`
	Python *PythonDeps `json:"python,omitempty"`
	Rust   *RustDeps   `json:"rust,omitempty"`
	Java   *JavaDeps   `json:"java,omitempty"`
	Ruby   *RubyDeps   `json:"ruby,omitempty"`
	PHP    *PHPDeps    `json:"php,omitempty"`
	DotNet *DotNetDeps `json:"dotnet,omitempty"`
}

DepsReport aggregates dependency info across ecosystems.

type DocsReport

type DocsReport struct {
	HasReadme       bool     `json:"has_readme"`
	ReadmeFile      string   `json:"readme_file,omitempty"`
	HasLicense      bool     `json:"has_license"`
	LicenseType     string   `json:"license_type,omitempty"`
	LicenseFile     string   `json:"license_file,omitempty"`
	HasChangelog    bool     `json:"has_changelog"`
	HasContributing bool     `json:"has_contributing"`
	HasClaudeMD     bool     `json:"has_claude_md"`
	HasDocsDir      bool     `json:"has_docs_dir"`
	HasDocGo        bool     `json:"has_doc_go"`
	CIConfigs       []string `json:"ci_configs,omitempty"`
	HasGitignore    bool     `json:"has_gitignore"`
	HasEditorconfig bool     `json:"has_editorconfig"`
	LinterConfigs   []string `json:"linter_configs,omitempty"`
}

DocsReport holds documentation status info.

type DotNetDeps

type DotNetDeps struct {
	Dependencies []string `json:"dependencies"`
	TotalCount   int      `json:"total_count"`
}

DotNetDeps holds .NET/C# dependency info.

type GitReport

type GitReport struct {
	IsRepo        bool     `json:"is_repo"`
	Branch        string   `json:"branch,omitempty"`
	Remote        string   `json:"remote,omitempty"`
	RemoteURL     string   `json:"remote_url,omitempty"`
	Clean         bool     `json:"clean"`
	Ahead         int      `json:"ahead,omitempty"`
	Behind        int      `json:"behind,omitempty"`
	RecentCommits []string `json:"recent_commits,omitempty"`
	Tags          []string `json:"tags,omitempty"`
	TotalCommits  int      `json:"total_commits,omitempty"`
	Contributors  int      `json:"contributors,omitempty"`
}

GitReport holds git repository info.

type GoDeps

type GoDeps struct {
	Module     string   `json:"module"`
	GoVersion  string   `json:"go_version"`
	Direct     []string `json:"direct"`
	Indirect   []string `json:"indirect"`
	TotalCount int      `json:"total_count"`
}

GoDeps holds Go module dependency info.

type HealthCheck

type HealthCheck struct {
	Name    string `json:"name"`
	Passed  bool   `json:"passed"`
	Points  int    `json:"points"`
	MaxPts  int    `json:"max_points"`
	Details string `json:"details,omitempty"`
}

HealthCheck is a single health check result.

type HealthReport

type HealthReport struct {
	Score  int           `json:"score"`
	Grade  string        `json:"grade"`
	Checks []HealthCheck `json:"checks"`
}

HealthReport holds a project health score.

type JavaDeps

type JavaDeps struct {
	Source       string   `json:"source"`
	GroupID      string   `json:"group_id,omitempty"`
	ArtifactID   string   `json:"artifact_id,omitempty"`
	Dependencies []string `json:"dependencies"`
	TotalCount   int      `json:"total_count"`
}

JavaDeps holds Java dependency info.

type LanguageInfo

type LanguageInfo struct {
	Name       string   `json:"name"`
	FileCount  int      `json:"file_count"`
	Extensions []string `json:"extensions"`
}

LanguageInfo holds file count and extensions for a detected language.

type NodeDeps

type NodeDeps struct {
	Name            string   `json:"name"`
	Version         string   `json:"version"`
	PackageManager  string   `json:"package_manager"`
	Dependencies    []string `json:"dependencies"`
	DevDependencies []string `json:"dev_dependencies"`
	TotalCount      int      `json:"total_count"`
}

NodeDeps holds Node.js dependency info.

type Options

type Options struct {
	JSON     bool // output as JSON
	Markdown bool // output as Markdown
	Verbose  bool // verbose output
	Limit    int  // limit for lists (e.g., recent commits)
}

Options configures the project command behavior.

type PHPDeps

type PHPDeps struct {
	Name         string   `json:"name"`
	Dependencies []string `json:"dependencies"`
	TotalCount   int      `json:"total_count"`
}

PHPDeps holds PHP/Composer dependency info.

type ProjectReport

type ProjectReport struct {
	Path       string         `json:"path"`
	Name       string         `json:"name"`
	Types      []ProjectType  `json:"types"`
	Languages  []LanguageInfo `json:"languages"`
	BuildTools []string       `json:"build_tools"`
	Deps       *DepsReport    `json:"deps,omitempty"`
	Git        *GitReport     `json:"git,omitempty"`
	Docs       *DocsReport    `json:"docs,omitempty"`
	Health     *HealthReport  `json:"health,omitempty"`
}

ProjectReport is the top-level analysis result.

type ProjectType

type ProjectType struct {
	Language   string   `json:"language"`
	BuildFile  string   `json:"build_file"`
	Frameworks []string `json:"frameworks,omitempty"`
}

ProjectType describes a detected project type.

type PythonDeps

type PythonDeps struct {
	Source       string   `json:"source"`
	Dependencies []string `json:"dependencies"`
	TotalCount   int      `json:"total_count"`
}

PythonDeps holds Python dependency info.

type RubyDeps

type RubyDeps struct {
	Dependencies []string `json:"dependencies"`
	TotalCount   int      `json:"total_count"`
}

RubyDeps holds Ruby/Bundler dependency info.

type RustDeps

type RustDeps struct {
	Name         string   `json:"name"`
	Version      string   `json:"version"`
	Edition      string   `json:"edition,omitempty"`
	Dependencies []string `json:"dependencies"`
	TotalCount   int      `json:"total_count"`
}

RustDeps holds Rust/Cargo dependency info.

Jump to

Keyboard shortcuts

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