check-webkit-style: fix false-positive warnings about using #pragma once header guard
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Oct 2016 19:50:40 +0000 (19:50 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Oct 2016 19:50:40 +0000 (19:50 +0000)
commit3a6a1125c6459f5b82d561dacbf11b848d60b739
treebb7421d161daf952b3fe9f0a0d77b805499fbcc1
parentc8b72aa72a36731587591432ecb2c0ce6fb9e4fc
check-webkit-style: fix false-positive warnings about using #pragma once header guard
https://bugs.webkit.org/show_bug.cgi?id=163575

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-10-19
Reviewed by Brady Eidson.

There were some false positive warnings about header guards
for ObjC headers that don't need guards. This changes the
style checker to no longer warn if there is no #pragma once.
It only warns if there are #ifndef that should be #pragma once.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_for_header_guard):
Change when we output an error.

* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest.test_build_header_guard):
Update tests.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207559 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/Scripts/webkitpy/style/checkers/cpp.py
Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py