On 03/08/2015 07:28 PM, Dan Smith wrote: ....
Bitwise is full of that sort of stuff by nature. It's one of the most useful things that pylint can do (identifying things that a compiler would have caught, like using non-existent identifiers), yet it's going to fail miserably on any code that uses bitwise (read: almost all of chirp).
I just had pylint scan the drivers directory, and there is not as much of this as you seem to suggest. At worst, we can use an exceptions file for pylint, as we have for pep8. If there isn't a better solution, those errors can be turned off in those files. In the rest of the files, those are good errors to catch. Moreover, it catches dozens of other classes of issues, so that one possible failing should not disqualify its potential to do good.
It gets a solid endorsement from me, because it has already flagged some real errors in the code that need to be fixed. Indeed, I was originally skeptical that it would be worthwhile, since we already comply with pep8; however, these results made me think that it can be tuned to yield significant ongoing value for this project.
I'd rather you just write unit tests for things like your logger module and catch the issues that way. Further, like pep8, pylint is a moving target and keeping the config file up to date such that it continues to run on newer versions is actual work, and not work I personally want to do.
After looking at the unit testing frameworks and considering the logger module's functionality, I would rather focus my efforts on pylint integration and clean up. Even if I knew where start with writing unit tests for the logger module, that would only benefit the one module. In contrast, pylint integration could benefit the entire code base.
We're using the virtualenv, so moving targets will only be an issue when we choose to move them, right?
Speaking of which, the bigger obstacle (and perhaps a blocker) is getting pygtk and friends installed in a virtualenv, as pylint can't find them if they're not in there. When I went back to clean up cpep8.sh, I discovered that this is not trivial to accomplish on Linux.