kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: der.herr@hofr.at (Nicholas Mc Guire)
To: kernelnewbies@lists.kernelnewbies.org
Subject: CHECK: Alignment should match open parenthesis
Date: Fri, 13 Mar 2015 19:57:15 +0100	[thread overview]
Message-ID: <20150313185715.GA30628@opentech.at> (raw)
In-Reply-To: <4E5779AD88B2F040B8A7E83ECF544D1A5C64F7@SJCPEX01CL03.citrite.net>


<snip>
> > > 
> > > I often see people writing posts to this list stating that they are want to get started and want to contribute something. I suppose this thread provides a suggestion for them. Take the latest version of checkpatch .pl and reverse engineer from it an update to the coding style document that documents in plain, human readable English what that script implements. Seems it bit back asswards to me for the requirements to derive from a script that implements them, but that seems to be where we are at. The very fact that this thread even exists, that the original question needed to be asked demonstrates that there's something missing in the style document.
> > >
> > 
> > > If you look at things like MISRA-C - 200+ "Rules" to follow for safe code it turns out that basically nobody is able to write MISRA compliant code under consideration of all 200+ rules unless they have tools that tell them what is wrong with enough information that it can be fixed. And at the same time having those rules codified makes it hard (if not impossible) to update/maintain these rules - lots of which are actually out of date or overstated but now can't be "fixed" - It might help to have this up on a web-page/wiki somewhere - but if you put this into Documentation/CodingStyle at this granularity the rate of people reading and keeping it cache-hot while coding would sharply decline.
> > 
> > I'm not familiar with MISRA-C (it appears to be a non-open standard from the wiki I just read about it, that in of itself demonstrates a problem with it if the wiki is correct), but at least it appears that it attempts to document a standard that various tool implementers can follow if they choose to do so. If people coding to it don't want to bother to read it, they can choose to rely on the tools and if and when the tools generate different results, then there is a written standard that can be consulted to determine which tool is broken.
> > 
> > By what standard are changes to checkpatch.pl to be judged?
> >
> >MISRA-C is a closed standard - probably not a good example of a bad example :)
> >
> >putting the rules into a specification file would make sense but putting them into the CodingStyle directly I think would be problematic - my take on the CodingStyle file is to get the general rules clarified in a way that it can be remembered relatively easy but not overload it with details.
> >
> >most of the rules are outlined in the checkpatch.pl directly in one/two line statements for the rule that started this discusison.
> >
> ># at the beginning of a line any tabs must come first and anything # more than 8 must use tabs.
> >
> >so maybe a solution to the missing complete set would be to improve that in source description of each rule and add an option to checkpatch.pl to list all of the rules. Not sure if that makes sense but it would atleast keep things in one location.
> 
> Still:
> 
> > By what standard are changes to checkpatch.pl to be judged?
>

Documentation/CodingStyle is a sufficiently stable basis that the detailed
checker rules can then be changed by the normal consent achieved by posting
patches to checkpatch.pl to the appropriate maintainer+LKML.

An evolutionary approach is more robust that trying to put it
down in detail at one point - note that scripts/checkpatch.pl
has had about 440 patches applied in its life-time - 
  git log --pretty=format:"%s" scripts/checkpatch.pl | wc
so one could speculate that any CodingStyle that wanted to put
rules down in detail would end up being at least a few hundred 
rules long wich would be hard to keep synced in detail with
an evolving script aside from being hard to use for daily work.

Extracting the rule set so that it could be used by new 
developers would be sufficient to support new developers and
doing that from checkpatch.pl directly would allow to keep it
maintainable.

thx!
hofrat

      reply	other threads:[~2015-03-13 18:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-13 12:07 CHECK: Alignment should match open parenthesis palik imre
2015-03-13 12:43 ` Nicholas Mc Guire
2015-03-13 13:09   ` palik imre
2015-03-13 13:28     ` Nicholas Mc Guire
2015-03-13 13:47       ` Nicholas Mc Guire
2015-03-13 14:35         ` Daniel Baluta
2015-03-13 14:46           ` Greg KH
2015-03-13 15:33           ` Nicholas Mc Guire
2015-03-13 16:15             ` Daniel Baluta
2015-03-13 16:46             ` Jeff Haran
2015-03-13 16:58               ` Nicholas Mc Guire
2015-03-13 17:18                 ` Jeff Haran
2015-03-13 17:31                   ` Nicholas Mc Guire
2015-03-13 18:05                     ` Jeff Haran
2015-03-13 18:57                       ` Nicholas Mc Guire [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150313185715.GA30628@opentech.at \
    --to=der.herr@hofr.at \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).