Skip to content

Add AST Metrics - #1860

Open
Halleck45 wants to merge 1 commit into
analysis-tools-dev:masterfrom
Halleck45:add-ast-metrics
Open

Add AST Metrics#1860
Halleck45 wants to merge 1 commit into
analysis-tools-dev:masterfrom
Halleck45:add-ast-metrics

Conversation

@Halleck45

Copy link
Copy Markdown

Hi! Thanks for maintaining this list, it has been a genuinely useful reference for me over the years.

This adds AST Metrics, a multi-language code maintainability analyzer.

It is not a linter in the correctness sense: instead of reporting rule violations, it computes maintainability metrics that most linters do not cover (cyclomatic and cognitive complexity, Halstead volume, afferent/efferent coupling, maintainability index) and detects communities in the dependency graph. Output formats: explorable HTML report, plus JSON, Markdown, SARIF and OpenMetrics for CI.

It ships as a single Go binary with no runtime dependency, so analyzing PHP or Python does not require a PHP or Python installation (parsing is done with tree-sitter). It also embeds an MCP server, so AI coding agents can query codebase structure and risk areas.

Languages supported today: Go, PHP, Python, Rust, Java, C#, TypeScript.

Disclosure: I am the author. I also wrote PhpMetrics, already listed here; AST Metrics is its multi-language successor, and PhpMetrics remains maintained.

Contributing criteria:

  • 147 stars
  • 11 contributors
  • First commit November 2023, actively released (latest: v0.40.2)

Only data/tools/ast-metrics.yml is added. README.md and data/api/ are untouched. I ran make render-skip-deprecated locally to validate: it renders without error and the entry lands in the "Multiple languages" section.

Happy to adjust the wording, the tags or the category if you would rather have it described differently. Thanks for taking a look!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant