Skip to content

Commit 5cbd112

Browse files
refackBridgeAR
authored andcommitted
src: de-lint header usage
PR-URL: #26306 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
1 parent 16d9089 commit 5cbd112

35 files changed

Lines changed: 150 additions & 152 deletions

‎src/async_wrap.cc‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22+
#include"async_wrap.h"// NOLINT(build/include_inline)
2223
#include"async_wrap-inl.h"
2324
#include"env-inl.h"
2425
#include"node_errors.h"

‎src/debug_utils.cc‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@
2222
#include<cstdio>
2323
#endif
2424

25-
#else// __POSIX__
26-
27-
#include<windows.h>
28-
#include<dbghelp.h>
29-
3025
#endif// __POSIX__
3126

3227
#if defined(__linux__) || defined(__sun) || defined(__FreeBSD__)

‎src/env.cc‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include"env.h"
2+
13
#include"async_wrap.h"
24
#include"node_buffer.h"
35
#include"node_context_data.h"
@@ -14,9 +16,9 @@
1416
#include"tracing/traced_value.h"
1517
#include"v8-profiler.h"
1618

17-
#include<cstdio>
1819
#include<algorithm>
1920
#include<atomic>
21+
#include<cstdio>
2022

2123
namespacenode {
2224

‎src/inspector/main_thread_interface.cc‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
#include"node_mutex.h"
44
#include"v8-inspector.h"
5+
#include"util-inl.h"
56

6-
#include<functional>
77
#include<unicode/unistr.h>
8-
#include"util-inl.h"
8+
9+
#include<functional>
910

1011
namespacenode {
1112
namespaceinspector {

‎src/inspector_agent.cc‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616

1717
#include"libplatform/libplatform.h"
1818

19+
#ifdef __POSIX__
20+
#include<pthread.h>
21+
#include<climits>// PTHREAD_STACK_MIN
22+
#endif// __POSIX__
23+
1924
#include<cstring>
2025
#include<sstream>
2126
#include<unordered_map>
2227
#include<vector>
2328

24-
#ifdef __POSIX__
25-
#include<climits>// PTHREAD_STACK_MIN
26-
#include<pthread.h>
27-
#endif// __POSIX__
28-
2929
namespacenode {
3030
namespaceinspector {
3131
namespace {

‎src/inspector_agent.h‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
#ifndef SRC_INSPECTOR_AGENT_H_
2-
#defineSRC_INSPECTOR_AGENT_H_
1+
#pragma once
32

43
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
54

6-
#include<memory>
7-
8-
#include<cstddef>
9-
105
#if !HAVE_INSPECTOR
116
#error("This header can only be used when inspector is enabled")
127
#endif
@@ -15,6 +10,9 @@
1510
#include"node_persistent.h"
1611
#include"v8.h"
1712

13+
#include<cstddef>
14+
#include<memory>
15+
1816
namespacev8_inspector {
1917
classStringView;
2018
} // namespace v8_inspector
@@ -143,5 +141,3 @@ class Agent {
143141
} // namespace node
144142

145143
#endif// defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
146-
147-
#endif// SRC_INSPECTOR_AGENT_H_

‎src/inspector_io.h‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
#ifndef SRC_INSPECTOR_IO_H_
2-
#defineSRC_INSPECTOR_IO_H_
1+
#pragma once
32

43
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
54

5+
#if !HAVE_INSPECTOR
6+
#error("This header can only be used when inspector is enabled")
7+
#endif
8+
69
#include"inspector_socket_server.h"
710
#include"node_mutex.h"
11+
812
#include"uv.h"
913

10-
#include<memory>
1114
#include<cstddef>
12-
13-
#if !HAVE_INSPECTOR
14-
#error("This header can only be used when inspector is enabled")
15-
#endif
15+
#include<memory>
1616

1717

1818
namespacev8_inspector {
@@ -93,5 +93,3 @@ class InspectorIo {
9393
} // namespace node
9494

9595
#endif// defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
96-
97-
#endif// SRC_INSPECTOR_IO_H_

‎src/inspector_socket.cc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
#include"openssl/sha.h"// Sha-1 hash
1414

15-
#include<map>
1615
#include<cstring>
16+
#include<map>
1717

1818
#defineACCEPT_KEY_LENGTHbase64_encoded_size(20)
1919

‎src/large_pages/node_large_page.cc‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
//
2121
// SPDX-License-Identifier: MIT
2222

23-
#include<errno.h>
24-
#include<fcntl.h>// _O_RDWR
23+
#include<errno.h>// NOLINT(build/include)
24+
#include<fcntl.h>// _O_RDWR
2525
#include<limits.h>// PATH_MAX
2626
#include<locale.h>
2727
#include<signal.h>
@@ -31,11 +31,12 @@
3131
#include<string.h>
3232
#include<sys/types.h>
3333
#include<sys/mman.h>
34+
#include<unistd.h>// readlink
35+
3436
#include<string>
3537
#include<fstream>
3638
#include<iostream>
3739
#include<sstream>
38-
#include<unistd.h>// readlink
3940

4041
// The functions in this file map the text segment of node into 2M pages.
4142
// The algorithm is simple

‎src/memory_tracker.h‎

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
#ifndef SRC_MEMORY_TRACKER_H_
2-
#defineSRC_MEMORY_TRACKER_H_
1+
#pragma once
32

43
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
54

6-
#include<unordered_map>
5+
#include"aliased_buffer.h"
6+
#include"v8-profiler.h"
7+
8+
#include<uv.h>
9+
10+
#include<limits>
711
#include<queue>
812
#include<stack>
913
#include<string>
10-
#include<limits>
11-
#include<uv.h>
12-
#include"aliased_buffer.h"
13-
#include"v8-profiler.h"
14+
#include<unordered_map>
1415

1516
namespacenode {
1617

@@ -253,5 +254,3 @@ class MemoryTracker {
253254
} // namespace node
254255

255256
#endif// defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
256-
257-
#endif// SRC_MEMORY_TRACKER_H_

0 commit comments

Comments
 (0)