lkml.org 
[lkml]   [2013]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] checkpatch: Find CamelCase definitions of struct/union/enum
From
Date
On Wed, 2013-09-25 at 17:19 +0100, Al Viro wrote:
> On Wed, Sep 25, 2013 at 08:35:44AM -0700, Joe Perches wrote:
> > I think Propercase should be discouraged.
> > ie: Qdisc et al.
>
> Excuse me, but "Joe happens to think that something should be discouraged"
> is not a problem. "Joe uses checkpatch.pl as force multiplier, recruiting
> hundreds of monkeys to enforce his personal preferences", OTOH, very much is.

Hah. I'm still looking to acquire minions not monkeys,
and the force seems weak in that one. Enthralling the
wannabe thralls isn't working...

CamelCase uses are not reported by default.

So not to worry Al, CamelCase is a --strict (CHECK) test
and almost no one ever uses --strict.

> You are calling for ban on any mixed-case identifiers. I see at least three
> cases where they can be legitimate:

If I was calling for anything remotely like a "ban",
I'd try to add it to CodingStyle.

> * labels a-la Enomem, etc. I've been using those and I will
> keep doing so, checkpatch.pl and its users be damned.

Good on you.

> * enum members, to distinguish those from defines (first letter
> capitalized vs. all-caps).

Shrug. There aren't that many uses of that style.

> * (local) typedefs for structs; I really don't like their use for
> anything non-local, but IMO they have their uses in cases like e.g.
> fs/binfmt_misc.c

Fine by me. Don't use checkpatch. No stress from me.

It's pretty obvious from fs/binfmt_misc.c that you have
your own taste.

$ scripts/checkpatch.pl -f --strict fs/binfmt_misc.c
[...]
total: 45 errors, 39 warnings, 10 checks, 725 lines checked




\
 
 \ /
  Last update: 2013-09-25 21:41    [W:0.075 / U:1.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site