Exemple #1
0
    def construct_result_handler(self, buildaction, report_output,
                                 severity_map, skiplist_handler):
        """
        See base class for docs.
        """
        res_handler = result_handler_clang_tidy.ClangTidyPlistToFile(
            buildaction, report_output)

        res_handler.severity_map = severity_map
        res_handler.skiplist_handler = skiplist_handler
        return res_handler
def construct_analyze_handler(buildaction, report_output, severity_map,
                              skiplist_handler):
    """
    Construct an empty (base) ResultHandler which is capable of returning
    analyzer worker statuses to the caller method, but does not provide
    actual parsing and processing of results, instead only saves the analysis
    results.
    """
    if buildaction.analyzer_type not in supported_analyzers:
        return None

    if buildaction.analyzer_type == CLANG_SA:
        res_handler = result_handler_base.ResultHandler(
            buildaction, report_output)
    elif buildaction.analyzer_type == CLANG_TIDY:
        res_handler = result_handler_clang_tidy.ClangTidyPlistToFile(
            buildaction, report_output)

    res_handler.severity_map = severity_map
    res_handler.skiplist_handler = skiplist_handler
    return res_handler