예제 #1
0
def construct_analyzer_type(analyzer_type, config_handler, buildaction):
    """
    Construct a specific analyzer based on the type.
    """

    LOG.debug_analyzer('Constructing ' + analyzer_type + '  analyzer')
    if analyzer_type == CLANG_SA:
        analyzer = analyzer_clangsa.ClangSA(config_handler, buildaction)
        return analyzer

    elif analyzer_type == CLANG_TIDY:
        analyzer = analyzer_clang_tidy.ClangTidy(config_handler, buildaction)
        return analyzer
    else:
        LOG.error('Unsupported analyzer type: ' + analyzer_type)
        return None
예제 #2
0
def construct_analyzer_type(analyzer_type, config_handler, buildaction):
    """
    Construct a specific analyzer based on the type.
    """

    if analyzer_type == CLANG_SA:
        LOG.debug_analyzer('Constructing clangSA analyzer')

        analyzer = analyzer_clangsa.ClangSA(config_handler, buildaction)

        return analyzer

    elif analyzer_type == CLANG_TIDY:
        LOG.debug_analyzer("Constructing clang-tidy analyzer")

        analyzer = analyzer_clang_tidy.ClangTidy(config_handler, buildaction)

        return analyzer
    else:
        LOG.error('Not supported analyzer type')
        return None