Skip to content

Commit d0e2650

Browse files
gengjiawenrefack
authored andcommitted
src: add NOLINT to js_native_.*
* add filter to not lint NOLINT rules PR-URL: #26884 Reviewed-By: Refael Ackermann <[email protected]>
1 parent 135b79a commit d0e2650

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

src/js_native_api.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#ifndef SRC_JS_NATIVE_API_H_
22
#define SRC_JS_NATIVE_API_H_
33

4-
#include <stddef.h>
5-
#include <stdbool.h>
4+
// This file needs to be compatible with C compilers.
5+
#include <stddef.h> // NOLINT(modernize-deprecated-headers)
6+
#include <stdbool.h> // NOLINT(modernize-deprecated-headers)
67
#include "js_native_api_types.h"
78

89
// Use INT_MAX, this should only be consumed by the pre-processor anyway.

src/js_native_api_types.h

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
#ifndef SRC_JS_NATIVE_API_TYPES_H_
22
#define SRC_JS_NATIVE_API_TYPES_H_
33

4-
#include <stddef.h>
5-
#include <stdint.h>
4+
// This file needs to be compatible with C compilers.
5+
// This is a public include file, and these includes have essentially
6+
// became part of it's API.
7+
#include <stddef.h> // NOLINT(modernize-deprecated-headers)
8+
#include <stdint.h> // NOLINT(modernize-deprecated-headers)
69

710
#if !defined __cplusplus || (defined(_MSC_VER) && _MSC_VER < 1900)
811
typedef uint16_t char16_t;

src/js_native_api_v8.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#ifndef SRC_JS_NATIVE_API_V8_H_
22
#define SRC_JS_NATIVE_API_V8_H_
33

4-
#include <string.h>
4+
// This file needs to be compatible with C compilers.
5+
#include <string.h> // NOLINT(modernize-deprecated-headers)
56
#include "js_native_api_types.h"
67
#include "js_native_api_v8_internals.h"
78

tools/cpplint.py

+1
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ def GetNonHeaderExtensions():
361361
'-build/include_subdir',
362362
'-build/include_what_you_use',
363363
'-legal/copyright',
364+
'-readability/nolint',
364365
]
365366

366367
# The default list of categories suppressed for C (not C++) files.

0 commit comments

Comments
 (0)