Bug 206481

Summary: Fix missing header guards and clean up empty files in bmalloc, WTF, JavaScriptCore
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: JavaScriptCoreAssignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, commit-queue, darin, dbates, ews-watchlist, keith_miller, mark.lam, msaboff, rmorisset, saam, tzagallo, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=206448
https://bugs.webkit.org/show_bug.cgi?id=206480
https://bugs.webkit.org/show_bug.cgi?id=206505
Attachments:
Description Flags
Patch v1
none
Patch v2 none

Description David Kilzer (:ddkilzer) 2020-01-18 23:06:26 PST
Fix missing header guards and clean up empty files in bmalloc, WTF, JavaScriptCore.

Bug 206480 improves check-webkit-style to do a better job at finding missing header guards in non-Objective-C files:

$ ./Tools/Scripts/check-webkit-style --filter=-,+build/header_guard_missing Source/bmalloc
ERROR: Source/bmalloc/bmalloc/ScopeExit.h:26:  Missing #pragma once for header guard.  [build/header_guard_missing] [5]
Total errors found: 1 in 142 files

$ ./Tools/Scripts/check-webkit-style --filter=-,+build/header_guard_missing Source/WTF
ERROR: Source/WTF/wtf/win/PathWalker.h:26:  Missing #pragma once for header guard.  [build/header_guard_missing] [5]
ERROR: Source/WTF/wtf/cocoa/Entitlements.h:26:  Missing #pragma once for header guard.  [build/header_guard_missing] [5]
Total errors found: 2 in 800 files

$ ./Tools/Scripts/check-webkit-style --filter=-,+build/header_guard_missing Source/JavaScriptCore
ERROR: Source/JavaScriptCore/dfg/DFGPrePostNumbering.h:2:  Missing #pragma once for header guard.  [build/header_guard_missing] [5]
ERROR: Source/JavaScriptCore/b3/testb3.h:26:  Missing #pragma once for header guard.  [build/header_guard_missing] [5]
ERROR: Source/JavaScriptCore/JavaScriptCore.vcxproj/resource.h:5:  Missing #pragma once for header guard.  [build/header_guard_missing] [5]
ERROR: Source/JavaScriptCore/wasm/WasmGeneratorTraits.h:26:  Missing #pragma once for header guard.  [build/header_guard_missing] [5]
ERROR: Source/JavaScriptCore/runtime/OptionEntry.h:2:  Missing #pragma once for header guard.  [build/header_guard_missing] [5]
ERROR: Source/JavaScriptCore/API/JSCallbackObjectFunctions.h:27:  Missing #pragma once for header guard.  [build/header_guard_missing] [5]
WARNING: File exempt from style guide. Skipping: "Source/JavaScriptCore/API/glib/JSCWrapperMap.h"
WARNING: File exempt from style guide. Skipping: "Source/JavaScriptCore/API/glib/JSCException.h"
WARNING: File exempt from style guide. Skipping: "Source/JavaScriptCore/API/glib/JSCAutocleanups.h"
WARNING: File exempt from style guide. Skipping: "Source/JavaScriptCore/API/glib/JSCOptions.h"
WARNING: File exempt from style guide. Skipping: "Source/JavaScriptCore/API/glib/JSCCallbackFunction.h"
WARNING: File exempt from style guide. Skipping: "Source/JavaScriptCore/API/glib/JSCDefines.h"
WARNING: File exempt from style guide. Skipping: "Source/JavaScriptCore/API/glib/JSCContext.h"
WARNING: File exempt from style guide. Skipping: "Source/JavaScriptCore/API/glib/JSCClass.h"
WARNING: File exempt from style guide. Skipping: "Source/JavaScriptCore/API/glib/JSCWeakValue.h"
WARNING: File exempt from style guide. Skipping: "Source/JavaScriptCore/API/glib/JSCGLibWrapperObject.h"
WARNING: File exempt from style guide. Skipping: "Source/JavaScriptCore/API/glib/JSCValue.h"
WARNING: File exempt from style guide. Skipping: "Source/JavaScriptCore/API/glib/jsc.h"
WARNING: File exempt from style guide. Skipping: "Source/JavaScriptCore/API/glib/JSCVirtualMachine.h"
ERROR: Source/JavaScriptCore/heap/IsoInlinedHeapCellType.h:26:  Missing #pragma once for header guard.  [build/header_guard_missing] [5]
Total errors found: 7 in 3153 files

To find empty files, use:

$ find [path] -size 0
Comment 1 David Kilzer (:ddkilzer) 2020-01-18 23:13:05 PST
Created attachment 388172 [details]
Patch v1
Comment 2 David Kilzer (:ddkilzer) 2020-01-19 08:13:29 PST
Comment on attachment 388172 [details]
Patch v1

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

> Source/JavaScriptCore/b3/testb3.h:2
> + * Copyright (C) 2019=2020 Apple Inc. All rights reserved.

Oops!  Will upload a new patch for this typo.
Comment 3 David Kilzer (:ddkilzer) 2020-01-19 08:14:08 PST
Created attachment 388189 [details]
Patch v2
Comment 4 WebKit Commit Bot 2020-01-20 12:17:45 PST
Comment on attachment 388189 [details]
Patch v2

Clearing flags on attachment: 388189

Committed r254832: <https://trac.webkit.org/changeset/254832>
Comment 5 WebKit Commit Bot 2020-01-20 12:17:47 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2020-01-20 12:18:17 PST
<rdar://problem/58742814>