Skip to content

Improved addon execution errorhandling#5451

Merged
danmar merged 15 commits intocppcheck-opensource:mainfrom
firewave:addon-xx
Sep 20, 2023
Merged

Improved addon execution errorhandling#5451
danmar merged 15 commits intocppcheck-opensource:mainfrom
firewave:addon-xx

Conversation

@firewave
Copy link
Copy Markdown
Collaborator

No description provided.

@firewave
Copy link
Copy Markdown
Collaborator Author

Preparations for #4958.

@firewave firewave force-pushed the addon-xx branch 5 times, most recently from d813d87 to 85836bd Compare September 15, 2023 21:00
@firewave firewave changed the title Improved addon error handling Improved addon execution errorhandling Sep 15, 2023
@firewave firewave force-pushed the addon-xx branch 2 times, most recently from 523efd6 to 036b0e9 Compare September 15, 2023 21:31
@firewave firewave marked this pull request as ready for review September 15, 2023 21:54
Comment thread cli/cppcheckexecutor.h Outdated

/**
* Execute a shell command and read the output from it. Returns true if command terminated successfully.
* Execute a shell command and read the output from it. Returns exitcode of the command terminated successfully.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

is this sentence by intention?

Returns exitcode of the command terminated successfully.

Well it needs to be clarified somehow because the exitcode can be nonzero and as I understand it it's always a success exitcode.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Just a typo.

Comment thread addons/README.md
Checks Linux system for [year 2038 problem](https://en.wikipedia.org/wiki/Year_2038_problem) safety. This required [modified environment](https://github.com/3adev/y2038). See complete description [here](https://github.com/danmar/cppcheck/blob/main/addons/doc/y2038.txt).
+ [threadsafety.py](https://github.com/danmar/cppcheck/blob/main/addons/threadsafety.py)
Analyse Cppcheck dump files to locate threadsafety issues like static local objects used by multiple threads.
+ [naming.py](https://github.com/danmar/cppcheck/blob/main/addons/naming.py)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I saw that I forgot to finish the documentation.

Comment thread addons/README.md
@firewave
Copy link
Copy Markdown
Collaborator Author

I updated the documentation a bit but we need to document all addons properly. I added a ticket about that: https://trac.cppcheck.net/ticket/12001.

@firewave
Copy link
Copy Markdown
Collaborator Author

We should clean up the addon folder so it only contains the actual addons.

misra_9.py looked like a separate addon and it also runs with issue but it is not. Probably need to improve the errorhandling a bit more. But that is outside of the scope of this PR.

The tests should be in the main test folder. Internal implementation files should be in a subfolder. So should be the example configurations.

We might also drop some addons which might not provide much value or reat them as examples and thus also moving them out of the main addons folder.

We also need to dogfood this stuff if we ship this as a an official addon (treating it as example might allow us to treat it as "untested and unmaintained" as well).

Copy link
Copy Markdown
Collaborator

@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.

looks good as far as I can tell

Comment thread addons/README.md
Comment thread lib/cppcheck.cpp
@danmar danmar merged commit a43b55a into cppcheck-opensource:main Sep 20, 2023
@firewave firewave deleted the addon-xx branch September 20, 2023 09:26
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