-
Notifications
You must be signed in to change notification settings - Fork 86
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
Check files after save should show results from current file only #162
Comments
Checking C++ code without parsing includes is generally useless, in my opinion. Yes, it will be faster, but you'll be checking invalid code with unknown symbols for classes included from elsewhere. Only compilable code should be checked. |
I provided one possible solution. Other alternative is to filter the results for current file only. One or both options can be offered to the user in settings. |
Yes, that's a good point. And I want it to be very quick, too, but it's just not possible to combine good speed with the quality of checks (at least not with cppcheck). |
I have fixed this locally and is working as expected for me. If you want I can send you my code. I checked the documentation for cppcheck and most of the checks will work without inclusion of headers. For e.g. Uninitialized variables, UnusedVar checks etc. |
|
I will work on 2. to start with. Will create an option where user can select if they would like to exclude the include path. This is my first OSS contribution to I will need help with the contribution process. |
Is this option available today? Thanks |
@Nir-Az, this isn't implemented but it can be done in principle. |
It will be a good enhancement to show cppcheck results from the currently saved file only when Check files after save option is selected. This will also increase save performance on large projects.
This can be done by ignoring includes when analysisOnSavedFile is true in getCPPCheckArgs
The text was updated successfully, but these errors were encountered: