Skip to content

AST Metrics

What is static analysis with AST Metrics?

Static analysis consists of analyzing the source code of a program without executing it. AST Metrics uses the Abstract Syntax Tree (AST) to analyze the structure of the code. The AST is a tree representation of the source code that allows us to analyze the code in a structured way.

AST Metrics is a language-agnostic static code analyzer. It helps you to identify potential issues, and to find candidates for refactoring.

AST Metrics can generate HTML reports:

AST Metrics is a language-agnostic static code analyzer.

And can be used as a terminal application:

CLI application

Why use AST Metrics?

  • Language-agnostic: AST Metrics can analyze code written in any programming language.
  • Fast: AST Metrics is written in Go, a fast and efficient language.
  • Easy to use: AST Metrics is a standalone package. It does not require any other software to be installed.