priv-kweihmann / multimetric

Calculate code metrics in various languages
zlib License
36 stars 13 forks source link

Maintainability SEI Calculation uses log2 instead of ln #80

Closed wienans closed 8 months ago

wienans commented 8 months ago

Branch 2.x https://github.com/priv-kweihmann/multimetric/blob/8daf11b1e053209379e7f95f0f04db50bb97db6d/multimetric/cls/calc/maintenance.py#L74-L79 V1.3 https://github.com/priv-kweihmann/multimetric/blob/1bb8a8b2c28a7d817c3f57736d08e4fb13e9c16c/multimetric/cls/calc/maintenance.py#L8-L23 Hey i found a issue that the SEI maintainiblity calculation uses log base 2 instead of ln like discribed in the reference given https://insights.sei.cmu.edu/documents/1625/1997_002_001_16523.pdf page 232

Appart from that the documentation of classic method does not match the calculation https://github.com/priv-kweihmann/multimetric/blob/8daf11b1e053209379e7f95f0f04db50bb97db6d/multimetric/cls/calc/maintenance.py#L157

priv-kweihmann commented 8 months ago

Patches welcome!!!!

wienans commented 8 months ago

@priv-kweihmann please see PullRequest #82

priv-kweihmann commented 8 months ago

PR merged, I guess we can close the ticket now

wienans commented 8 months ago

Thanks. Currently working on a additional PR about the radon calculation. And as I tried to implement it noticed that Comment percent is not 0-1 which is expected. This might be problematic for sei too might do changes to sei too will try to verify calculations externally