src: add NOLINT to js_native_.*

* add filter to not lint NOLINT rules

PR-URL: https://github.com/nodejs/node/pull/26884
Reviewed-By: Refael Ackermann <refack@gmail.com>
This commit is contained in:
gengjiawen 2019-03-28 10:20:53 -04:00 committed by Refael Ackermann
parent 135b79a31d
commit d0e2650d03
4 changed files with 11 additions and 5 deletions

View File

@ -1,8 +1,9 @@
#ifndef SRC_JS_NATIVE_API_H_ #ifndef SRC_JS_NATIVE_API_H_
#define SRC_JS_NATIVE_API_H_ #define SRC_JS_NATIVE_API_H_
#include <stddef.h> // This file needs to be compatible with C compilers.
#include <stdbool.h> #include <stddef.h> // NOLINT(modernize-deprecated-headers)
#include <stdbool.h> // NOLINT(modernize-deprecated-headers)
#include "js_native_api_types.h" #include "js_native_api_types.h"
// Use INT_MAX, this should only be consumed by the pre-processor anyway. // Use INT_MAX, this should only be consumed by the pre-processor anyway.

View File

@ -1,8 +1,11 @@
#ifndef SRC_JS_NATIVE_API_TYPES_H_ #ifndef SRC_JS_NATIVE_API_TYPES_H_
#define SRC_JS_NATIVE_API_TYPES_H_ #define SRC_JS_NATIVE_API_TYPES_H_
#include <stddef.h> // This file needs to be compatible with C compilers.
#include <stdint.h> // This is a public include file, and these includes have essentially
// became part of it's API.
#include <stddef.h> // NOLINT(modernize-deprecated-headers)
#include <stdint.h> // NOLINT(modernize-deprecated-headers)
#if !defined __cplusplus || (defined(_MSC_VER) && _MSC_VER < 1900) #if !defined __cplusplus || (defined(_MSC_VER) && _MSC_VER < 1900)
typedef uint16_t char16_t; typedef uint16_t char16_t;

View File

@ -1,7 +1,8 @@
#ifndef SRC_JS_NATIVE_API_V8_H_ #ifndef SRC_JS_NATIVE_API_V8_H_
#define SRC_JS_NATIVE_API_V8_H_ #define SRC_JS_NATIVE_API_V8_H_
#include <string.h> // This file needs to be compatible with C compilers.
#include <string.h> // NOLINT(modernize-deprecated-headers)
#include "js_native_api_types.h" #include "js_native_api_types.h"
#include "js_native_api_v8_internals.h" #include "js_native_api_v8_internals.h"

1
tools/cpplint.py vendored
View File

@ -361,6 +361,7 @@ _DEFAULT_FILTERS = [
'-build/include_subdir', '-build/include_subdir',
'-build/include_what_you_use', '-build/include_what_you_use',
'-legal/copyright', '-legal/copyright',
'-readability/nolint',
] ]
# The default list of categories suppressed for C (not C++) files. # The default list of categories suppressed for C (not C++) files.