Menu

Misra.py Limitations and False Positives

2018-11-03
2018-11-05
  • Bassam Abdul-Baki

    I'm getting a lot of false positives for Misra Rules 5.1 to 5.5. Looking at the misra.py code, I see that a lot of string comparisons only compare the first 32 characters (i.e., [:31]). Is this a CPPCheck addon limitation that you truncate all strings to the first 32 characters?

    Thanks!

     
  • Daniel Marjamäki

    I believe this is done because the MISRA pdf specify the rules this way.

    I might be wrong... I don't have the pdf right here now so I can't double check.

     
    • Bassam Abdul-Baki

      You are correct. I stand corrected. It is annoying since I found two identical macros and our code has a ton of macros that are identical for the first 31 characters. Lucky for me I can change the Python code as I desire. I'm checking for equality only.

      Thanks!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.