[Webkit-unassigned] [Bug 174315] New: check-webkit-style: cpp linter incorrectly treats colon appearing in a string argument as the start of the initializer list
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jul 10 11:06:36 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=174315
Bug ID: 174315
Summary: check-webkit-style: cpp linter incorrectly treats
colon appearing in a string argument as the start of
the initializer list
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: mattbaker at apple.com
CC: lforschler at apple.com,
webkit-bug-importer at group.apple.com
check-webkit-style's cpp linter incorrectly treats colon appearing in a string argument as the start of the initializer list, and emits an error if whitespace rules aren't followed.
For example, running check-webkit-style on the following:
MyClass::MyClass()
: m_foo("foo:bar")
{
}
Will output:
ERROR: Missing spaces around : [whitespace/init] [4]
Note:
The problem is with the cpp linter regex, see Tools/Scripts/webkitpy/style/checkers/cpp.py:2043:
# match the start of initialization list
if search(r'^(?P<indentation>\s*)((explicit\s+)?[^(\s|\?)]+\([^\?]*\)\s?\:|^(\s|\?)*\:)([^\:]|\Z)[^;]*$', line):
if search(r'[^:]\:[^\:\s]+', line):
error(line_number, 'whitespace/init', 4,
'Missing spaces around :')
...
--
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/20170710/44b07406/attachment.html>
More information about the webkit-unassigned
mailing list