From: Noel O'B. <no...@ca...> - 2006-06-16 14:29:16
|
I have been looking in more detail at our cheeseshop score, and the low score (well, it's not too bad) is partly due to an absence of particular folders (e.g. test/example/doc) and partly due to a low score for code quality. The code quality score is calculated by pylint. I was looking into this yesterday, and today I put up on the wiki (at the end of the Development page) the HTML output of pylint. Some of the points are more serious than others (e.g. circular imports (again!) vs code formatting styles) but I'd like to improve this score over time, if possible. Not for the sake of it, but it's a way of unit testing code consistency so that new developers will be able to navigate around the code pretty easily. For example, I currently use spaces around '=' in assignments, but not around '==' in expressions. Looking at the style guidelines recently, I think I should be using spaces around both. The Python style guidelines are outlined at http://www.python.org/dev/peps/pep-0008/ which I guess is what pylint is supposed to be checking against. Don't take the pylint results as being correct, by any means; but it does seem to say some sensible things, and it'd be good to follow what's regarded as best practice. There's a link to pylint on the Development wiki page. There are a couple of dependencies, but when installed you just type: pylint --html=y cclib (from a location that does not include a folder called cclib) Regards, Noel |