john borland - 2023-06-17

I was thinking of writing a cppcheck addon for cppcheck. It would be an addon for Token::Match, Token::SimpleMatch, and if (tok->str() comparisons). I was thinking it would tell you if you have extra spases in your strings, check the spelling of %cmd%, if a match statement could be a simple match instead. I still need to do some prolifeing to see which is better if(SimpleMatch(tok,".") )vs if(tok->str()==".") and if(!SimpleMatch(tok,".") vs if(tok->str()!=".") I was looking into that I would ask if there are any other checks I should try and add to the addon? I know in token.h there is a comment about %cmd% should come first. While I'm doing objdumps of assembly and timed test is there any other things I should test?