Skip to content

Commit 2f9d49a

Browse files
committed
fixup! tools: add C++ lint rule to avoid using String::Utf8Value
1 parent 9226bb1 commit 2f9d49a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/cpplint.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6496,6 +6496,9 @@ def CheckStringValueUsage(filename, lines, error):
64966496
lines: An array of strings, each representing a line of the file.
64976497
error: The function to call with any errors found.
64986498
"""
6499+
if filename.startswith('test/') or filename.startswith('test\\'):
6500+
return # Skip test files, where Node.js headers may not be available
6501+
64996502
for linenum, line in enumerate(lines):
65006503
if Search(r'\bString::Utf8Value\b', line):
65016504
error(filename, linenum, 'runtime/v8_string_value', 5,

0 commit comments

Comments
 (0)