@@ -6475,6 +6475,19 @@ def CheckItemIndentationInNamespace(filename, raw_lines_no_comments, linenum,
64756475 error (filename , linenum , 'runtime/indentation_namespace' , 4 ,
64766476 'Do not indent within a namespace' )
64776477
6478+ def CheckLocalVectorUsage (filename , lines , error ):
6479+ """Logs an error if std::vector<v8::Local<T>> is used.
6480+ Args:
6481+ filename: The name of the current file.
6482+ lines: An array of strings, each representing a line of the file.
6483+ error: The function to call with any errors found.
6484+ """
6485+ for linenum , line in enumerate (lines ):
6486+ if (Search (r'\bstd::vector<v8::Local<[^>]+>>' , line ) or
6487+ Search (r'\bstd::vector<Local<[^>]+>>' , line )):
6488+ error (filename , linenum , 'runtime/local_vector' , 5 ,
6489+ 'Do not use std::vector<v8::Local<T>>. '
6490+ 'Use v8::LocalVector<T> instead.' )
64786491
64796492def ProcessLine (filename , file_extension , clean_lines , line ,
64806493 include_state , function_state , nesting_state , error ,
@@ -6645,6 +6658,8 @@ def ProcessFileData(filename, file_extension, lines, error,
66456658
66466659 CheckInlineHeader (filename , include_state , error )
66476660
6661+ CheckLocalVectorUsage (filename , lines , error )
6662+
66486663def ProcessConfigOverrides (filename ):
66496664 """ Loads the configuration files and processes the config overrides.
66506665
0 commit comments