I found this issue when trying to add our code base to a sonar installation. Several of our files does not end properly, ie the last line of the file is not an empty row. Ive attached a sample of a file not ending with an empty row.
It seems that the transformer.py can not handle those cases which means that pygenie module crashes with a
I managed to fix this with a simple string.strip() on the file content in pygenie.py, before the file content sent into the cc.py module.
As ive been unable to find the source of the pygenie file, I hope that my attached patch can be applied to the supplied version in the plugin. This will fix our problem that we are currently unable to use the python plugin as we have too many files to update to fix this issue.