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

using HTML description #31

Merged
merged 1 commit into from
Mar 13, 2024
Merged

using HTML description #31

merged 1 commit into from
Mar 13, 2024

Conversation

guwirth
Copy link
Contributor

@guwirth guwirth commented Mar 13, 2024

  • The html descriptions for the rules of repository must be stored in the path '/org/sonar/l10n/cxx/rules/mycxx'. If the return value of 'repositoryKey' is changed, the storage location in 'resources' must also be adjusted.

-  The html descriptions for the rules of repository must be stored in the path '/org/sonar/l10n/cxx/rules/mycxx'. If the return value of 'repositoryKey' is changed, the storage location in 'resources' must also be adjusted.
name = "Using namespace directives are not allowed",
tags = {Tag.CONVENTION}
// second possibility to add a rule description:
//,description = "Using namespace directives are not allowed."

Choose a reason for hiding this comment

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

The description here can be retained. If we use the addHtmlDescription method, we can override the description. If you do not use the addHtmlDescription method, we can use this description as basic description.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately I haven't tried what happens when both are in? Does the html description overwrite the description?

Choose a reason for hiding this comment

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

I tested this part of the code and it worked fine.
test version :
cxx: master (c753dd71932baabd7dcbe57e3a7985a48d733a60)
plugin: master (d221e45)

image

This design idea comes from the Sonar official rules custom plug-in demo.
image
image

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

Successfully merging this pull request may close these issues.

2 participants