[Webkit-unassigned] [Bug 284835] New: check-webkit-style: underscore false positive warning in multiline macros defining variables using other macros

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 17 11:55:36 PST 2024


https://bugs.webkit.org/show_bug.cgi?id=284835

            Bug ID: 284835
           Summary: check-webkit-style: underscore false positive warning
                    in multiline macros defining variables using other
                    macros
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Tools / Tests
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: lmoura at igalia.com

When adding new Logging code to bug 284824, I added the following macro, like the ones in other `Logging.h` headers:

#define DECLARE_LOG_CHANNEL(name) \
    extern WTFLogChannel JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name);

Here, JOIN_LOG_CHANNEL_WITH_PREFIX is another macro, defined in `Assertions.h`.

check-webkit-style output:

filename: Source/WebDriver/Logging.h, identifier: JOIN_LOG_CHANNEL_WITH_PREFIX, modified_identifier: JOIN_LOG_CHANNEL_WITH_PREFIX
ERROR: Source/WebDriver/Logging.h:55:  JOIN_LOG_CHANNEL_WITH_PREFIX is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]

Moving the macro body to the same line makes the problem vanish, but it's kinda going against the style in the other files.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20241217/772a3b8f/attachment-0001.htm>


More information about the webkit-unassigned mailing list