Open RedYetiDev opened 1 month ago
In the CPP linting configuration, the regular expression designed to identify pointers on the right side (which are considered invalid) is:
[^=|(,\s><);&?:}](?<!(sizeof|return))\s\*[a-zA-Z_][0-9a-zA-Z_]*
However, this case can occur:
#ifdef DEBUG bool consistency_check = false; isolate()->RequestInterrupt([](Isolate*, void* data) { *static_cast<bool*>(data) = true; }, &consistency_check); #endif
#ifdef DEBUG bool consistency_check = false; isolate()->RequestInterrupt( [](Isolate*, void* data) { *static_cast<bool*>(data) = true; }, &consistency_check); #endif
Although both snippets are functionally equivalent, the only difference is the formatting. The regex doesn't match the first snippet, but matches the second.
https://regex101.com/r/nGXdSj/2
CC @nodejs/linting
In the CPP linting configuration, the regular expression designed to identify pointers on the right side (which are considered invalid) is:
However, this case can occur:
Although both snippets are functionally equivalent, the only difference is the formatting. The regex doesn't match the first snippet, but matches the second.
https://regex101.com/r/nGXdSj/2