File tree Expand file tree Collapse file tree
analyzer/codechecker_analyzer/analyzers/clangtidy
codechecker_report_converter/analyzers
tidy_yaml_output_test_files Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,6 +58,9 @@ def postprocess_result(
5858 # automatically when using this option we introduced a new choice for
5959 # --report-hash option ('context-free-v2') and we still do not use
6060 # context free hash for 'context-free' choice.
61+
62+ # When changing the default hash_type for ClangTidy, ensure
63+ # it is updated in codechecker_report_converter as well!
6164 hash_type = HashType .PATH_SENSITIVE
6265 if self .report_hash_type == 'context-free-v2' :
6366 hash_type = HashType .CONTEXT_FREE
Original file line number Diff line number Diff line change 99from typing import List
1010
1111from codechecker_report_converter .report import Report
12+ from codechecker_report_converter .report .hash import get_report_hash , HashType
1213
1314from ..analyzer_result import AnalyzerResultBase
1415from .parser import Parser
@@ -24,3 +25,8 @@ class AnalyzerResult(AnalyzerResultBase):
2425 def get_reports (self , file_path : str ) -> List [Report ]:
2526 """ Get reports from the given analyzer result. """
2627 return Parser ().get_reports (file_path )
28+
29+ def _add_report_hash (self , report : Report ):
30+ # Due to backward compatibility, the CodeChecker analyzer
31+ # uses hash type PATH_SENSITIVE for ClangTidy by default.
32+ report .report_hash = get_report_hash (report , HashType .PATH_SENSITIVE )
Original file line number Diff line number Diff line change 99from typing import List
1010
1111from codechecker_report_converter .report import Report
12+ from codechecker_report_converter .report .hash import get_report_hash , HashType
1213
1314from ..analyzer_result import AnalyzerResultBase
1415from .parser import Parser
@@ -24,3 +25,8 @@ class AnalyzerResult(AnalyzerResultBase):
2425 def get_reports (self , file_path : str ) -> List [Report ]:
2526 """ Get reports from the given analyzer result. """
2627 return Parser ().get_reports (file_path )
28+
29+ def _add_report_hash (self , report : Report ):
30+ # Due to backward compatibility, the CodeChecker analyzer
31+ # uses hash type PATH_SENSITIVE for ClangTidy by default.
32+ report .report_hash = get_report_hash (report , HashType .PATH_SENSITIVE )
Original file line number Diff line number Diff line change 1212 <key >description </key >
1313 <string >Division by zero </string >
1414 <key >issue_hash_content_of_line_in_context </key >
15- <string >b8ef906124c39571d9689250d028d16d </string >
15+ <string >79cc349883cacbd7d2a4301ddb79bc68 </string >
1616 <key >location </key >
1717 <dict >
1818 <key >col </key >
7070 <key >description </key >
7171 <string >remainder by zero is undefined </string >
7272 <key >issue_hash_content_of_line_in_context </key >
73- <string >5a0fa223fabaf319bc0ec3731e27d45a </string >
73+ <string >9785900b66c87f89edcc9daaab59647a </string >
7474 <key >location </key >
7575 <dict >
7676 <key >col </key >
Original file line number Diff line number Diff line change 1212 <key >description </key >
1313 <string >unused variable 'y' </string >
1414 <key >issue_hash_content_of_line_in_context </key >
15- <string >9f5469099db1a2765912c8254b32e90b </string >
15+ <string >0afd6d1f5bf7f1856d9f01e4ac92534e </string >
1616 <key >location </key >
1717 <dict >
1818 <key >col </key >
5353 <key >description </key >
5454 <string >Division by zero </string >
5555 <key >issue_hash_content_of_line_in_context </key >
56- <string >602f6604275a08320db132be28d3eaf7 </string >
56+ <string >1ef143e61c82bfb7af1209b9a0cc629f </string >
5757 <key >location </key >
5858 <dict >
5959 <key >col </key >
239239 <key >description </key >
240240 <string >remainder by zero is undefined </string >
241241 <key >issue_hash_content_of_line_in_context </key >
242- <string >0758808c01c22b4a346799d1156c13a5 </string >
242+ <string >cac9b3630bea66ab98dfefacc2a8f6d0 </string >
243243 <key >location </key >
244244 <dict >
245245 <key >col </key >
Original file line number Diff line number Diff line change 1212 <key >description </key >
1313 <string >use nullptr </string >
1414 <key >issue_hash_content_of_line_in_context </key >
15- <string >fed12e2201409b4f0b225382f92ac4f3 </string >
15+ <string >881bd0b5111814b3eaab59f4229eccba </string >
1616 <key >location </key >
1717 <dict >
1818 <key >col </key >
Original file line number Diff line number Diff line change 1212 <key >description </key >
1313 <string >Dereference of null pointer (loaded from variable 'x') </string >
1414 <key >issue_hash_content_of_line_in_context </key >
15- <string >056941efdc49d4520272e9b9c6152f3c </string >
15+ <string >0a6cacbf28c3f076a87efdbabdb779e6 </string >
1616 <key >location </key >
1717 <dict >
1818 <key >col </key >
Original file line number Diff line number Diff line change 1212 <key >description </key >
1313 <string >use nullptr </string >
1414 <key >issue_hash_content_of_line_in_context </key >
15- <string >5385d8fae5f3551df1dcb8e0456b204f </string >
15+ <string >eddcf362e7943111bd32bc42374dbdd8 </string >
1616 <key >location </key >
1717 <dict >
1818 <key >col </key >
6969 <key >description </key >
7070 <string >array index 10 is past the end of the array (that has type 'int[5]') </string >
7171 <key >issue_hash_content_of_line_in_context </key >
72- <string >f5dfd26909c583aeeeb8f0920b5c0366 </string >
72+ <string >1ebc38c3c566592b0a5ee568c7d1d29b </string >
7373 <key >location </key >
7474 <dict >
7575 <key >col </key >
174174 <key >description </key >
175175 <string >expected ';' at end of declaration </string >
176176 <key >issue_hash_content_of_line_in_context </key >
177- <string >d1e2722d18925ba9b4f6c1f9bbec1a22 </string >
177+ <string >aae82361e0407349e455ca1bd831ff86 </string >
178178 <key >location </key >
179179 <dict >
180180 <key >col </key >
Original file line number Diff line number Diff line change 1212 <key >description </key >
1313 <string >remainder by zero is undefined </string >
1414 <key >issue_hash_content_of_line_in_context </key >
15- <string >5a0fa223fabaf319bc0ec3731e27d45a </string >
15+ <string >9785900b66c87f89edcc9daaab59647a </string >
1616 <key >location </key >
1717 <dict >
1818 <key >col </key >
Original file line number Diff line number Diff line change 1212 <key >description </key >
1313 <string >unused variable 'y' </string >
1414 <key >issue_hash_content_of_line_in_context </key >
15- <string >9f5469099db1a2765912c8254b32e90b </string >
15+ <string >0afd6d1f5bf7f1856d9f01e4ac92534e </string >
1616 <key >location </key >
1717 <dict >
1818 <key >col </key >
5353 <key >description </key >
5454 <string >remainder by zero is undefined </string >
5555 <key >issue_hash_content_of_line_in_context </key >
56- <string >0758808c01c22b4a346799d1156c13a5 </string >
56+ <string >cac9b3630bea66ab98dfefacc2a8f6d0 </string >
5757 <key >location </key >
5858 <dict >
5959 <key >col </key >
You can’t perform that action at this time.
0 commit comments