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

CPD warning with version 0.9.8 #1307

Closed
ghost opened this issue Nov 16, 2017 · 2 comments · Fixed by #1338
Closed

CPD warning with version 0.9.8 #1307

ghost opened this issue Nov 16, 2017 · 2 comments · Fixed by #1338
Assignees
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Nov 16, 2017

I have updated my SonarQube 6.2 with the version 0.9.8 of the cxx plugin. The plugin produces now a lot of traces during the analysis:

INFO: Sensor c++ SquidSensor
INFO: SonarQube 6.2 or newer environment
WARN: CPD error in file '/home/phil/.../Provider.cc' at line:395, column:47
...

Those warnings where not produced with the version 0.9.7 of the plugin.

It seems that this warning is produced only when C++ string constants are defined on multiple lines. Examples of two cases which produces this warning:

sql << "SELECT epsg_datum.datum_name, \
               epsg_datum.datum_code  \
                    FROM epsg_datum";
throw MyException("hello "
                  "world");
@guwirth
Copy link
Collaborator

guwirth commented Nov 16, 2017

@phcouton this was also in old versions an issue. Problem is that preprocessor is merging/changing the code and resulting line numbers do no more fit to original source file. I see no way to solve this.

@guwirth guwirth self-assigned this Nov 19, 2017
@guwirth guwirth added this to the 0.9.9 milestone Nov 19, 2017
@guwirth
Copy link
Collaborator

guwirth commented Nov 19, 2017

@guwirth guwirth changed the title New CPD error with version 0.9.8 CPD warning with version 0.9.8 Nov 19, 2017
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.

1 participant