Multiple hash types are available:
You can use this library to generate report hash for these types by using the
get_report_hash function.
get_report_hash function can be used to generate report hash with bug path
if the hash type parameter is PATH_SENSITIVE.
High level overview of the hash content:
file_namefrom the main diag section.checker name.checker message.line contentfrom the source file if can be read up.column numbersfrom the main diag section.range column numbersonly from the control diag sections if column number in the range is not the same as the previous control diag section number in the bug path. If there are no control sections event section column numbers are used.
Note: as the main diagnostic section the last element from the bug path is used.
get_report_hash function can be used to generate report hash without bug path
if the hash type parameter is CONTEXT_FREE.
High level overview of the hash content:
file_namefrom the main diag section.checker message.line contentfrom the source file if can be read up. All the whitespaces from the source content are removed.column numbersfrom the main diag sections location.
get_report_path_hash can be used to get path hash for the given bug path
which can be used to filter deduplications of multiple reports.
The project is licensed under Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT for details.