nodejs/node

Cpplint produces false positives for FastApiOptions

已關閉

#45,761 建立於 2022年12月6日

 (10 則留言) (0 個反應) (0 位負責人)JavaScript (35,535 個分叉)batch import
c++good first issuepythonstale

倉庫指標

星標
 (117,218 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Following line is a perfectly fine declaration for v8 fast API.

using CFunctionCallbackWithInput =
    void (*)(v8::Local<v8::Value> receiver,
             const v8::FastOneByteString& source,
             const v8::FastApiTypedArray<uint8_t>& destination,
             const v8::FastApiTypedArray<uint32_t>& result,
             v8::FastApiCallbackOptions& options);

But it produces the following error

Running C++ linter...
src/node_encoding.cc:101:  Is this a non-const reference? If so, make const or use a pointer: FastApiCallbackOptions& options  [runtime/references] [2]
Done processing src/node_encoding.cc
src/node_external_reference.h:20:  Is this a non-const reference? If so, make const or use a pointer: v8::FastApiCallbackOptions& options  [runtime/references] [2]
Done processing src/node_external_reference.h
Total errors found: 2
make: *** [tools/.cpplintstamp] Error 1

貢獻者指南