Stop using dispatch_set_target_queue()
[WebKit-https.git] / Tools / Scripts / webkitpy / style / checkers / cpp.py
index eb83c05e8ff2a0691aacae7d4d4f07454f675f64..39b08cad462cc503f9c9b84c3221c9b90e567dbf 100644 (file)
@@ -3224,6 +3224,10 @@ def check_language(filename, clean_lines, line_number, file_extension, include_s
         error(line_number, 'security/temp_file', 5,
               'Never use mktemp.  Use mkstemp or mkostemp instead.')
 
+    if search(r'\bdispatch_set_target_queue\b', line):
+        error(line_number, 'runtime/dispatch_set_target_queue', 5,
+              'Never use dispatch_set_target_queue.  Use dispatch_queue_create_with_target instead.')
+
     # Check for suspicious usage of "if" like
     # } if (a == b) {
     if search(r'\}\s*if\s*\(', line):
@@ -3941,6 +3945,7 @@ class CppChecker(object):
         'runtime/bitfields',
         'runtime/casting',
         'runtime/ctype_function',
+        'runtime/dispatch_set_target_queue',
         'runtime/enum_bitfields',
         'runtime/explicit',
         'runtime/init',