I have taken the idea in the y2038.py addon and now have a new addon which warns about functions whose man page "Attribute" section marks them as MT-Unsafe.
Most important question: should I add this to the existing addon
threadsafety.py
or make a new addon ?
I have two scripts which can generate the list of MT-Unsafe functions;
the original is in perl which I am comfortable with, and a python
translation
which seems very fragile, but should have no dependencies that the
addon does not.
I will include these scripts when I submit the addon.
flake8 without a config warns about the existing cppcheck addons.
Is there a flake8 style or other linter/analyser I should use
with python code in the cppcheck project ?
Replacement threadsafety.py and a script MT-Unsafe.py to help maintain the list of unsafe objects, as found in the ATTRIBUTES section of man pages (reads the troff source).
Of course, as soon as I sent the scripts I find more bugs added when merging the new code (taken from y2038.py) into threadsafety.py.
Treat these as draft versions whilst I do more testing (and maybe include a test .cpp file).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have taken the idea in the y2038.py addon and now have a new addon which warns about functions whose man page "Attribute" section marks them as MT-Unsafe.
Most important question: should I add this to the existing addon
threadsafety.py
or make a new addon ?
I have two scripts which can generate the list of MT-Unsafe functions;
the original is in perl which I am comfortable with, and a python
translation
which seems very fragile, but should have no dependencies that the
addon does not.
I will include these scripts when I submit the addon.
flake8 without a config warns about the existing cppcheck addons.
Is there a flake8 style or other linter/analyser I should use
with python code in the cppcheck project ?
For now the three scripts are available in
https://www.aitchison.me.uk/cppcheck/threadsafety.functions/
Should this be added to the existing threadsafety.py or be a new addon ?
Any python checkers I should use ?
It sounds like a good idea. Please feel free to add this checking in threadsafety.py
Replacement threadsafety.py and a script MT-Unsafe.py to help maintain the list of unsafe objects, as found in the ATTRIBUTES section of man pages (reads the troff source).
Of course, as soon as I sent the scripts I find more bugs added when merging the new code (taken from y2038.py) into threadsafety.py.
Treat these as draft versions whilst I do more testing (and maybe include a test .cpp file).
Have you thought about opening a PR at https://github.com/danmar/cppcheck ?