From fb4dc157572a40eebabd33bb13f0c471ba550729 Mon Sep 17 00:00:00 2001 From: Andi-Bogdan Postelnicu Date: Thu, 20 Sep 2018 07:38:27 +0000 Subject: [PATCH] Bug 1480089 - pass all of the test files to to our static-analysis pipeline. r=janx Differential Revision: https://phabricator.services.mozilla.com/D4659 --HG-- extra : moz-landing-system : lando --- python/mozbuild/mozbuild/mach_commands.py | 119 ++++++++++++------ .../test/bugprone-argument-comment.json | 2 +- .../test/bugprone-assert-side-effect.json | 2 +- ...rone-bool-pointer-implicit-conversion.json | 2 +- ...ugprone-forward-declaration-namespace.json | 2 +- .../bugprone-macro-repeated-side-effects.json | 2 +- .../test/bugprone-string-constructor.json | 2 +- .../bugprone-string-integer-assignment.json | 2 +- .../bugprone-suspicious-memset-usage.json | 2 +- .../bugprone-suspicious-missing-comma.json | 2 +- .../test/bugprone-suspicious-semicolon.json | 2 +- .../test/bugprone-swapped-arguments.json | 2 +- .../clang-tidy/test/bugprone-unused-raii.json | 2 +- .../clang-analyzer-cplusplus.NewDelete.json | 2 +- ...ang-analyzer-cplusplus.NewDeleteLeaks.json | 2 +- .../clang-analyzer-deadcode.DeadStores.json | 2 +- ...ng-analyzer-security.FloatLoopCounter.json | 2 +- ...-security.insecureAPI.UncheckedReturn.json | 2 +- ...ng-analyzer-security.insecureAPI.bcmp.json | 2 +- ...g-analyzer-security.insecureAPI.bcopy.json | 2 +- ...g-analyzer-security.insecureAPI.bzero.json | 2 +- ...g-analyzer-security.insecureAPI.getpw.json | 2 +- ...analyzer-security.insecureAPI.mkstemp.json | 2 +- ...-analyzer-security.insecureAPI.mktemp.json | 2 +- ...g-analyzer-security.insecureAPI.vfork.json | 2 +- .../test/clang-analyzer-unix.Malloc.json | 2 +- ...lang-analyzer-unix.cstring.BadSizeArg.json | 2 +- .../clang-analyzer-unix.cstring.NullArg.json | 2 +- .../test/misc-unused-alias-decls.json | 2 +- .../test/misc-unused-using-decls.json | 2 +- .../clang-tidy/test/modernize-avoid-bind.json | 2 +- .../test/modernize-loop-convert.json | 2 +- .../test/modernize-raw-string-literal.json | 2 +- .../test/modernize-shrink-to-fit.json | 2 +- .../test/modernize-use-bool-literals.json | 2 +- .../test/modernize-use-equals-default.json | 2 +- .../test/modernize-use-equals-delete.json | 2 +- .../test/modernize-use-nullptr.json | 2 +- .../test/performance-faster-string-find.json | 2 +- .../test/performance-for-range-copy.json | 2 +- ...rformance-implicit-conversion-in-loop.json | 2 +- .../performance-inefficient-algorithm.json | 2 +- ...ance-inefficient-string-concatenation.json | 2 +- ...formance-inefficient-vector-operation.json | 2 +- .../test/performance-move-const-arg.json | 2 +- .../performance-move-constructor-init.json | 2 +- ...performance-noexcept-move-constructor.json | 2 +- ...performance-type-promotion-in-math-fn.json | 2 +- ...mance-unnecessary-copy-initialization.json | 2 +- .../performance-unnecessary-value-param.json | 2 +- .../readability-braces-around-statements.json | 2 +- .../readability-container-size-empty.json | 2 +- .../test/readability-else-after-return.json | 2 +- .../readability-misleading-indentation.json | 2 +- .../readability-redundant-control-flow.json | 2 +- .../readability-redundant-string-cstr.json | 2 +- .../readability-redundant-string-init.json | 2 +- ...lity-static-accessed-through-instance.json | 2 +- .../readability-uniqueptr-delete-release.json | 2 +- 59 files changed, 138 insertions(+), 97 deletions(-) diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py index 43cdec12ec77..9a71a53ebc9b 100644 --- a/python/mozbuild/mozbuild/mach_commands.py +++ b/python/mozbuild/mozbuild/mach_commands.py @@ -1969,7 +1969,7 @@ class StaticAnalysis(MachCommandBase): # Build the dummy compile_commands.json self._compilation_commands_path = self._create_temp_compilation_db(config) - + checkers_test_batch = [] with concurrent.futures.ThreadPoolExecutor(max_workers=max_workers) as executor: futures = [] for item in config['clang_checkers']: @@ -1988,6 +1988,7 @@ class StaticAnalysis(MachCommandBase): ignored_checker or \ checker_not_in_list: continue + checkers_test_batch.append(item['name']) futures.append(executor.submit(self._verify_checker, item)) error_code = self.TOOLS_SUCCESS @@ -2006,11 +2007,58 @@ class StaticAnalysis(MachCommandBase): shutil.rmtree(self._compilation_commands_path) return error_code + # Run the analysis on all checkers at the same time only if we don't dump results. + if not self._dump_results: + ret_val = self._run_analysis_batch(checkers_test_batch) + if ret_val != self.TOOLS_SUCCESS: + shutil.rmtree(self._compilation_commands_path) + return ret_val + self.log(logging.INFO, 'static-analysis', {}, "SUCCESS: clang-tidy all tests passed.") # Also delete the tmp folder shutil.rmtree(self._compilation_commands_path) return self.TOOLS_SUCCESS + def _run_analysis(self, checks, header_filter, sources, jobs=1, fix=False, print_out=False): + cmd = self._get_clang_tidy_command( + checks=checks, header_filter=header_filter, + sources=sources, + jobs=jobs, fix=fix) + + try: + clang_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode('utf-8') + except subprocess.CalledProcessError as e: + print(e.output) + return None + return self._parse_issues(clang_output) + + def _run_analysis_batch(self, items): + self.log(logging.INFO, 'static-analysis', {},"RUNNING: clang-tidy checker batch analysis.") + if not len(items): + self.log(logging.ERROR, 'static-analysis', {}, "ERROR: clang-tidy checker list is empty!.") + return self.TOOLS_CHECKER_LIST_EMPTY + + issues = self._run_analysis( + checks='-*,' + ",".join(items), header_filter='', + sources=[mozpath.join(self._clang_tidy_base_path, "test", checker) + '.cpp' for checker in items], print_out=True) + + if issues is None: + return self.TOOLS_CHECKER_FAILED_FILE + + for checker in items: + test_file_path_json = mozpath.join(self._clang_tidy_base_path, "test", checker) + '.json' + # Read the pre-determined issues + baseline_issues = self._get_autotest_stored_issues(test_file_path_json) + found = all([element_base in issues for element_base in baseline_issues]) + + if not found: + self.log( + logging.ERROR, 'static-analysis', {}, + "ERROR: clang-tidy auto-test failed for checker {0} in multiple files process unit.". + format(checker)) + return self.TOOLS_CHECKER_DIFF_FAILED + return self.TOOLS_SUCCESS + def _create_temp_compilation_db(self, config): directory = tempfile.mkdtemp(prefix='cc') with open(mozpath.join(directory, "compile_commands.json"), "wb") as file_handler: @@ -2126,51 +2174,44 @@ class StaticAnalysis(MachCommandBase): self.log(logging.ERROR, 'static-analysis', {}, "ERROR: clang-tidy checker {} doesn't have a test file.".format(check)) return self.TOOLS_CHECKER_NO_TEST_FILE - cmd = self._get_clang_tidy_command( - checks='-*,' + check, header_filter='', sources=[test_file_path_cpp], jobs=1, fix=False) - try: - clang_output = subprocess.check_output( - cmd, stderr=subprocess.STDOUT).decode('utf-8') - except subprocess.CalledProcessError as e: - print(e.output) + issues = self._run_analysis( + checks='-*,' + check, header_filter='', sources=[test_file_path_cpp]) + if issues is None: return self.TOOLS_CHECKER_FAILED_FILE - else: - issues = self._parse_issues(clang_output) - # Verify to see if we got any issues, if not raise exception - if not issues: + # Verify to see if we got any issues, if not raise exception + if not issues: + self.log( + logging.ERROR, 'static-analysis', {}, + "ERROR: clang-tidy checker {0} did not find any issues in its associated test file.". + format(check)) + return self.CHECKER_RETURNED_NO_ISSUES + + if self._dump_results: + self._build_autotest_result(test_file_path_json, json.dumps(issues)) + else: + if not os.path.exists(test_file_path_json): + # Result file for test not found maybe regenerate it? self.log( logging.ERROR, 'static-analysis', {}, - "ERROR: clang-tidy checker {0} did not find any issues in its associated test file.". - format(check)) - return self.CHECKER_RETURNED_NO_ISSUES + "ERROR: clang-tidy result file not found for checker {0}".format( + check)) + return self.TOOLS_CHECKER_RESULT_FILE_NOT_FOUND + # Read the pre-determined issues + baseline_issues = self._get_autotest_stored_issues(test_file_path_json) - if self._dump_results: - self._build_autotest_result(test_file_path_json, issues) - else: - if not os.path.exists(test_file_path_json): - # Result file for test not found maybe regenerate it? - self.log( - logging.ERROR, 'static-analysis', {}, - "ERROR: clang-tidy result file not found for checker {0}".format( - check)) - return self.TOOLS_CHECKER_RESULT_FILE_NOT_FOUND - # Read the pre-determined issues - baseline_issues = self._get_autotest_stored_issues(test_file_path_json) - - # Compare the two lists - if issues != baseline_issues: - print("Clang output: {}".format(clang_output)) - self.log( - logging.ERROR, 'static-analysis', {}, - "ERROR: clang-tidy auto-test failed for checker {0} Expected: {1} Got: {2}". - format(check, baseline_issues, issues)) - return self.TOOLS_CHECKER_DIFF_FAILED - return self.TOOLS_SUCCESS + # Compare the two lists + if issues != baseline_issues: + self.log( + logging.ERROR, 'static-analysis', {}, + "ERROR: clang-tidy auto-test failed for checker {0} Expected: {1} Got: {2}". + format(check, baseline_issues, issues)) + return self.TOOLS_CHECKER_DIFF_FAILED + return self.TOOLS_SUCCESS def _build_autotest_result(self, file, issues): with open(file, 'w') as f: - json.dump(issues, f, indent=4, sort_keys=True) + f.write(issues) def _get_autotest_stored_issues(self, file): with open(file) as f: @@ -2201,7 +2242,7 @@ class StaticAnalysis(MachCommandBase): header_group = header.groups() element = [header_group[3], header_group[4], header_group[5]] issues.append(element) - return json.dumps(issues) + return issues def _get_checks(self): checks = '-*' diff --git a/tools/clang-tidy/test/bugprone-argument-comment.json b/tools/clang-tidy/test/bugprone-argument-comment.json index c2946f8781d9..6c3d80dd5c96 100644 --- a/tools/clang-tidy/test/bugprone-argument-comment.json +++ b/tools/clang-tidy/test/bugprone-argument-comment.json @@ -1 +1 @@ -"[[\"warning\", \"argument name 'y' in comment does not match parameter name 'x'\", \"bugprone-argument-comment\"], [\"warning\", \"argument name 'z' in comment does not match parameter name 'y'\", \"bugprone-argument-comment\"]]" \ No newline at end of file +[["warning", "argument name 'y' in comment does not match parameter name 'x'", "bugprone-argument-comment"], ["warning", "argument name 'z' in comment does not match parameter name 'y'", "bugprone-argument-comment"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/bugprone-assert-side-effect.json b/tools/clang-tidy/test/bugprone-assert-side-effect.json index 9fed33f673e7..8a2db8050650 100644 --- a/tools/clang-tidy/test/bugprone-assert-side-effect.json +++ b/tools/clang-tidy/test/bugprone-assert-side-effect.json @@ -1 +1 @@ -"[[\"warning\", \"found assert() with side effect\", \"bugprone-assert-side-effect\"]]" \ No newline at end of file +[["warning", "found assert() with side effect", "bugprone-assert-side-effect"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/bugprone-bool-pointer-implicit-conversion.json b/tools/clang-tidy/test/bugprone-bool-pointer-implicit-conversion.json index ef0bda69c5cb..8f6335fbc022 100644 --- a/tools/clang-tidy/test/bugprone-bool-pointer-implicit-conversion.json +++ b/tools/clang-tidy/test/bugprone-bool-pointer-implicit-conversion.json @@ -1 +1 @@ -"[[\"warning\", \"dubious check of 'bool *' against 'nullptr', did you mean to dereference it?\", \"bugprone-bool-pointer-implicit-conversion\"]]" \ No newline at end of file +[["warning", "dubious check of 'bool *' against 'nullptr', did you mean to dereference it?", "bugprone-bool-pointer-implicit-conversion"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/bugprone-forward-declaration-namespace.json b/tools/clang-tidy/test/bugprone-forward-declaration-namespace.json index f9774abd6478..4794f330dec1 100644 --- a/tools/clang-tidy/test/bugprone-forward-declaration-namespace.json +++ b/tools/clang-tidy/test/bugprone-forward-declaration-namespace.json @@ -1 +1 @@ -"[[\"warning\", \"no definition found for 'A', but a definition with the same name 'A' found in another namespace 'nb'\", \"bugprone-forward-declaration-namespace\"]]" \ No newline at end of file +[["warning", "no definition found for 'A', but a definition with the same name 'A' found in another namespace 'nb'", "bugprone-forward-declaration-namespace"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/bugprone-macro-repeated-side-effects.json b/tools/clang-tidy/test/bugprone-macro-repeated-side-effects.json index 99735ea94fcf..f213cf1ed033 100644 --- a/tools/clang-tidy/test/bugprone-macro-repeated-side-effects.json +++ b/tools/clang-tidy/test/bugprone-macro-repeated-side-effects.json @@ -1 +1 @@ -"[[\"warning\", \"side effects in the 1st macro argument 'x' are repeated in macro expansion\", \"bugprone-macro-repeated-side-effects\"]]" \ No newline at end of file +[["warning", "side effects in the 1st macro argument 'x' are repeated in macro expansion", "bugprone-macro-repeated-side-effects"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/bugprone-string-constructor.json b/tools/clang-tidy/test/bugprone-string-constructor.json index 8487dc5c8146..42a7b4bb575a 100644 --- a/tools/clang-tidy/test/bugprone-string-constructor.json +++ b/tools/clang-tidy/test/bugprone-string-constructor.json @@ -1 +1 @@ -"[[\"warning\", \"string constructor parameters are probably swapped; expecting string(count, character)\", \"bugprone-string-constructor\"], [\"warning\", \"length is bigger then string literal size\", \"bugprone-string-constructor\"], [\"warning\", \"constructor creating an empty string\", \"bugprone-string-constructor\"]]" \ No newline at end of file +[["warning", "string constructor parameters are probably swapped; expecting string(count, character)", "bugprone-string-constructor"], ["warning", "length is bigger then string literal size", "bugprone-string-constructor"], ["warning", "constructor creating an empty string", "bugprone-string-constructor"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/bugprone-string-integer-assignment.json b/tools/clang-tidy/test/bugprone-string-integer-assignment.json index 9bdef9bfafd3..68bdd22ac2cd 100644 --- a/tools/clang-tidy/test/bugprone-string-integer-assignment.json +++ b/tools/clang-tidy/test/bugprone-string-integer-assignment.json @@ -1 +1 @@ -"[[\"warning\", \"an integer is interpreted as a character code when assigning it to a string; if this is intended, cast the integer to the appropriate character type; if you want a string representation, use the appropriate conversion facility\", \"bugprone-string-integer-assignment\"], [\"warning\", \"an integer is interpreted as a character code when assigning it to a string; if this is intended, cast the integer to the appropriate character type; if you want a string representation, use the appropriate conversion facility\", \"bugprone-string-integer-assignment\"]]" \ No newline at end of file +[["warning", "an integer is interpreted as a character code when assigning it to a string; if this is intended, cast the integer to the appropriate character type; if you want a string representation, use the appropriate conversion facility", "bugprone-string-integer-assignment"], ["warning", "an integer is interpreted as a character code when assigning it to a string; if this is intended, cast the integer to the appropriate character type; if you want a string representation, use the appropriate conversion facility", "bugprone-string-integer-assignment"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/bugprone-suspicious-memset-usage.json b/tools/clang-tidy/test/bugprone-suspicious-memset-usage.json index c924b0e38bd1..1a77ae963cb4 100644 --- a/tools/clang-tidy/test/bugprone-suspicious-memset-usage.json +++ b/tools/clang-tidy/test/bugprone-suspicious-memset-usage.json @@ -1 +1 @@ -"[[\"warning\", \"memset fill value is char '0', potentially mistaken for int 0\", \"bugprone-suspicious-memset-usage\"], [\"warning\", \"memset fill value is out of unsigned character range, gets truncated\", \"bugprone-suspicious-memset-usage\"], [\"warning\", \"memset of size zero, potentially swapped arguments\", \"bugprone-suspicious-memset-usage\"]]" \ No newline at end of file +[["warning", "memset fill value is char '0', potentially mistaken for int 0", "bugprone-suspicious-memset-usage"], ["warning", "memset fill value is out of unsigned character range, gets truncated", "bugprone-suspicious-memset-usage"], ["warning", "memset of size zero, potentially swapped arguments", "bugprone-suspicious-memset-usage"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/bugprone-suspicious-missing-comma.json b/tools/clang-tidy/test/bugprone-suspicious-missing-comma.json index 6c81100c433f..0ce1dabcc5c7 100644 --- a/tools/clang-tidy/test/bugprone-suspicious-missing-comma.json +++ b/tools/clang-tidy/test/bugprone-suspicious-missing-comma.json @@ -1 +1 @@ -"[[\"warning\", \"suspicious string literal, probably missing a comma\", \"bugprone-suspicious-missing-comma\"]]" \ No newline at end of file +[["warning", "suspicious string literal, probably missing a comma", "bugprone-suspicious-missing-comma"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/bugprone-suspicious-semicolon.json b/tools/clang-tidy/test/bugprone-suspicious-semicolon.json index d6c0758e7099..580c37e46715 100644 --- a/tools/clang-tidy/test/bugprone-suspicious-semicolon.json +++ b/tools/clang-tidy/test/bugprone-suspicious-semicolon.json @@ -1 +1 @@ -"[[\"warning\", \"potentially unintended semicolon\", \"bugprone-suspicious-semicolon\"]]" \ No newline at end of file +[["warning", "potentially unintended semicolon", "bugprone-suspicious-semicolon"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/bugprone-swapped-arguments.json b/tools/clang-tidy/test/bugprone-swapped-arguments.json index 1ab910185fed..9221f34e5e1f 100644 --- a/tools/clang-tidy/test/bugprone-swapped-arguments.json +++ b/tools/clang-tidy/test/bugprone-swapped-arguments.json @@ -1 +1 @@ -"[[\"warning\", \"argument with implicit conversion from 'double' to 'int' followed by argument converted from 'int' to 'double', potentially swapped arguments.\", \"bugprone-swapped-arguments\"], [\"warning\", \"argument with implicit conversion from 'int' to 'double' followed by argument converted from 'double' to 'int', potentially swapped arguments.\", \"bugprone-swapped-arguments\"], [\"warning\", \"argument with implicit conversion from 'int' to 'double' followed by argument converted from 'double' to 'int', potentially swapped arguments.\", \"bugprone-swapped-arguments\"], [\"warning\", \"argument with implicit conversion from 'double' to 'int' followed by argument converted from 'int' to 'double', potentially swapped arguments.\", \"bugprone-swapped-arguments\"]]" \ No newline at end of file +[["warning", "argument with implicit conversion from 'double' to 'int' followed by argument converted from 'int' to 'double', potentially swapped arguments.", "bugprone-swapped-arguments"], ["warning", "argument with implicit conversion from 'int' to 'double' followed by argument converted from 'double' to 'int', potentially swapped arguments.", "bugprone-swapped-arguments"], ["warning", "argument with implicit conversion from 'int' to 'double' followed by argument converted from 'double' to 'int', potentially swapped arguments.", "bugprone-swapped-arguments"], ["warning", "argument with implicit conversion from 'double' to 'int' followed by argument converted from 'int' to 'double', potentially swapped arguments.", "bugprone-swapped-arguments"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/bugprone-unused-raii.json b/tools/clang-tidy/test/bugprone-unused-raii.json index 745acda76fcd..65309c5c6723 100644 --- a/tools/clang-tidy/test/bugprone-unused-raii.json +++ b/tools/clang-tidy/test/bugprone-unused-raii.json @@ -1 +1 @@ -"[[\"warning\", \"object destroyed immediately after creation; did you mean to name the object?\", \"bugprone-unused-raii\"]]" \ No newline at end of file +[["warning", "object destroyed immediately after creation; did you mean to name the object?", "bugprone-unused-raii"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/clang-analyzer-cplusplus.NewDelete.json b/tools/clang-tidy/test/clang-analyzer-cplusplus.NewDelete.json index d2081d2902a6..d727d01dcb36 100644 --- a/tools/clang-tidy/test/clang-analyzer-cplusplus.NewDelete.json +++ b/tools/clang-tidy/test/clang-analyzer-cplusplus.NewDelete.json @@ -1 +1 @@ -"[[\"warning\", \"Use of memory after it is freed\", \"clang-analyzer-cplusplus.NewDelete\"], [\"warning\", \"Use of memory after it is freed\", \"clang-analyzer-cplusplus.NewDelete\"], [\"warning\", \"Attempt to free released memory\", \"clang-analyzer-cplusplus.NewDelete\"], [\"warning\", \"Argument to 'delete' is the address of the local variable 'i', which is not memory allocated by 'new'\", \"clang-analyzer-cplusplus.NewDelete\"]]" \ No newline at end of file +[["warning", "Use of memory after it is freed", "clang-analyzer-cplusplus.NewDelete"], ["warning", "Use of memory after it is freed", "clang-analyzer-cplusplus.NewDelete"], ["warning", "Attempt to free released memory", "clang-analyzer-cplusplus.NewDelete"], ["warning", "Argument to 'delete' is the address of the local variable 'i', which is not memory allocated by 'new'", "clang-analyzer-cplusplus.NewDelete"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/clang-analyzer-cplusplus.NewDeleteLeaks.json b/tools/clang-tidy/test/clang-analyzer-cplusplus.NewDeleteLeaks.json index 8606e7c9413c..1f9cdb64d8fe 100644 --- a/tools/clang-tidy/test/clang-analyzer-cplusplus.NewDeleteLeaks.json +++ b/tools/clang-tidy/test/clang-analyzer-cplusplus.NewDeleteLeaks.json @@ -1 +1 @@ -"[[\"warning\", \"Potential leak of memory pointed to by 'p'\", \"clang-analyzer-cplusplus.NewDeleteLeaks\"]]" \ No newline at end of file +[["warning", "Potential leak of memory pointed to by 'p'", "clang-analyzer-cplusplus.NewDeleteLeaks"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/clang-analyzer-deadcode.DeadStores.json b/tools/clang-tidy/test/clang-analyzer-deadcode.DeadStores.json index 146c021ff87f..c00e622a4d3c 100644 --- a/tools/clang-tidy/test/clang-analyzer-deadcode.DeadStores.json +++ b/tools/clang-tidy/test/clang-analyzer-deadcode.DeadStores.json @@ -1 +1 @@ -"[[\"warning\", \"Value stored to 'x' is never read\", \"clang-analyzer-deadcode.DeadStores\"]]" \ No newline at end of file +[["warning", "Value stored to 'x' is never read", "clang-analyzer-deadcode.DeadStores"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/clang-analyzer-security.FloatLoopCounter.json b/tools/clang-tidy/test/clang-analyzer-security.FloatLoopCounter.json index b0d19a1115b1..ab70a68e77e9 100644 --- a/tools/clang-tidy/test/clang-analyzer-security.FloatLoopCounter.json +++ b/tools/clang-tidy/test/clang-analyzer-security.FloatLoopCounter.json @@ -1 +1 @@ -"[[\"warning\", \"Variable 'x' with floating point type 'float' should not be used as a loop counter\", \"clang-analyzer-security.FloatLoopCounter\"]]" \ No newline at end of file +[["warning", "Variable 'x' with floating point type 'float' should not be used as a loop counter", "clang-analyzer-security.FloatLoopCounter"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.UncheckedReturn.json b/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.UncheckedReturn.json index 42c591a485ca..342e9954c9fa 100644 --- a/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.UncheckedReturn.json +++ b/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.UncheckedReturn.json @@ -1 +1 @@ -"[[\"warning\", \"The return value from the call to 'setuid' is not checked. If an error occurs in 'setuid', the following code may execute with unexpected privileges\", \"clang-analyzer-security.insecureAPI.UncheckedReturn\"]]" \ No newline at end of file +[["warning", "The return value from the call to 'setuid' is not checked. If an error occurs in 'setuid', the following code may execute with unexpected privileges", "clang-analyzer-security.insecureAPI.UncheckedReturn"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.bcmp.json b/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.bcmp.json index a34c991e87b8..a64f0df0a0e3 100644 --- a/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.bcmp.json +++ b/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.bcmp.json @@ -1 +1 @@ -"[[\"warning\", \"The bcmp() function is obsoleted by memcmp()\", \"clang-analyzer-security.insecureAPI.bcmp\"]]" \ No newline at end of file +[["warning", "The bcmp() function is obsoleted by memcmp()", "clang-analyzer-security.insecureAPI.bcmp"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.bcopy.json b/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.bcopy.json index 0ac72ad06d4f..3b87809f2ca3 100644 --- a/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.bcopy.json +++ b/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.bcopy.json @@ -1 +1 @@ -"[[\"warning\", \"The bcopy() function is obsoleted by memcpy() or memmove()\", \"clang-analyzer-security.insecureAPI.bcopy\"]]" \ No newline at end of file +[["warning", "The bcopy() function is obsoleted by memcpy() or memmove()", "clang-analyzer-security.insecureAPI.bcopy"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.bzero.json b/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.bzero.json index a22074f45da5..aa31097c78d2 100644 --- a/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.bzero.json +++ b/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.bzero.json @@ -1 +1 @@ -"[[\"warning\", \"The bzero() function is obsoleted by memset()\", \"clang-analyzer-security.insecureAPI.bzero\"]]" \ No newline at end of file +[["warning", "The bzero() function is obsoleted by memset()", "clang-analyzer-security.insecureAPI.bzero"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.getpw.json b/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.getpw.json index 9add9873a1d0..5da67ef72763 100644 --- a/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.getpw.json +++ b/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.getpw.json @@ -1 +1 @@ -"[[\"warning\", \"The getpw() function is dangerous as it may overflow the provided buffer. It is obsoleted by getpwuid()\", \"clang-analyzer-security.insecureAPI.getpw\"]]" \ No newline at end of file +[["warning", "The getpw() function is dangerous as it may overflow the provided buffer. It is obsoleted by getpwuid()", "clang-analyzer-security.insecureAPI.getpw"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.mkstemp.json b/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.mkstemp.json index 2b7106c0aed6..824cce6f567b 100644 --- a/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.mkstemp.json +++ b/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.mkstemp.json @@ -1 +1 @@ -"[[\"warning\", \"Call to 'mkstemp' should have at least 6 'X's in the format string to be secure (2 'X's seen)\", \"clang-analyzer-security.insecureAPI.mkstemp\"]]" \ No newline at end of file +[["warning", "Call to 'mkstemp' should have at least 6 'X's in the format string to be secure (2 'X's seen)", "clang-analyzer-security.insecureAPI.mkstemp"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.mktemp.json b/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.mktemp.json index ea4b90306183..9e68022203be 100644 --- a/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.mktemp.json +++ b/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.mktemp.json @@ -1 +1 @@ -"[[\"warning\", \"Call to function 'mktemp' is insecure as it always creates or uses insecure temporary file. Use 'mkstemp' instead\", \"clang-analyzer-security.insecureAPI.mktemp\"]]" \ No newline at end of file +[["warning", "Call to function 'mktemp' is insecure as it always creates or uses insecure temporary file. Use 'mkstemp' instead", "clang-analyzer-security.insecureAPI.mktemp"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.vfork.json b/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.vfork.json index b1c845534a32..6d98ce890506 100644 --- a/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.vfork.json +++ b/tools/clang-tidy/test/clang-analyzer-security.insecureAPI.vfork.json @@ -1 +1 @@ -"[[\"warning\", \"Call to function 'vfork' is insecure as it can lead to denial of service situations in the parent process. Replace calls to vfork with calls to the safer 'posix_spawn' function\", \"clang-analyzer-security.insecureAPI.vfork\"]]" \ No newline at end of file +[["warning", "Call to function 'vfork' is insecure as it can lead to denial of service situations in the parent process. Replace calls to vfork with calls to the safer 'posix_spawn' function", "clang-analyzer-security.insecureAPI.vfork"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/clang-analyzer-unix.Malloc.json b/tools/clang-tidy/test/clang-analyzer-unix.Malloc.json index b8f32104b9fa..e27ff8631d40 100644 --- a/tools/clang-tidy/test/clang-analyzer-unix.Malloc.json +++ b/tools/clang-tidy/test/clang-analyzer-unix.Malloc.json @@ -1 +1 @@ -"[[\"warning\", \"Attempt to free released memory\", \"clang-analyzer-unix.Malloc\"], [\"warning\", \"Use of memory after it is freed\", \"clang-analyzer-unix.Malloc\"], [\"warning\", \"Potential leak of memory pointed to by 'p'\", \"clang-analyzer-unix.Malloc\"], [\"warning\", \"Argument to free() is the address of the local variable 'a', which is not memory allocated by malloc()\", \"clang-analyzer-unix.Malloc\"], [\"warning\", \"Argument to free() is offset by -4 bytes from the start of memory allocated by malloc()\", \"clang-analyzer-unix.Malloc\"]]" \ No newline at end of file +[["warning", "Attempt to free released memory", "clang-analyzer-unix.Malloc"], ["warning", "Use of memory after it is freed", "clang-analyzer-unix.Malloc"], ["warning", "Potential leak of memory pointed to by 'p'", "clang-analyzer-unix.Malloc"], ["warning", "Argument to free() is the address of the local variable 'a', which is not memory allocated by malloc()", "clang-analyzer-unix.Malloc"], ["warning", "Argument to free() is offset by -4 bytes from the start of memory allocated by malloc()", "clang-analyzer-unix.Malloc"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/clang-analyzer-unix.cstring.BadSizeArg.json b/tools/clang-tidy/test/clang-analyzer-unix.cstring.BadSizeArg.json index f5ee6d82f24b..7b4fb23937d4 100644 --- a/tools/clang-tidy/test/clang-analyzer-unix.cstring.BadSizeArg.json +++ b/tools/clang-tidy/test/clang-analyzer-unix.cstring.BadSizeArg.json @@ -1 +1 @@ -"[[\"warning\", \"Potential buffer overflow. Replace with 'sizeof(dest) - strlen(dest) - 1' or use a safer 'strlcat' API\", \"clang-analyzer-unix.cstring.BadSizeArg\"]]" \ No newline at end of file +[["warning", "Potential buffer overflow. Replace with 'sizeof(dest) - strlen(dest) - 1' or use a safer 'strlcat' API", "clang-analyzer-unix.cstring.BadSizeArg"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/clang-analyzer-unix.cstring.NullArg.json b/tools/clang-tidy/test/clang-analyzer-unix.cstring.NullArg.json index 45a9ecde3d3e..140e15a5a20b 100644 --- a/tools/clang-tidy/test/clang-analyzer-unix.cstring.NullArg.json +++ b/tools/clang-tidy/test/clang-analyzer-unix.cstring.NullArg.json @@ -1 +1 @@ -"[[\"warning\", \"Null pointer argument in call to string length function\", \"clang-analyzer-unix.cstring.NullArg\"]]" \ No newline at end of file +[["warning", "Null pointer argument in call to string length function", "clang-analyzer-unix.cstring.NullArg"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/misc-unused-alias-decls.json b/tools/clang-tidy/test/misc-unused-alias-decls.json index 71a022899268..b1f0af0135dd 100644 --- a/tools/clang-tidy/test/misc-unused-alias-decls.json +++ b/tools/clang-tidy/test/misc-unused-alias-decls.json @@ -1 +1 @@ -"[[\"warning\", \"namespace alias decl 'n1_unused' is unused\", \"misc-unused-alias-decls\"], [\"warning\", \"namespace alias decl 'n12_unused' is unused\", \"misc-unused-alias-decls\"]]" \ No newline at end of file +[["warning", "namespace alias decl 'n1_unused' is unused", "misc-unused-alias-decls"], ["warning", "namespace alias decl 'n12_unused' is unused", "misc-unused-alias-decls"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/misc-unused-using-decls.json b/tools/clang-tidy/test/misc-unused-using-decls.json index 72971a9ff8f0..defe4c2587ea 100644 --- a/tools/clang-tidy/test/misc-unused-using-decls.json +++ b/tools/clang-tidy/test/misc-unused-using-decls.json @@ -1 +1 @@ -"[[\"warning\", \"using decl 'C' is unused\", \"misc-unused-using-decls\"]]" \ No newline at end of file +[["warning", "using decl 'C' is unused", "misc-unused-using-decls"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/modernize-avoid-bind.json b/tools/clang-tidy/test/modernize-avoid-bind.json index 74d33c1bfae2..38e98360ccd6 100644 --- a/tools/clang-tidy/test/modernize-avoid-bind.json +++ b/tools/clang-tidy/test/modernize-avoid-bind.json @@ -1 +1 @@ -"[[\"warning\", \"prefer a lambda to std::bind\", \"modernize-avoid-bind\"]]" \ No newline at end of file +[["warning", "prefer a lambda to std::bind", "modernize-avoid-bind"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/modernize-loop-convert.json b/tools/clang-tidy/test/modernize-loop-convert.json index bd55e386c97f..5ee04b113dba 100644 --- a/tools/clang-tidy/test/modernize-loop-convert.json +++ b/tools/clang-tidy/test/modernize-loop-convert.json @@ -1 +1 @@ -"[[\"warning\", \"use range-based for loop instead\", \"modernize-loop-convert\"]]" \ No newline at end of file +[["warning", "use range-based for loop instead", "modernize-loop-convert"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/modernize-raw-string-literal.json b/tools/clang-tidy/test/modernize-raw-string-literal.json index f98dd9279366..21a8cc6b89b6 100644 --- a/tools/clang-tidy/test/modernize-raw-string-literal.json +++ b/tools/clang-tidy/test/modernize-raw-string-literal.json @@ -1 +1 @@ -"[[\"warning\", \"escaped string literal can be written as a raw string literal\", \"modernize-raw-string-literal\"]]" \ No newline at end of file +[["warning", "escaped string literal can be written as a raw string literal", "modernize-raw-string-literal"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/modernize-shrink-to-fit.json b/tools/clang-tidy/test/modernize-shrink-to-fit.json index d080852541b5..121730c7f687 100644 --- a/tools/clang-tidy/test/modernize-shrink-to-fit.json +++ b/tools/clang-tidy/test/modernize-shrink-to-fit.json @@ -1 +1 @@ -"[[\"warning\", \"the shrink_to_fit method should be used to reduce the capacity of a shrinkable container\", \"modernize-shrink-to-fit\"], [\"warning\", \"the shrink_to_fit method should be used to reduce the capacity of a shrinkable container\", \"modernize-shrink-to-fit\"]]" \ No newline at end of file +[["warning", "the shrink_to_fit method should be used to reduce the capacity of a shrinkable container", "modernize-shrink-to-fit"], ["warning", "the shrink_to_fit method should be used to reduce the capacity of a shrinkable container", "modernize-shrink-to-fit"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/modernize-use-bool-literals.json b/tools/clang-tidy/test/modernize-use-bool-literals.json index dc4bd865a521..02c6c400387b 100644 --- a/tools/clang-tidy/test/modernize-use-bool-literals.json +++ b/tools/clang-tidy/test/modernize-use-bool-literals.json @@ -1 +1 @@ -"[[\"warning\", \"converting integer literal to bool, use bool literal instead\", \"modernize-use-bool-literals\"], [\"warning\", \"converting integer literal to bool, use bool literal instead\", \"modernize-use-bool-literals\"], [\"warning\", \"converting integer literal to bool, use bool literal instead\", \"modernize-use-bool-literals\"], [\"warning\", \"converting integer literal to bool, use bool literal instead\", \"modernize-use-bool-literals\"]]" \ No newline at end of file +[["warning", "converting integer literal to bool, use bool literal instead", "modernize-use-bool-literals"], ["warning", "converting integer literal to bool, use bool literal instead", "modernize-use-bool-literals"], ["warning", "converting integer literal to bool, use bool literal instead", "modernize-use-bool-literals"], ["warning", "converting integer literal to bool, use bool literal instead", "modernize-use-bool-literals"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/modernize-use-equals-default.json b/tools/clang-tidy/test/modernize-use-equals-default.json index a76e1f505282..778eeb3f5303 100644 --- a/tools/clang-tidy/test/modernize-use-equals-default.json +++ b/tools/clang-tidy/test/modernize-use-equals-default.json @@ -1 +1 @@ -"[[\"warning\", \"use '= default' to define a trivial default constructor\", \"modernize-use-equals-default\"], [\"warning\", \"use '= default' to define a trivial destructor\", \"modernize-use-equals-default\"]]" \ No newline at end of file +[["warning", "use '= default' to define a trivial default constructor", "modernize-use-equals-default"], ["warning", "use '= default' to define a trivial destructor", "modernize-use-equals-default"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/modernize-use-equals-delete.json b/tools/clang-tidy/test/modernize-use-equals-delete.json index ff3bb0ddb573..e94acb7f05c1 100644 --- a/tools/clang-tidy/test/modernize-use-equals-delete.json +++ b/tools/clang-tidy/test/modernize-use-equals-delete.json @@ -1 +1 @@ -"[[\"warning\", \"use '= delete' to prohibit calling of a special member function\", \"modernize-use-equals-delete\"], [\"warning\", \"use '= delete' to prohibit calling of a special member function\", \"modernize-use-equals-delete\"], [\"warning\", \"use '= delete' to prohibit calling of a special member function\", \"modernize-use-equals-delete\"], [\"warning\", \"use '= delete' to prohibit calling of a special member function\", \"modernize-use-equals-delete\"]]" \ No newline at end of file +[["warning", "use '= delete' to prohibit calling of a special member function", "modernize-use-equals-delete"], ["warning", "use '= delete' to prohibit calling of a special member function", "modernize-use-equals-delete"], ["warning", "use '= delete' to prohibit calling of a special member function", "modernize-use-equals-delete"], ["warning", "use '= delete' to prohibit calling of a special member function", "modernize-use-equals-delete"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/modernize-use-nullptr.json b/tools/clang-tidy/test/modernize-use-nullptr.json index 7ad30051c574..66710c605b11 100644 --- a/tools/clang-tidy/test/modernize-use-nullptr.json +++ b/tools/clang-tidy/test/modernize-use-nullptr.json @@ -1 +1 @@ -"[[\"warning\", \"use nullptr\", \"modernize-use-nullptr\"]]" \ No newline at end of file +[["warning", "use nullptr", "modernize-use-nullptr"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/performance-faster-string-find.json b/tools/clang-tidy/test/performance-faster-string-find.json index ca8cd9eb5bf1..5a58fa30d4fe 100644 --- a/tools/clang-tidy/test/performance-faster-string-find.json +++ b/tools/clang-tidy/test/performance-faster-string-find.json @@ -1 +1 @@ -"[[\"warning\", \"'find' called with a string literal consisting of a single character; consider using the more effective overload accepting a character\", \"performance-faster-string-find\"]]" \ No newline at end of file +[["warning", "'find' called with a string literal consisting of a single character; consider using the more effective overload accepting a character", "performance-faster-string-find"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/performance-for-range-copy.json b/tools/clang-tidy/test/performance-for-range-copy.json index 69e89db5dc14..376072744e2d 100644 --- a/tools/clang-tidy/test/performance-for-range-copy.json +++ b/tools/clang-tidy/test/performance-for-range-copy.json @@ -1 +1 @@ -"[[\"warning\", \"the loop variable's type is not a reference type; this creates a copy in each iteration; consider making this a reference\", \"performance-for-range-copy\"]]" \ No newline at end of file +[["warning", "the loop variable's type is not a reference type; this creates a copy in each iteration; consider making this a reference", "performance-for-range-copy"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/performance-implicit-conversion-in-loop.json b/tools/clang-tidy/test/performance-implicit-conversion-in-loop.json index b4c58e1bc68c..6f38089aac4f 100644 --- a/tools/clang-tidy/test/performance-implicit-conversion-in-loop.json +++ b/tools/clang-tidy/test/performance-implicit-conversion-in-loop.json @@ -1 +1 @@ -"[[\"warning\", \"the type of the loop variable 'foo' is different from the one returned by the iterator and generates an implicit conversion; you can either change the type to the matching one ('const SimpleClass &' but 'const auto&' is always a valid option) or remove the reference to make it explicit that you are creating a new value\", \"performance-implicit-conversion-in-loop\"]]" \ No newline at end of file +[["warning", "the type of the loop variable 'foo' is different from the one returned by the iterator and generates an implicit conversion; you can either change the type to the matching one ('const SimpleClass &' but 'const auto&' is always a valid option) or remove the reference to make it explicit that you are creating a new value", "performance-implicit-conversion-in-loop"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/performance-inefficient-algorithm.json b/tools/clang-tidy/test/performance-inefficient-algorithm.json index 95c55fcb6c41..789a8f07c3e9 100644 --- a/tools/clang-tidy/test/performance-inefficient-algorithm.json +++ b/tools/clang-tidy/test/performance-inefficient-algorithm.json @@ -1 +1 @@ -"[[\"warning\", \"this STL algorithm call should be replaced with a container method\", \"performance-inefficient-algorithm\"]]" \ No newline at end of file +[["warning", "this STL algorithm call should be replaced with a container method", "performance-inefficient-algorithm"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/performance-inefficient-string-concatenation.json b/tools/clang-tidy/test/performance-inefficient-string-concatenation.json index 6b1584934e8d..c42e46ad54fa 100644 --- a/tools/clang-tidy/test/performance-inefficient-string-concatenation.json +++ b/tools/clang-tidy/test/performance-inefficient-string-concatenation.json @@ -1 +1 @@ -"[[\"warning\", \"string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead\", \"performance-inefficient-string-concatenation\"]]" \ No newline at end of file +[["warning", "string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead", "performance-inefficient-string-concatenation"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/performance-inefficient-vector-operation.json b/tools/clang-tidy/test/performance-inefficient-vector-operation.json index 26f2ed8162d6..dd3fdec73029 100644 --- a/tools/clang-tidy/test/performance-inefficient-vector-operation.json +++ b/tools/clang-tidy/test/performance-inefficient-vector-operation.json @@ -1 +1 @@ -"[[\"warning\", \"'push_back' is called inside a loop; consider pre-allocating the vector capacity before the loop\", \"performance-inefficient-vector-operation\"]]" \ No newline at end of file +[["warning", "'push_back' is called inside a loop; consider pre-allocating the vector capacity before the loop", "performance-inefficient-vector-operation"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/performance-move-const-arg.json b/tools/clang-tidy/test/performance-move-const-arg.json index 27d8e03b20d8..aa54a1548363 100644 --- a/tools/clang-tidy/test/performance-move-const-arg.json +++ b/tools/clang-tidy/test/performance-move-const-arg.json @@ -1 +1 @@ -"[[\"warning\", \"std::move of the variable 'obj' of the trivially-copyable type 'TriviallyCopyable' has no effect; remove std::move()\", \"performance-move-const-arg\"]]" \ No newline at end of file +[["warning", "std::move of the variable 'obj' of the trivially-copyable type 'TriviallyCopyable' has no effect; remove std::move()", "performance-move-const-arg"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/performance-move-constructor-init.json b/tools/clang-tidy/test/performance-move-constructor-init.json index 8e86975370b2..79b5a3ba50e0 100644 --- a/tools/clang-tidy/test/performance-move-constructor-init.json +++ b/tools/clang-tidy/test/performance-move-constructor-init.json @@ -1 +1 @@ -"[[\"warning\", \"move constructor initializes base class by calling a copy constructor\", \"performance-move-constructor-init\"]]" \ No newline at end of file +[["warning", "move constructor initializes base class by calling a copy constructor", "performance-move-constructor-init"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/performance-noexcept-move-constructor.json b/tools/clang-tidy/test/performance-noexcept-move-constructor.json index e970af7b10d3..9ed2da178abd 100644 --- a/tools/clang-tidy/test/performance-noexcept-move-constructor.json +++ b/tools/clang-tidy/test/performance-noexcept-move-constructor.json @@ -1 +1 @@ -"[[\"warning\", \"move constructors should be marked noexcept\", \"performance-noexcept-move-constructor\"], [\"warning\", \"move assignment operators should be marked noexcept\", \"performance-noexcept-move-constructor\"]]" \ No newline at end of file +[["warning", "move constructors should be marked noexcept", "performance-noexcept-move-constructor"], ["warning", "move assignment operators should be marked noexcept", "performance-noexcept-move-constructor"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/performance-type-promotion-in-math-fn.json b/tools/clang-tidy/test/performance-type-promotion-in-math-fn.json index da1d3d77ed02..feaf0b8b0838 100644 --- a/tools/clang-tidy/test/performance-type-promotion-in-math-fn.json +++ b/tools/clang-tidy/test/performance-type-promotion-in-math-fn.json @@ -1 +1 @@ -"[[\"warning\", \"call to 'acos' promotes float to double\", \"performance-type-promotion-in-math-fn\"]]" \ No newline at end of file +[["warning", "call to 'acos' promotes float to double", "performance-type-promotion-in-math-fn"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/performance-unnecessary-copy-initialization.json b/tools/clang-tidy/test/performance-unnecessary-copy-initialization.json index 4b5892d45fde..49c5ae10253d 100644 --- a/tools/clang-tidy/test/performance-unnecessary-copy-initialization.json +++ b/tools/clang-tidy/test/performance-unnecessary-copy-initialization.json @@ -1 +1 @@ -"[[\"warning\", \"the const qualified variable 'UnnecessaryCopy' is copy-constructed from a const reference; consider making it a const reference\", \"performance-unnecessary-copy-initialization\"]]" \ No newline at end of file +[["warning", "the const qualified variable 'UnnecessaryCopy' is copy-constructed from a const reference; consider making it a const reference", "performance-unnecessary-copy-initialization"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/performance-unnecessary-value-param.json b/tools/clang-tidy/test/performance-unnecessary-value-param.json index c5f2b9b019ad..31affc3702ad 100644 --- a/tools/clang-tidy/test/performance-unnecessary-value-param.json +++ b/tools/clang-tidy/test/performance-unnecessary-value-param.json @@ -1 +1 @@ -"[[\"warning\", \"the const qualified parameter 'Value' is copied for each invocation; consider making it a reference\", \"performance-unnecessary-value-param\"]]" \ No newline at end of file +[["warning", "the const qualified parameter 'Value' is copied for each invocation; consider making it a reference", "performance-unnecessary-value-param"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/readability-braces-around-statements.json b/tools/clang-tidy/test/readability-braces-around-statements.json index 2205f9055e36..7825497dbf04 100644 --- a/tools/clang-tidy/test/readability-braces-around-statements.json +++ b/tools/clang-tidy/test/readability-braces-around-statements.json @@ -1 +1 @@ -"[[\"warning\", \"statement should be inside braces\", \"readability-braces-around-statements\"], [\"warning\", \"statement should be inside braces\", \"readability-braces-around-statements\"], [\"warning\", \"statement should be inside braces\", \"readability-braces-around-statements\"], [\"warning\", \"statement should be inside braces\", \"readability-braces-around-statements\"], [\"warning\", \"statement should be inside braces\", \"readability-braces-around-statements\"], [\"warning\", \"statement should be inside braces\", \"readability-braces-around-statements\"]]" \ No newline at end of file +[["warning", "statement should be inside braces", "readability-braces-around-statements"], ["warning", "statement should be inside braces", "readability-braces-around-statements"], ["warning", "statement should be inside braces", "readability-braces-around-statements"], ["warning", "statement should be inside braces", "readability-braces-around-statements"], ["warning", "statement should be inside braces", "readability-braces-around-statements"], ["warning", "statement should be inside braces", "readability-braces-around-statements"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/readability-container-size-empty.json b/tools/clang-tidy/test/readability-container-size-empty.json index 23673e0ef111..60b0e7b4b7ee 100644 --- a/tools/clang-tidy/test/readability-container-size-empty.json +++ b/tools/clang-tidy/test/readability-container-size-empty.json @@ -1 +1 @@ -"[[\"warning\", \"the 'empty' method should be used to check for emptiness instead of 'size'\", \"readability-container-size-empty\"]]" \ No newline at end of file +[["warning", "the 'empty' method should be used to check for emptiness instead of 'size'", "readability-container-size-empty"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/readability-else-after-return.json b/tools/clang-tidy/test/readability-else-after-return.json index a223ac8e10dc..436f1802cdcb 100644 --- a/tools/clang-tidy/test/readability-else-after-return.json +++ b/tools/clang-tidy/test/readability-else-after-return.json @@ -1 +1 @@ -"[[\"warning\", \"do not use 'else' after 'return'\", \"readability-else-after-return\"]]" \ No newline at end of file +[["warning", "do not use 'else' after 'return'", "readability-else-after-return"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/readability-misleading-indentation.json b/tools/clang-tidy/test/readability-misleading-indentation.json index 31db213d23a1..96f7d0169a0a 100644 --- a/tools/clang-tidy/test/readability-misleading-indentation.json +++ b/tools/clang-tidy/test/readability-misleading-indentation.json @@ -1 +1 @@ -"[[\"warning\", \"different indentation for 'if' and corresponding 'else'\", \"readability-misleading-indentation\"]]" \ No newline at end of file +[["warning", "different indentation for 'if' and corresponding 'else'", "readability-misleading-indentation"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/readability-redundant-control-flow.json b/tools/clang-tidy/test/readability-redundant-control-flow.json index e90d6ed7fc24..a3b4efb58d82 100644 --- a/tools/clang-tidy/test/readability-redundant-control-flow.json +++ b/tools/clang-tidy/test/readability-redundant-control-flow.json @@ -1 +1 @@ -"[[\"warning\", \"redundant return statement at the end of a function with a void return type\", \"readability-redundant-control-flow\"]]" \ No newline at end of file +[["warning", "redundant return statement at the end of a function with a void return type", "readability-redundant-control-flow"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/readability-redundant-string-cstr.json b/tools/clang-tidy/test/readability-redundant-string-cstr.json index 5ba583d07764..c426f185ce99 100644 --- a/tools/clang-tidy/test/readability-redundant-string-cstr.json +++ b/tools/clang-tidy/test/readability-redundant-string-cstr.json @@ -1 +1 @@ -"[[\"warning\", \"redundant call to 'c_str'\", \"readability-redundant-string-cstr\"]]" \ No newline at end of file +[["warning", "redundant call to 'c_str'", "readability-redundant-string-cstr"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/readability-redundant-string-init.json b/tools/clang-tidy/test/readability-redundant-string-init.json index 19ba5914bf1e..a0b030034893 100644 --- a/tools/clang-tidy/test/readability-redundant-string-init.json +++ b/tools/clang-tidy/test/readability-redundant-string-init.json @@ -1 +1 @@ -"[[\"warning\", \"redundant string initialization\", \"readability-redundant-string-init\"]]" \ No newline at end of file +[["warning", "redundant string initialization", "readability-redundant-string-init"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/readability-static-accessed-through-instance.json b/tools/clang-tidy/test/readability-static-accessed-through-instance.json index 8fc304a56a5f..f9f8267be90f 100644 --- a/tools/clang-tidy/test/readability-static-accessed-through-instance.json +++ b/tools/clang-tidy/test/readability-static-accessed-through-instance.json @@ -1 +1 @@ -"[[\"warning\", \"static member accessed through instance\", \"readability-static-accessed-through-instance\"]]" \ No newline at end of file +[["warning", "static member accessed through instance", "readability-static-accessed-through-instance"]] \ No newline at end of file diff --git a/tools/clang-tidy/test/readability-uniqueptr-delete-release.json b/tools/clang-tidy/test/readability-uniqueptr-delete-release.json index bf86cd422035..92e60e304cde 100644 --- a/tools/clang-tidy/test/readability-uniqueptr-delete-release.json +++ b/tools/clang-tidy/test/readability-uniqueptr-delete-release.json @@ -1 +1 @@ -"[[\"warning\", \"prefer '= nullptr' to 'delete x.release()' to reset unique_ptr<> objects\", \"readability-uniqueptr-delete-release\"]]" \ No newline at end of file +[["warning", "prefer '= nullptr' to 'delete x.release()' to reset unique_ptr<> objects", "readability-uniqueptr-delete-release"]] \ No newline at end of file