Skip to content

fixed #13909 / refs #13914 - some (enforced) language handling fixes for the GUI #7570

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

Merged
merged 6 commits into from
Jun 23, 2025

Conversation

firewave
Copy link
Collaborator

@firewave firewave commented Jun 3, 2025

No description provided.

@firewave firewave changed the title fixed #13909 fixed #13909/#12841 Jun 3, 2025
@firewave firewave changed the title fixed #13909/#12841 fixed #13909/#12841 / refs #13914 Jun 3, 2025
@firewave firewave force-pushed the import-gui branch 10 times, most recently from f85cc26 to 2b9d467 Compare June 7, 2025 14:19
@firewave

This comment was marked as resolved.

@firewave firewave changed the title fixed #13909/#12841 / refs #13914 fixed #13909 / refs #13914 Jun 10, 2025
@firewave firewave changed the title fixed #13909 / refs #13914 fixed #13909 / refs #13914 - fixed (enforced) language handling in the GUI Jun 10, 2025
@firewave firewave changed the title fixed #13909 / refs #13914 - fixed (enforced) language handling in the GUI fixed #13909 / refs #13914 - some (enforced) language handling fixes for the GUI Jun 10, 2025
@firewave
Copy link
Collaborator Author

This makes me wonder if markup files are handled properly in the GUI. But not something to explicitly look into as it should be implicitly be fixed as we move towards the shared executor code.

@firewave

This comment was marked as resolved.

@firewave firewave force-pushed the import-gui branch 3 times, most recently from 4827e62 to 3c799bc Compare June 22, 2025 16:21
@firewave
Copy link
Collaborator Author

I will fix the remaining TODOs in a follow-up coming later today.

This needs to be fixed because it causes assertions whereas the other issues are "just" causing unexpected behavior.

@firewave firewave marked this pull request as ready for review June 22, 2025 16:37
@@ -171,7 +171,7 @@ ifndef INCLUDE_FOR_CLI
endif

ifndef INCLUDE_FOR_TEST
INCLUDE_FOR_TEST=-Ilib -Icli -isystem externals/simplecpp -isystem externals/tinyxml2
INCLUDE_FOR_TEST=-Ilib -Ifrontend -Icli -isystem externals/simplecpp -isystem externals/tinyxml2
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I forgot to add this in #7579.

Comment on lines -145 to +150
./cmake.output/bin/cppcheck $selfcheck_options $cppcheck_options --addon=naming.json cli frontend || ec=1
./cmake.output/bin/cppcheck $selfcheck_options $cppcheck_options --addon=naming.json frontend || ec=1
./cmake.output/bin/cppcheck $selfcheck_options $cppcheck_options --addon=naming.json -Ifrontend cli || ec=1
./cmake.output/bin/cppcheck $selfcheck_options $cppcheck_options --addon=naming.json --enable=internal lib || ec=1
./cmake.output/bin/cppcheck $selfcheck_options $cppcheck_options -DQT_VERSION=0x060000 -DQ_MOC_OUTPUT_REVISION=69 -DQT_CHARTS_LIB -DQT_MOC_HAS_STRINGDATA --library=qt --addon=naming.json -Icmake.output/gui -Igui gui/*.cpp cmake.output/gui/*.cpp || ec=1
./cmake.output/bin/cppcheck $selfcheck_options $cppcheck_options -Icli test/*.cpp tools/dmake/*.cpp || ec=1
./cmake.output/bin/cppcheck $selfcheck_options $cppcheck_options -DQT_VERSION=0x060000 -DQ_MOC_OUTPUT_REVISION=69 -DQT_CHARTS_LIB -DQT_MOC_HAS_STRINGDATA --library=qt --addon=naming.json -Icmake.output/gui -Ifrontend -Igui gui/*.cpp cmake.output/gui/*.cpp || ec=1
./cmake.output/bin/cppcheck $selfcheck_options $cppcheck_options -Icli -Ifrontend test/*.cpp || ec=1
./cmake.output/bin/cppcheck $selfcheck_options $cppcheck_options -Icli tools/dmake/*.cpp || ec=1
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

More stuff which was not considered in #7579.

@firewave firewave merged commit 1af769e into danmar:main Jun 23, 2025
53 checks passed
@firewave firewave deleted the import-gui branch June 23, 2025 09:08
@firewave
Copy link
Collaborator Author

I will fix the remaining TODOs in a follow-up coming later today.

Turns out the remaining cases are a bit more complicated...

@danmar
Copy link
Owner

danmar commented Jun 23, 2025

@firewave I have a question, I hope you can help me since you've been looking at the language handling.

I built a devdrop for a customer at June 2nd using the latest Cppcheck source code at that time.
And with that devdrop, Cppcheck seems to think that his *.cxx files are C code.

The devdrop reports such syntax errors:

test1.cxx:3:1: error: Code 'namespacecrc32{' is invalid C code. [syntaxError]
namespace crc32 {
^

I believe the customer uses the GUI mostly.

Do you know if we've had some bug in the language handling that was fixed lately? The latest Cppcheck release works fine.

@firewave
Copy link
Collaborator Author

I think was a side effect of the language not being applied. It appears to be the same issue Robert reported in https://trac.cppcheck.net/ticket/13909.

I did several manual tests with the GUI yesterday and everything was working as expected - with files and projects. Except for applying the enforced language when scanning files and not a project.

@danmar
Copy link
Owner

danmar commented Jun 23, 2025

Thanks!

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.

2 participants