adamtornhill / maat-scripts

Scripts used to post-process the results from Code Maat
GNU General Public License v3.0
74 stars 30 forks source link

Fix indexing row during complexity parsing #4

Closed Amokrane closed 7 years ago

Amokrane commented 7 years ago

Indexing using [1][2:] caused the path to the filename to be cut by two characters. As a result, the merge script was failing.

Amokrane commented 7 years ago

Hi Adam,

I was going through the examples in your book and then found out that the merge script wasn't working for me at all. I found out that it was due to the indexing when parsing the complexity file (it was eating two characters from the filename path).

Note: I tested with Python 2.7.13 and Cloc 1.72

adamtornhill commented 7 years ago

Thanks @Amokrane for your pull request! Oddly enough the old code works when I test it with Python 2.7.11 although it's a clear bug.