print_usage_and_exit
612# meld clangtidy.xml clangtidy_new.xml.comparable
613
614
615def print_usage_and_exit():616 script_name = os.path.basename(sys.argv[0])
617 print("""Usage: %s rules <path to clang-tidy source directory with RST files>
618 %s rules_fixurls <path to clang-tidy source directory with RST files>
diagnostics_to_rules_xml
519 return "\n".join(html_lines)
520
521
522def diagnostics_to_rules_xml(json_file):523 rules = et.Element('rules')
524
525 # add a template rule
generate_description
499 return DIAG_CLASS[max_class]["sonarqube_type"], SEVERITY[max_severity]["sonarqube_severity"]
500
501
502def generate_description(diag_group_name, diagnostics):503 html_lines = ["<p>Diagnostic text:</p>", "<ul>"]
504 all_diagnostics_are_remarks = True
505 for diagnostic in sorted(diagnostics, key=lambda k: k['Summary']):
calculate_rule_type_and_severity
483 }
484
485
486def calculate_rule_type_and_severity(diagnostics):487 max_class = "CLASS_EXTENSION"
488 max_severity = "SEV_Ignored"
489
collect_warnings
434 et.SubElement(rule, 'type').text = rule_type
435 rules.append(rule)
436
437def collect_warnings(data, diag_group_id, warnings_in_group):438 diag_group = data[diag_group_id]
439
440 for entry_key in data:
The module/function docstring is missing.
If you want to ignore this, you can configure this in the .deepsource.toml
file. Please refer to docs for available options.