def __init__(self, ruleset_name=None, ruleset_file=None, ruleset=None, checks_paths=None):
        """
        Load ruleset for colin.

        :param ruleset_name: str (name of the ruleset file (without any file extension), default is
                             "default"
        :param ruleset_file: fileobj instance holding ruleset configuration
        :param ruleset: dict, content of a ruleset file
        :param checks_paths: list of str, directories where the checks are present
        """
        self.check_loader = CheckLoader(get_checks_paths(checks_paths))
        if ruleset:
            self.ruleset_struct = RulesetStruct(ruleset)
        elif ruleset_file:
            self.ruleset_struct = get_ruleset_struct_from_fileobj(ruleset_file)
        else:
            logger.debug("Loading ruleset with the name '{}'.".format(ruleset_name))
            ruleset_path = get_ruleset_file(ruleset=ruleset_name)
            self.ruleset_struct = get_ruleset_struct_from_file(ruleset_path)
        if self.ruleset_struct.version not in ["1", 1]:
            raise ColinRulesetException("colin accepts only ruleset version '1'. You provided %r"
                                        % self.ruleset_struct.version)
def __init__ ( self , ruleset_name = None , ruleset_file = None , ruleset = None , checks_paths = None ) : self . check_loader = CheckLoader ( get_checks_paths ( checks_paths ) ) if ruleset : self . ruleset_struct = RulesetStruct ( ruleset ) elif ruleset_file : self . ruleset_struct = get_ruleset_struct_from_fileobj ( ruleset_file ) else : logger . debug ( "Loading ruleset with the name '{}'." . format ( ruleset_name ) ) ruleset_path = get_ruleset_file ( ruleset = ruleset_name ) self . ruleset_struct = get_ruleset_struct_from_file ( ruleset_path ) if self . ruleset_struct . version not in [ "1" , 1 ] : raise ColinRulesetException ( "colin accepts only ruleset version '1'. You provided %r" % self . ruleset_struct . version )
Load ruleset for colin.

        :param ruleset_name: str (name of the ruleset file (without any file extension), default is
                             "default"
        :param ruleset_file: fileobj instance holding ruleset configuration
        :param ruleset: dict, content of a ruleset file
        :param checks_paths: list of str, directories where the checks are present