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

CppCheck sensor shall support project findings #491

Closed
Bertk opened this issue Apr 22, 2015 · 6 comments · Fixed by #496
Closed

CppCheck sensor shall support project findings #491

Bertk opened this issue Apr 22, 2015 · 6 comments · Fixed by #496
Assignees
Labels
Milestone

Comments

@Bertk
Copy link
Contributor

Bertk commented Apr 22, 2015

The following CppCheck (1.68) finding is not handled correctly:

        <error id="unmatchedSuppression" severity="information" msg="Unmatched suppression: unusedFunction" verbose="Unmatched suppression: unusedFunction">
            <location file="*" line="0"/>
        </error>

Instead of adding a finding in SonarQube DB an error message is written to log file:

11:23:37.684 ERROR - path normalizing of 'C:\TFS_Server\Server\common\Source\converterLib\.\*' failed: 'java.io.IOException: Invalid argument'
@guwirth
Copy link
Collaborator

guwirth commented Apr 22, 2015

In your example isfile="*". What would you expect in such a case?

@Bertk
Copy link
Contributor Author

Bertk commented Apr 23, 2015

The CppCheck sensor already supports issues on project level and this kind of message shall be handled similarly. The combination of 'file="*"' and 'line="0"' can be used to identify this case and this information shall be dropped. Without these attributes the issue will be assigned on project level.

@guwirth
Copy link
Collaborator

guwirth commented Apr 23, 2015

I think is no problem to add this special case (project issue)

Would only look for file==*
set file to null
set line to zero
in this case.

Am 23.04.2015 um 19:57 schrieb Bert [email protected]:

The CppCheck sensor already supports issues on project level and this kind of message shall be handled similarly. The combination of 'file="*"' and 'line="0"' can be used to identify this case and this information shall be dropped. Without these attributes the issue will be assigned on project level.


Reply to this email directly or view it on GitHub.

@Bertk
Copy link
Contributor Author

Bertk commented Apr 23, 2015

Yes, this should work.

@Bertk
Copy link
Contributor Author

Bertk commented Apr 25, 2015

Sorry, but we forgot a small update for the CppCheck rule repository:

09:57:04.639 ERROR - Could not add the issue, details: 'The rule 'cppcheck:unmatchedSuppression' does not exist.'

@Bertk Bertk reopened this Apr 25, 2015
@guwirth
Copy link
Collaborator

guwirth commented Apr 25, 2015

Missing rule support is a different issue.
Close this and open #502 instead.

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

Successfully merging a pull request may close this issue.

2 participants