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

Feat: Add flag to select specific analyzer to run #264

Merged
merged 4 commits into from
Nov 6, 2024

Conversation

oshirohugo
Copy link
Contributor

This PR adds a new flag to plugincheck2 command line: analyzer. It will allow us to select individuals analyzers to run.

This will allow us to use plugincheck2 in the CI provided by create-plugin to validade the plugin.json format as required here: grafana/plugin-tools#1062

OBS: The way that our analyzers are implemented will guarantee that all the required analyzer will run even when individual analyzers are selected to run with the new flag.

@oshirohugo oshirohugo added the enhancement New feature or request label Oct 29, 2024
@oshirohugo oshirohugo self-assigned this Oct 29, 2024
@oshirohugo oshirohugo requested review from a team as code owners October 29, 2024 16:22
@oshirohugo oshirohugo requested review from sunker, wbrowne, marefr and andresmgot and removed request for a team October 29, 2024 16:22
Copy link
Member

@academo academo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! please make sure to add an integration test with this case here

https://github.com/grafana/plugin-validator/blob/main/pkg/cmd/plugincheck2/main_test.go

You can use the same fixtures

Also remember to update the README file to include this flag in the documentation

@oshirohugo oshirohugo requested a review from academo November 5, 2024 12:41
Copy link
Member

@xnyo xnyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work! 🎉 Just one minor nit, but LGTM otherwise

Comment on lines 31 to 35
type TC struct {
File string
ExtraArgs string
JsonReport JsonReport
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: can we unexport this?

Suggested change
type TC struct {
File string
ExtraArgs string
JsonReport JsonReport
}
type tc struct {
file string
extraArgs string
jsonReport JsonReport
}

@oshirohugo oshirohugo merged commit 882de9a into main Nov 6, 2024
2 checks passed
@oshirohugo oshirohugo deleted the add-flag-to-select-individual-analizers branch November 6, 2024 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

3 participants