Skip to content

AnnontationLocationCheck has Incorrect Cardinality #298

@indiv0

Description

@indiv0

Sonar version: 7.9.1
Checkstyle sonar plugin version: 4.33
Steps to reproduce or description of problem:

  1. Attempt to import a configuration like google_checks.xml (I made some modification to the 8.33 version so that SonarQube could import it).
  2. SonarQube imports the template, but no rules that are based on templates are imported (c.f. import should work with rule templates #2), which is to be expected
  3. Go to add the AnnotationLocationMostCases and AnnotationLocationVariables rules to the SonarQube profile and see that the AnnotationLocationCheck rule in SonarQube is not a rule template as expected, but just a regular rule.
  4. Thus, both AnnotationLocationMostCases and AnnotationLocationVariables cannot be added to the profile, only one.

Correct me if I'm wrong (because I'm not very familiar with this system) but that would be because AnnotatonLocation is not set to <cardinality>MULTIPLE</cardinality>? So is this issue a special case of #147, similarly to #145? Would the fix be as simple as #146?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions