-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
fixed #12465 - added (undocumented) command-line option --executor
to specify the used executor implementation
#6043
Conversation
I wanted to wait with this until I am done with executor stuff but I need this in an upcoming unit test as there is stuff I cannot easily fix in the process implementation so I need to limit some tests to the thread one. |
3db4d7c
to
ea99020
Compare
This still needs adjustments for the way we use the ThreadSanitizer in Python tests... |
ea99020
to
cc04d26
Compare
This hits on something I am thinking about for a long time - forcing the invocation with a different default. This affects the following:
In a perfect world running Cppcheck with either of those options added should not lead to any difference in the output. So I guess the injection should be specific to those arguments. So if the argument is not specified in the argument list it should not be added. That seems test which explicitly depend on the default need to specify that on the command-line. That would allow us to have a much bigger test coverage in the Python tests without introducing additional cases. We might also be able to remove some (like all the |
658622f
to
f6d994d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you envision that users will use this option? What are the valid use cases?
If your target is to use it for testing purposes.. imho we could let it be an unofficial option
releasenotes.txt
Outdated
@@ -23,3 +23,6 @@ Other: | |||
- Added '--template=simple'. It is expands to '{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]' without any additional location details. | |||
- Removed deprecated platform type 'Unspecified'. Please use 'unspecified' instead. | |||
- Removed deprecated 'Makefile' option 'SRCDIR'. | |||
- Added CMake option 'DISALLOW_THREAD_EXECUTOR' to control the inclusion of the executor which performs the analysis within a thread of the main process. | |||
- Removed CMake option 'USE_THREADS' in favor of 'DISALLOW_THREAD_EXECUTOR'. | |||
- Added command-line option `--executor=` to specify the executor. Available options are 'auto', 'process' and 'thread'. 'auto' will prefer 'process' if it is available. Note: Windows has no implementation of 'process' as of now so it will always chose 'thread' for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chose => choose/use
I guess it is unlikely the regular user will use this. The
Spawning additional processes might also be a security violation. But as this has not yet been brought up yet I guess it is actually a valid use case.
I am fine with not documenting it. |
That's also one of the reasons why the executor stuff still isn't finished. I keep finding issues and gaps in the testings and before I shared the code I want to have at least one of the job implementations working as expected/intended (i.e. the single job one) so I know that the reworking didn't introduce any new bugs. |
This is also a per-requisite for #5647. |
Alright I suggest we make it undocumented for now. If we see a need to make it official later we can do it. Feel free to remove the help text and then merge it. |
…CT_EXECUTOR` to inject `--executor` into cppcheck execution
7a169e8
to
42f74c2
Compare
I removed it from the documentation. |
…to specify the used executor implementation
--executor
to specify the used executor implementation--executor
to specify the used executor implementation
No description provided.