Skip to content

Define and expose a results API interface for programmatic usage #44

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

Closed
sgb-io opened this issue Dec 15, 2020 · 2 comments · Fixed by #49
Closed

Define and expose a results API interface for programmatic usage #44

sgb-io opened this issue Dec 15, 2020 · 2 comments · Fixed by #49

Comments

@sgb-io
Copy link
Owner

sgb-io commented Dec 15, 2020

Currently, results are returned in 2 forms:

  • The CLI stdout, as a fixed summary message
  • The full tree of FullyAnalyzedEntitys

Although the full tree can be used programmatically, it could be helpful to add a public API interface around this, so users can easily access some of the headlines from the output.

@sgb-io
Copy link
Owner Author

sgb-io commented Dec 15, 2020

Relates to #38

@sgb-io
Copy link
Owner Author

sgb-io commented Dec 15, 2020

Affects #39 - need this API added in order to easily get e.g. average complexity, most complex scores from a result

This API could also include a generateBadge() method that creates a badge .svg locally to the analyzed project, as per this suggestion

Actions to take

  • Design a new results interface that is in turn exposed by codehawk-cli. It could be used via CLI or programmatically. We want: access to summary information about the results (such as average complexity score (+median?), worst complexity score), generateBadge()
  • Consider providing new CLI options/commands to trigger actions that aren't the main processing (e.g. generate badge), this avoids the consuming project needing to script the same thing
  • Investigate a OpenMetrics reporter so that users can track complexity over time

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 a pull request may close this issue.

1 participant