Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roadmap for v1 #1

Open
20 of 24 tasks
Halleck45 opened this issue Nov 3, 2023 · 8 comments
Open
20 of 24 tasks

Roadmap for v1 #1

Halleck45 opened this issue Nov 3, 2023 · 8 comments
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@Halleck45
Copy link
Owner

Halleck45 commented Nov 3, 2023

AST Metrics aims to become a leading, language-agnostic, user-friendly, and educational code analyzer.

This is my first project in Go, and I'm completely new to the language. Contributions are highly welcome, particularly to enhance stability and performance.

The v1 roadmap is as follows:

Supported Languages

  • PHP (full)
  • Golang (partial)
  • TypeScript
  • Java
  • Python (partial)
  • Dart

Features

  • Unified AST descriptor via Protobuf
  • CLI report
  • Support for non-interactive environments (CI)
  • Configuration file support (.ast-metrics.yaml)
  • HTML report
  • Git analysis
  • Markdown report
  • Easy integration with Github, via Github actions
  • Easy integration with Gitlab CI, via Templates

Metrics

  • Halstead metric
  • Bug probability
  • FanIn / FanOut (afferent / efferent coupling)
  • Cyclomatic complexity
  • Maintainability index
  • Size (lines of code, comments, logical lines)
  • Bus factor
  • Commits, top committers
  • Risked files

All of this is subject to change, and discussions may lead to new ideas or modifications to the roadmap.

v2 will probably include: 'failIf' conditions, relations between objects, OpenAI plugin...

Thank you in advance for your assistance!

@Halleck45 Halleck45 added the documentation Improvements or additions to documentation label Nov 3, 2023
@Halleck45 Halleck45 added this to the v1 milestone Nov 3, 2023
@Halleck45 Halleck45 pinned this issue Nov 4, 2023
@Halleck45
Copy link
Owner Author

Quick update

The project is going well.

Performance is very good:

  • 2 seconds for about 1,000,000 lines of code
  • 6 seconds for 30,000 commits

I spent a lot of time trying to integrate a C library to analyze Git activity, using git2go. I was unable to build a binary compatible with Mac on an ARM64 architecture. I gave up on the idea for the moment, because it was too time-consuming (not having a Mac).

There are still some anomalies, for example on unsupported files, and some metrics to be refined. My goal, which is to release a first usable version, seems achievable by April.

@DeGraciaMathieu
Copy link

Hello @Halleck45

Would it be possible to add a search option on certain pages? I'm specifically thinking about the "risk" page.

Often, after initiating an analysis of a project, I need to focus on specific components of my application (commands, controllers, a set of specific classes within a namespace, etc ...).

Currently, this requires me to rerun the entire analysis just to target these classes.

Thank you !

@Halleck45
Copy link
Owner Author

Hi @DeGraciaMathieu , thanks for the suggestion!

To avoid having to restart the tool, I just added a --watch option that refreshes the page and the HTML report as soon as a file is updated.

Regarding the search functionality, what do you think? Should we add a --filter argument? Or maybe a search field that appears in the window when you press Ctrl + F?

Could you please create a discussion here ?

@KorDum
Copy link

KorDum commented Jul 12, 2024

Hi!
Unfortunately, I found that there is no Distance from the main sequence metric. Are you planning to add it?
I really miss the same detailed statistics that phpmetrics had.

Halleck45 pushed a commit that referenced this issue Jul 23, 2024
@alanpoulain
Copy link
Contributor

I opened an issue in PhpMetrics, but I think it could be done in this project instead, WDYT of supporting the OpenMetrics specification?

It could be then be used for instance in GitLab to have the metrics directly in the MR!

It seems there are some available packages in Go as well, for instance: https://github.com/bsm/openmetrics

@Halleck45
Copy link
Owner Author

@alanpoulain excellent idea !

I hope #70 will help you

@alanpoulain
Copy link
Contributor

Wow already! 🚀 Nice to see it implemented, thank you! Now I need to replace PhpMetrics with AST Metrics 😄

@alanpoulain
Copy link
Contributor

How to you plan to support the newer versions of PHP if VKCOM/php-parser is not updated anymore?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants