Re:Disable comments make static analysis tools worse
by bluGill on Tuesday July 06, 2021 @09:27AM
(#27748211)
> all static analysis rules should be followed to the letter.
But all static rules should be carefully reviewed as well. Those who wrote those C rules (probably MIRSA, but there are other sets of rules) have a long list of considerations and whys. Many of the rules of exceptions built in so that they can avoid the problems while allowing the useful case. (Ie no memory allocation EXCEPT at startup)
Re:Disable comments make static analysis tools worse
by davedx on Thursday July 08, 2021 @03:06AM
(#27769108)
Yes, you're correct of course - choose the right static analysis tools and rulesets for your project. But then follow them strictly if it's safety critical.
But all static rules should be carefully reviewed as well. Those who wrote those C rules (probably MIRSA, but there are other sets of rules) have a long list of considerations and whys. Many of the rules of exceptions built in so that they can avoid the problems while allowing the useful case. (Ie no memory allocation EXCEPT at startup)