mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 10:15:07 +08:00
deps,src: prepare for cpplint update
Disable linting where there are false positives or clashes whith the C++ formatter. PR-URL: https://github.com/nodejs/node/pull/60901 Fixes: https://github.com/nodejs/node/issues/60771 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
This commit is contained in:
1 parent
85852a3221
commit
09c4f6f41c
6 files changed
+16
-3
No files matched your search
Vendored
+4
-1
@@ -66,7 +66,10 @@ namespace ncrypto {
|
||||
#define NCRYPTO_STR(x) #x
|
||||
#define NCRYPTO_REQUIRE(EXPR) \
|
||||
{ \
|
||||
if (!(EXPR) { abort(); }) }
|
||||
if (!(EXPR)) { \
|
||||
abort(); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define NCRYPTO_FAIL(MESSAGE) \
|
||||
do { \
|
||||
|
||||
@@ -556,7 +556,9 @@ Maybe<void> Decorate(Environment* env,
|
||||
#define V(name) case ERR_LIB_##name: lib = #name "_"; break;
|
||||
const char* lib = "";
|
||||
const char* prefix = "OSSL_";
|
||||
switch (ERR_GET_LIB(err)) { OSSL_ERROR_CODES_MAP(V) }
|
||||
switch (ERR_GET_LIB(err)) { /* NOLINT(whitespace/newline) */
|
||||
OSSL_ERROR_CODES_MAP(V)
|
||||
}
|
||||
#undef V
|
||||
#undef OSSL_ERROR_CODES_MAP
|
||||
// Don't generate codes like "ERR_OSSL_SSL_".
|
||||
|
||||
@@ -150,6 +150,8 @@ void AsyncHooks::push_async_context(
|
||||
|
||||
// When this call comes from JS (as a way of increasing the stack size),
|
||||
// `resource` will be empty, because JS caches these values anyway.
|
||||
// False positive: https://github.com/cpplint/cpplint/issues/410
|
||||
// NOLINTNEXTLINE(whitespace/newline)
|
||||
if (std::visit([](auto* ptr) { return ptr != nullptr; }, resource)) {
|
||||
native_execution_async_resources_.resize(offset + 1);
|
||||
// Caveat: This is a v8::Local<>* assignment, we do not keep a v8::Global<>!
|
||||
|
||||
@@ -206,6 +206,8 @@ static bool IsIPAddress(const std::string& host) {
|
||||
// (other than ::/128) that represent non-routable IPv4 addresses. However,
|
||||
// this translation assumes that the host is interpreted as an IPv6 address
|
||||
// in the first place, at which point DNS rebinding should not be an issue.
|
||||
// False positive: https://github.com/cpplint/cpplint/issues/410
|
||||
// NOLINTNEXTLINE(whitespace/newline)
|
||||
if (std::ranges::all_of(ipv6, [](auto b) { return b == 0; })) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
|
||||
typedef napi_value(NAPI_CDECL* napi_addon_register_func)(napi_env env,
|
||||
napi_value exports);
|
||||
// False positive: https://github.com/cpplint/cpplint/issues/409
|
||||
// NOLINTNEXTLINE (readability/casting)
|
||||
typedef int32_t(NAPI_CDECL* node_api_addon_get_api_version_func)(void);
|
||||
|
||||
typedef struct napi_callback_scope__* napi_callback_scope;
|
||||
|
||||
+3
-1
@@ -161,7 +161,9 @@ constexpr std::string to_string(ngtcp2_cc_algo cc_algorithm) {
|
||||
#define V(name, label) \
|
||||
case NGTCP2_CC_ALGO_##name: \
|
||||
return #label;
|
||||
switch (cc_algorithm) { CC_ALGOS(V) }
|
||||
switch (cc_algorithm) { /* NOLINT(whitespace/newline) */
|
||||
CC_ALGOS(V)
|
||||
}
|
||||
return "<unknown>";
|
||||
#undef V
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user