WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
175652
check-webkit-style shouldn't check spacing in #elif preprocessor lines
https://bugs.webkit.org/show_bug.cgi?id=175652
Summary
check-webkit-style shouldn't check spacing in #elif preprocessor lines
Yoshiaki Jitsukawa
Reported
2017-08-16 19:09:36 PDT
check-webkit-style generates false positive [whitespace/operators] errors around path delimiter '/' for __has_include() predicate.
Attachments
Patch
(1.85 KB, patch)
2017-08-16 19:16 PDT
,
Yoshiaki Jitsukawa
no flags
Details
Formatted Diff
Diff
Patch
(2.56 KB, patch)
2017-08-17 12:54 PDT
,
Yoshiaki Jitsukawa
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Yoshiaki Jitsukawa
Comment 1
2017-08-16 19:16:28 PDT
Created
attachment 318317
[details]
Patch
Yoshiaki Jitsukawa
Comment 2
2017-08-16 19:28:05 PDT
e.g. ./platform/spi/mac/AVFoundationSPI.h:#if __has_include(<AVFoundation/AVSampleBufferRenderSynchronizer.h>)
Alex Christensen
Comment 3
2017-08-17 09:35:11 PDT
I'm pretty sure check-webkit-style has tests.
Yoshiaki Jitsukawa
Comment 4
2017-08-17 12:26:52 PDT
(In reply to Alex Christensen from
comment #3
)
> I'm pretty sure check-webkit-style has tests.
Yes
https://trac.webkit.org/browser/webkit/trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py#L2035
Yoshiaki Jitsukawa
Comment 5
2017-08-17 12:28:40 PDT
(In reply to Yoshiaki Jitsukawa from
comment #4
)
> (In reply to Alex Christensen from
comment #3
) > > I'm pretty sure check-webkit-style has tests. > > Yes >
https://trac.webkit.org/browser/webkit/trunk/Tools/Scripts/webkitpy/style/
> checkers/cpp_unittest.py#L2035
Ah, the test passes because of "#if" so I needed to change this "#if" to something else.
Yoshiaki Jitsukawa
Comment 6
2017-08-17 12:54:05 PDT
Created
attachment 318404
[details]
Patch
Yoshiaki Jitsukawa
Comment 7
2017-08-17 12:57:56 PDT
Originally I hit this issue with "#elif __has_include.." code so now I think this should be handled by skipping spacing checks for "#elif".
Yoshiaki Jitsukawa
Comment 8
2017-08-17 13:00:04 PDT
Related bug:
Bug 125534
- check-webkit-style shouldn't check spacing in #if preprocessor lines
Yoshiaki Jitsukawa
Comment 9
2017-08-17 15:52:08 PDT
Hi Alex, would you review my patch again if you are available?
WebKit Commit Bot
Comment 10
2017-08-17 19:17:10 PDT
Comment on
attachment 318404
[details]
Patch Clearing flags on attachment: 318404 Committed
r220896
: <
http://trac.webkit.org/changeset/220896
>
WebKit Commit Bot
Comment 11
2017-08-17 19:17:11 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 12
2017-08-17 19:18:48 PDT
<
rdar://problem/33955505
>
Yoshiaki Jitsukawa
Comment 13
2017-08-17 19:38:09 PDT
Thank you for your reviewing, Alex!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug