asar icon indicating copy to clipboard operation
asar copied to clipboard

I ran some static analysis tools on asar

Open trillllian opened this issue 7 years ago • 4 comments
trafficstars

Cppcheck report Clang's static analyzer report Most of these are false positives but there may be some actual bugs here. For example, I'm pretty sure the memory leak in requeststrfromuser is real (although it only leaks 256 bytes every time a string is requested, which happens like twice in total)

trillllian avatar Apr 01 '18 08:04 trillllian

Code coverage generated by gcov This was generated by running the entire test suite with gcov enabled. The test coverage is surprisingly good. I'm quite sure it's possible to integrate this into the CI testing too.

trillllian avatar May 10 '18 19:05 trillllian

Note quite sure what to make of it, though. If I understand correctly, It's telling us how often a certain line is executed, but unless we're having performance problems (which doesn't seem to be the case right now), is there any other benefit in knowing which lines are executed more often?

RPGHacker avatar May 10 '18 19:05 RPGHacker

It's more meant to show which lines are not executed at all when running the test suite, showing which ones are executed most often is just a neat extra feature.

trillllian avatar May 10 '18 19:05 trillllian

Oh, I get the idea now. So it's basically a hint which lines aren't tested much by the test suite and could use some tests dedicated to them to make sure everything's working.

RPGHacker avatar May 10 '18 19:05 RPGHacker