Commit 396e352
committed
tools: silence cpplint refs warning for v8 fast api options
cpplint's runtime/references rule flags non-const reference parameters
as a style violation. v8::FastApiCallbackOptions& is part of the V8
Fast API contract: V8 dictates the signature and Node.js has no say,
so the warning is a false positive on every Fast API callback.
Most call sites in src/ also `using v8::FastApiCallbackOptions;` and
declare the parameter as the unqualified `FastApiCallbackOptions&`,
which a fully qualified pattern would miss. Allowlist both forms in
CheckForNonConstReference and add a unit test that exercises both
spellings while keeping the rule active for unrelated `Type&` params.
Fixes: #45761
Signed-off-by: Maruthan G <[email protected]>1 parent 58a8e1d commit 396e352
2 files changed
Lines changed: 81 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6036 | 6036 | | |
6037 | 6037 | | |
6038 | 6038 | | |
| 6039 | + | |
| 6040 | + | |
| 6041 | + | |
| 6042 | + | |
| 6043 | + | |
6039 | 6044 | | |
6040 | 6045 | | |
6041 | 6046 | | |
| |||
6585 | 6590 | | |
6586 | 6591 | | |
6587 | 6592 | | |
6588 | | - | |
6589 | | - | |
| 6593 | + | |
| 6594 | + | |
| 6595 | + | |
| 6596 | + | |
6590 | 6597 | | |
6591 | 6598 | | |
6592 | 6599 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
0 commit comments