|
From: | Michael Roth |
Subject: | Re: [Qemu-devel] checkpatch.pl: warn on C99 comments, but don't fail |
Date: | Fri, 01 Apr 2011 11:55:39 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 |
On 04/01/2011 11:16 AM, Peter Maydell wrote:
On 1 April 2011 16:59, Stefan Hajnoczi<address@hidden> wrote:On Fri, Apr 1, 2011 at 4:52 PM, Peter Maydell<address@hidden> wrote:On 1 April 2011 16:20, Michael Roth<address@hidden> wrote:We also make C99 //comments a warning instead of an error, since they don't actually violate QEMU's coding guidelines.We should either update the guidelines or fix the script...There are a whole bunch of // in the codebase. I prefer /* */ but as it stands I think // should not even raise a warning.I don't care much either, really. I just don't think we should be introducing random coding standards rules by the back door because checkpatch happens to complain about them.
Whether or not // comments should also be a warning...I'm not sure. It seems like a reasonable "suggestion" to make though, since mixed comment styles makes code look nastier. I could also go either way though...
But there *are* some warnings that make sense to complain about without saying "you can't do this", like extern's in .c files: some cases are exceptional.
I'd prefer to only document "strict" guidelines, and treat checkpatch.pl warnings ("suggestions") as an extra "reward" you get for taking the time to run it.
-- PMM
[Prev in Thread] | Current Thread | [Next in Thread] |