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

fix #13362: Misra report on command line #7096

Open
wants to merge 36 commits into
base: main
Choose a base branch
from

Conversation

ludviggunne
Copy link
Contributor

WIP. Will add tests and HTML output.

lib/cppcheck.cpp Outdated Show resolved Hide resolved
lib/cppcheck.cpp Outdated Show resolved Hide resolved
lib/errorlogger.cpp Show resolved Hide resolved
lib/cppcheck.cpp Outdated Show resolved Hide resolved
@ludviggunne ludviggunne force-pushed the 13362 branch 3 times, most recently from 70c91e1 to aed1653 Compare December 21, 2024 15:19
@ludviggunne
Copy link
Contributor Author

@firewave I seem to be missing something with the CMake build, could you point me in the right direction? As I understand it all the lib/ sources should be available in the GUI.

/~https://github.com/danmar/cppcheck/actions/runs/12446323642/job/34748592068?pr=7096#step:12:141

@ludviggunne
Copy link
Contributor Author

@firewave I seem to be missing something with the CMake build, could you point me in the right direction? As I understand it all the lib/ sources should be available in the GUI.

/~https://github.com/danmar/cppcheck/actions/runs/12446323642/job/34748592068?pr=7096#step:12:141

Nevermind, found the problem.

Copy link
Owner

@danmar danmar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a line in the releasenotes file also.

lib/checkers.h Outdated Show resolved Hide resolved
lib/utils.cpp Outdated Show resolved Hide resolved
lib/utils.cpp Outdated Show resolved Hide resolved
lib/utils.cpp Outdated Show resolved Hide resolved
@ludviggunne ludviggunne force-pushed the 13362 branch 2 times, most recently from d4e9dec to d337781 Compare January 8, 2025 16:37
@ludviggunne ludviggunne marked this pull request as ready for review January 9, 2025 13:33
lib/checkers.cpp Outdated
@@ -2096,3 +2097,183 @@ std::vector<checkers::Info> checkers::certCppInfo{
{"MSC53-CPP", "L2"},
{"MSC54-CPP", "L2"},
};

namespace checkers {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file is autogenerated so don't change this file. Next time I autogenerate this file to make it uptodate this code will be removed it will be a mess.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a preference for which file these functions should be in?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm ideally I think it would be better if this information was dynamic. cppcheck could fetch the list of checkers from premiumaddon at runtime. but that does not feel like a refactoring you should make in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I'm not sure if we're talking about the same functions. The functions I added don't depend on the premiumCheckers map. Or am I missing something?

Copy link
Owner

@danmar danmar Jan 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a preference for which file these functions should be in?

I suggest that it is added in the ErrorLogger.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been working on moving this logic to ErrorLogger, unfortunatley it seems to be necessary to drag in a bunch of dependencies for the gui tests. Maybe these functions could be in its own file/some other file?

@ludviggunne ludviggunne force-pushed the 13362 branch 3 times, most recently from 2ecfb14 to e997eb9 Compare January 18, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants