Hi!

I've been getting a little annoyed lately by the nitpicking checkpatch
check in Jenkins. For example, my latest patch failed due to some
(non-documented?) check for tabs-after-spaces (
http://openocd.zylin.com/jenkins/job/openocd-gerrit/603/ ). The
problem is that the changed lines follow the same style as the
surrounding lines, so if I want to pass checkpatch, I have to fix the
formatting of a number of unrelated lines, so that it won't get
inconsistent. Apart from being a PITA (I have better things to do), it
obscures the relevant parts of the diff and goes against the common
practice of separating formatting changes and functional changes into
separate patches.

I'm also getting problems with "visually pleasing" formatting
(subjective, I know) getting rejected by checkpatch. For example, when
I break long lines, I'd like to align the second and following lines
to, say, an opening parenthesis in the first line. I use spaces for
such alignment, while keeping the same number of tabs as the first
line, giving a good, consistent result, regardless of tabsize
settings. Eclipse does a very good job of doing this automatically.
However, checkpatch (with apparently no knowledge of C syntax)
complains that spaces shouldn't be used for indentation. Perhaps this
kind of formatting is frowned upon, that's OK, I can adapt. But I'd
hate to have to write ugly code because checkpatch is too crude a tool
in relation to the weight of its report.

So, can we disable checkpatch checking at least until the entire tree
would pass in itself, and/or dumb it down so it checks only basic,
documented style violations (braces placement, spaces in expressions
and so forth)? Possible? Desirable?

I have a number of patchsets in the pipe, developed on separate
branches, each branch with a large number of "internal" commits
containing buggy code, bugfixes, dead ends, rewrites, unimplemented
stubs, reordered code and other messy stuff. Even if I manage to
rebase and squash them to neat patchsets, I think it's going to be a
lot of work to make each final patch pass checkpatch. So I'm inclined
to just squash everything to a single commit, amend it with fixes for
the formatting issues, and push. How do people manage this otherwise
without spending hours? Of course, one solution would be to have the
discipline to make each internal commit pass checks from the start,
but then I would have to spend more time formatting code than writing
it. Not funny.

Happy coding,
Andreas

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to