[issue8912] `make patchcheck` should check the whitespace of .c/.h files

Éric Araujo report at bugs.python.org
Tue Jun 15 12:08:19 CEST 2010


Éric Araujo <merwok at netwok.org> added the comment:

Thanks for the helpful reviews. I have fixed the trailing whitespace check with “line[-2:-1].isspace()”, but I have a bug with my file counting. Before I go further, I’d like feedback from people using patchcheck:

1) Reindenting Python is a task best handled by reindent.py, but checking for tabs, line length and trailing whitespace is basically a reimplementation of grep and wc. Is it an explicit and important goal that patchcheck.py be independent of external tools?

2) Do you like the current report format? (“checking for one thing: n files”) It requires you to use grep of your editor’s search after checking. What about printing out file names and line numbers?

3) What about a function to strip trailing spaces and add a final newline where needed instead of just complaining? Is it okay to replace tabs with spaces in C too?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8912>
_______________________________________


More information about the Python-bugs-list mailing list