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

Script failure on errors without location #2

Closed
Dr-Dream opened this issue Apr 11, 2016 · 6 comments
Closed

Script failure on errors without location #2

Dr-Dream opened this issue Apr 11, 2016 · 6 comments
Assignees
Labels

Comments

@Dr-Dream
Copy link

In case if cppcheck report contains error without 'location' tag (for example 'missingIncludes') script fails.

@johnthagen johnthagen self-assigned this Apr 11, 2016
@johnthagen
Copy link
Owner

@Dr-Dream Can you please provide an example that reproduces this failure?

Please provide:

  • Cppcheck version
  • Example C++ source file that triggers the condition
  • Exact run steps that trigger the behaviour.

Thanks.

@johnthagen johnthagen added the bug label Apr 12, 2016
@Dr-Dream
Copy link
Author

cppchek 1.73
I've tried with different options, so i've attached with last result. It's no an missingIncludes, but 'toomanyconfigs'.
Runnin command
cppcheck --xml-version=2 --enable=warning . 2>cppcheck-result.xml
cppcheck_junit cppcheck-result.xml cppcheck-junit.xml

Result is here
https://github.com/Dr-Dream/examples/blob/master/cppcheck-junit-tests/cppcheck-result.xml

I'm not sure i could provide you a sample code in short time, because it's not mine actually, but my employer.
I'll try to prepare something simmilar in short time.

PS:also tested on 1.1.1

@johnthagen
Copy link
Owner

@Dr-Dream Thanks for the test file. Please try out version 1.1.2 to confirm your issue is resolved.

@mjcaisse
Copy link
Contributor

This still seems to be a problem. For example, the following output for cppcheck is causing problems with HEAD on master:

<?xml version="1.0" encoding="UTF-8"?> <results version="2"> <cppcheck version="1.61"/> <errors> <error id="missingInclude" severity="information" msg="Cppcheck cannot find all the include files (use --check-config for details)" verbose="Cppcheck cannot find all the include files. Cppcheck can check the code without t he include files found. But the results will probably be more accurate if all the include files are found. Please check your project's include directories and add all of them as include directories for Cppcheck. To see what files Cppcheck cannot find use --check-config."> </error> </errors> </results>

@johnthagen
Copy link
Owner

@mjcaisse Could you provide an example .cpp file that produces this output? I'd like to run the latest Cppcheck (1.7.4 as of writing) against it to make a good unit test for this to make sure this doesn't pop up again in the future.

@johnthagen
Copy link
Owner

@mjcaisse Thanks for issue report and the PR! Please test if cppcheck-junit 1.2.0 has corrected your problem.

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

No branches or pull requests

3 participants