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

C++ Community / (2) Codananalysis / Add Value #383

Closed
guwirth opened this issue Jan 14, 2015 · 12 comments
Closed

C++ Community / (2) Codananalysis / Add Value #383

guwirth opened this issue Jan 14, 2015 · 12 comments
Assignees
Milestone

Comments

@guwirth
Copy link
Collaborator

guwirth commented Jan 14, 2015

Using 'Add Value' button in the configuration UI there is more then one external rule field added. Seems first time 2, then 3, ... .

(minor bug)

@guwirth guwirth added the bug label Jan 14, 2015
@guwirth guwirth added this to the M 0.9.3 milestone Jan 14, 2015
@jmecosta
Copy link
Member

not sure we can do anything about it... has this seems to be a bug in the platform?

@wenns
Copy link
Contributor

wenns commented Jan 15, 2015

Are you sure you're using it properly?

@jmecosta
Copy link
Member

Duno have to check... The thing at that point was that it was not even recommended to define rules as we have now. The recomended way was to only use template rules since those sonar can track history. So maybe we can for this ticket drop those xmls in ui and instead provide a tool to upload those profiles. I was already planning to migrate the cpplint ones for myself. Another useful thing on doing so is that it will be possible to then define technical debt for those rules also which currently we cannot.

If you are OK with this is can the prepare the necessary tools.

@guwirth
Copy link
Collaborator Author

guwirth commented Jan 15, 2015

  • What exactly would the tool do? Read the XML and create a ... ?
  • Would this be an external tool or somehow build in?
  • Would the tool / sources be part of the cxx plugin?

@jmecosta
Copy link
Member

The tool, a python script that would be kept in the helpers section of the
repository would read the current XML we have defined in ui and just create
the rules. I don't think its needed to enable the rules in a given profile
beacuase its up to user to enable those in each profile. To ease the
transition it would be recommended to backup the current profile, create
the rules and the restore the profile so everything is enabled

On Thu, Jan 15, 2015, 20:22 Günter Wirth [email protected] wrote:

  • What exactly would the tool do? Read the XML and create a ... ?
  • Would this be an external tool or somehow build in?
  • Would the tool / sources be part of the cxx plugin?


Reply to this email directly or view it on GitHub
#383 (comment).

@jmecosta
Copy link
Member

another reason for this, is that the plaftorm is on the way to deprecate xml importer stuff so we might need to react to this also.

@guwirth
Copy link
Collaborator Author

guwirth commented Jan 16, 2015

recomended way was to only use template rules

Still don't understand what template rules are? Is there an example?

@jmecosta
Copy link
Member

Sure, some of the checks we have in the ast module are template rules. So
you create a new rule based on a template with different parameters . we
have already template rules for all sensors. You can search for them using
the rules service in the web ui.

The advantage is if for example when upgrading a sonar instance you don't
loose any of the rules because you forgot to update the XML in the web ui.
Because those ones persist with the profiles

@guwirth
Copy link
Collaborator Author

guwirth commented Jan 16, 2015

But what would your script doing? Create automatic Java code?
From some static code analyzer I have 2500 rules. Isn't that too much?

@jmecosta
Copy link
Member

It would just pickup the XML you have in ui and use the rest api to create
the rules. This is for transition after that the recommended way is to use
the web ui.

On Fri, Jan 16, 2015, 21:55 Günter Wirth [email protected] wrote:

But what would your script doing? Create automatic Java code?
From some static code analyzer I have 2500 rules. Isn't that too much?


Reply to this email directly or view it on GitHub
#383 (comment).

@guwirth guwirth removed this from the M 0.9.3 milestone Jan 17, 2015
@guwirth guwirth added this to the M 0.9.3 milestone Apr 9, 2015
@guwirth
Copy link
Collaborator Author

guwirth commented Apr 10, 2015

@jmecosta what should we do with this bug?

@jmecosta
Copy link
Member

Its not a bug from the plugin, ive seen this with other properties. If you set the exclusions on the sonar web you will see duplicated things showing up. For me this can be closed

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

No branches or pull requests

3 participants