-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Static analysis results of Catch-1 #957
Comments
Passing notes from looking through this: CppCheck and Resharper seem to run into trouble with how Catch-1 is structured. Hopefully they would do better with Catch 2, where implementations are split out into .cpp files, but going through them like this is kinda painful. Resharper loves to say "use this c++11 feature in your C++98 codebase". Ironically, when Catch is properly configured to support C++11, some of these ( Actionable finds:CppCheck
Deleted the constructors for I didn't go through all the "never used" warnings, because I know that some of them are used, so it is likely more false positives. PVS Studio
No reason not to fix this. The others are things that we might want to suppress in the future, but basically false positives. (The Resharper-C++Goes completely crazy in face of obj-c. Used it to get rid of superfluous Core GuidelinesSkipped for now. All in all, relatively useful but would probably work better against Catch 2, so some of the tools wouldn't be horribly confused by Catch being implemented in headers only, and so all the "use override, auto, constexpr" would be actionable (and also wouldn't be used in places where they already are used hidden in macro). Fixed couple problems, going to fix couple more*
|
@horenmar Would you be interested in reports on Catch 2, stripped from the 'less useful' warnings? |
@horenmar Likely of interest are 238 of 239 ReSharper C++ mentions of [60/61 in Catch 2] Edit: Apparently this isn't a real problem, otherwise it would likely already have led to violation of the ODR. Perhaps it's ok because of the way Catch is structured, separating Catch implementation and Catch interface. |
@horenmar Mismatched class tag in s/class/struct/ in
|
@martinmoene If the warnings were pared down a bit, it would be much nicer to work with (and also have better chance to be fully addressed). And yeah, due to how Catch 1 is written, there are non-inline function bodies in headers all over, and this won't change until Catch 2, where we are separating non-template definitions into .cpp files (that are then also stitched into the single-header version, so running the analysis over that would still find them in error). |
@horenmar I'll rerun (some of) the analyses, reduce their output and republish them, hopefully tonight. |
@horenmar I've updated the results for Resharper-C++ (now 108 lines). |
Do you run these locally, or via Travis (I couldn't spot them)? |
Locally only. If you feel like making change to Travis to also run SelfTest under Valgrind/Sanitizers, it would be most welcome. |
If only I'd have experience with it... |
Perhaps the analyses contain something of interest.
martinmoene/CppCheck.txt.
Contains
Please let me know if you like a different format.
The text was updated successfully, but these errors were encountered: