Bug 206481 - Fix missing header guards and clean up empty files in bmalloc, WTF, JavaScriptCore
Summary: Fix missing header guards and clean up empty files in bmalloc, WTF, JavaScrip...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-01-18 23:06 PST by David Kilzer (:ddkilzer)
Modified: 2020-01-20 12:18 PST (History)
15 users (show)

See Also:


Attachments
Patch v1 (8.20 KB, patch)
2020-01-18 23:13 PST, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff
Patch v2 (8.20 KB, patch)
2020-01-19 08:14 PST, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>