Bug 68256 - CodeGeneratorGObject should use C++ style comments for ENABLE guards
Summary: CodeGeneratorGObject should use C++ style comments for ENABLE guards
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on: 68299
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-16 10:33 PDT by Adam Barth
Modified: 2011-09-16 22:26 PDT (History)
4 users (show)

See Also:


Attachments
Patch (51.92 KB, patch)
2011-09-16 10:34 PDT, Adam Barth
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2011-09-16 10:33:05 PDT
CodeGeneratorGObject should use C++ style comments for ENABLE guards
Comment 1 Adam Barth 2011-09-16 10:34:27 PDT
Created attachment 107680 [details]
Patch
Comment 2 Darin Adler 2011-09-16 10:55:12 PDT
Comment on attachment 107680 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=107680&action=review

> Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm:58
> + * This file is part of the WebKit open source project.
> + * This file has been generated by generate-bindings.pl. DO NOT MODIFY!

Not specific to this patch, really, but I don’t think that adding stars to every line improves this comment. In fact, I think this format should be considered an anti-pattern in the future. Those additional stars make it slightly easier to spot that it's a comment, but also make comments harder to edit with any non-advanced editing tools.

If we really want something on every line, then we should just use // comments. The whole benefit of /* */ comments is that they are multiline without requiring additional characters on every line.
Comment 3 Adam Barth 2011-09-16 11:02:15 PDT
Ok.  I'll change them to //, which is also a common style for license blocks in the project.  I'm not sure it's such a big deal for these generated files.  Mostly it was the ENABLE-guard comments that I bumped into.
Comment 4 Adam Barth 2011-09-16 11:05:28 PDT
Committed r95304: <http://trac.webkit.org/changeset/95304>
Comment 5 Ryosuke Niwa 2011-09-16 18:34:15 PDT
I had to roll this patch out because GTK+ pulls the derived headers in main.c.
Comment 6 Adam Barth 2011-09-16 22:06:49 PDT
Whatever.  This is too much work for too little benefit.
Comment 7 Ryosuke Niwa 2011-09-16 22:26:31 PDT
(In reply to comment #6)
> Whatever.  This is too much work for too little benefit.

Yeah, I completely agree.