Exemple #1
0
 def __init__(self,
              options=(),
              reporter=None,
              option_groups=(),
              pylintrc=None):
     # some stuff has to be done before ancestors initialization...
     #
     # messages store / checkers / reporter / astroid manager
     self.msgs_store = MessagesStore()
     self.reporter = None
     self._reporter_name = None
     self._reporters = {}
     self._checkers = {}
     self._ignore_file = False
     # visit variables
     self.file_state = FileState()
     self.current_name = None
     self.current_file = None
     self.stats = None
     # init options
     self.options = options + PyLinter.make_options()
     self.option_groups = option_groups + PyLinter.option_groups
     self._options_methods = {
         'enable': self.enable,
         'disable': self.disable
     }
     self._bw_options_methods = {
         'disable-msg': self.disable,
         'enable-msg': self.enable
     }
     full_version = '%%prog %s, \nastroid %s, common %s\nPython %s' % (
         version, astroid_version, common_version, sys.version)
     OptionsManagerMixIn.__init__(self,
                                  usage=__doc__,
                                  version=full_version,
                                  config_file=pylintrc or config.PYLINTRC)
     MessagesHandlerMixIn.__init__(self)
     ReportsHandlerMixIn.__init__(self)
     BaseTokenChecker.__init__(self)
     # provided reports
     self.reports = (
         ('RP0001', 'Messages by category', report_total_messages_stats),
         ('RP0002', '% errors / warnings by module',
          report_messages_by_module_stats),
         ('RP0003', 'Messages', report_messages_stats),
         ('RP0004', 'Global evaluation', self.report_evaluation),
     )
     self.register_checker(self)
     self._dynamic_plugins = set()
     self.load_provider_defaults()
     if reporter:
         self.set_reporter(reporter)
 def __init__(self,
              options=(),
              reporter=None,
              option_groups=(),
              pylintrc=None):
     # some stuff has to be done before ancestors initialization...
     #
     # checkers / reporter / astng manager
     self.reporter = None
     self._checkers = {}
     self._ignore_file = False
     # visit variables
     self.base_name = None
     self.base_file = None
     self.current_name = None
     self.current_file = None
     self.stats = None
     # init options
     self.options = options + PyLinter.options
     self.option_groups = option_groups + PyLinter.option_groups
     self._options_methods = {
         'enable-report': self.enable_report,
         'disable-report': self.disable_report,
         'enable-msg': self.enable_message,
         'disable-msg': self.disable_message,
         'enable-msg-cat': self.enable_message_category,
         'disable-msg-cat': self.disable_message_category
     }
     full_version = '%%prog %s, \nastng %s, common %s\nPython %s' % (
         version, astng_version, common_version, sys.version)
     OptionsManagerMixIn.__init__(self,
                                  usage=__doc__,
                                  version=full_version,
                                  config_file=pylintrc or config.PYLINTRC)
     MessagesHandlerMixIn.__init__(self)
     ReportsHandlerMixIn.__init__(self)
     BaseRawChecker.__init__(self)
     # provided reports
     self.reports = (
         ('R0001', 'Messages by category', report_total_messages_stats),
         ('R0002', '% errors / warnings by module',
          report_messages_by_module_stats),
         ('R0003', 'Messages', report_messages_stats),
         ('R0004', 'Global evaluation', self.report_evaluation),
     )
     self.register_checker(self)
     self._dynamic_plugins = []
     self.load_provider_defaults()
     self.set_reporter(reporter or TextReporter(sys.stdout))
Exemple #3
0
 def __init__(self, options=(), reporter=None, option_groups=(),
              pylintrc=None):
     # some stuff has to be done before ancestors initialization...
     #
     # messages store / checkers / reporter / astroid manager
     self.msgs_store = MessagesStore()
     self.reporter = None
     self._reporter_name = None
     self._reporters = {}
     self._checkers = {}
     self._ignore_file = False
     # visit variables
     self.file_state = FileState()
     self.current_name = None
     self.current_file = None
     self.stats = None
     # init options
     self.options = options + PyLinter.make_options()
     self.option_groups = option_groups + PyLinter.option_groups
     self._options_methods = {
         'enable': self.enable,
         'disable': self.disable}
     self._bw_options_methods = {'disable-msg': self.disable,
                                 'enable-msg': self.enable}
     full_version = '%%prog %s, \nastroid %s, common %s\nPython %s' % (
         version, astroid_version, common_version, sys.version)
     OptionsManagerMixIn.__init__(self, usage=__doc__,
                                  version=full_version,
                                  config_file=pylintrc or config.PYLINTRC)
     MessagesHandlerMixIn.__init__(self)
     ReportsHandlerMixIn.__init__(self)
     BaseTokenChecker.__init__(self)
     # provided reports
     self.reports = (('RP0001', 'Messages by category',
                      report_total_messages_stats),
                     ('RP0002', '% errors / warnings by module',
                      report_messages_by_module_stats),
                     ('RP0003', 'Messages',
                      report_messages_stats),
                     ('RP0004', 'Global evaluation',
                      self.report_evaluation),
                    )
     self.register_checker(self)
     self._dynamic_plugins = set()
     self.load_provider_defaults()
     if reporter:
         self.set_reporter(reporter)
 def __init__(self, options=(), reporter=None, option_groups=(),
              pylintrc=None):
     # some stuff has to be done before ancestors initialization...
     #
     # checkers / reporter / astng manager
     self.reporter = None
     self.manager = ASTNGManager()
     self._checkers = {}
     self._ignore_file = False        
     # visit variables
     self.base_name = None
     self.base_file = None
     self.current_name = None
     self.current_file = None
     self.stats = None
     # init options
     self.options = options + PyLinter.options
     self.option_groups = option_groups + PyLinter.option_groups
     self._options_methods = {
         'enable-report': self.enable_report,
         'disable-report': self.disable_report,
         'enable-msg': self.enable_message,
         'disable-msg': self.disable_message,
         'enable-msg-cat': self.enable_message_category,
         'disable-msg-cat': self.disable_message_category}
     full_version = '%%prog %s, \nastng %s, common %s\nPython %s' % (
         version, astng_version, common_version, sys.version)
     OptionsManagerMixIn.__init__(self, usage=__doc__,
                                  version=full_version,
                                  config_file=pylintrc or config.PYLINTRC)
     MessagesHandlerMixIn.__init__(self)
     ReportsHandlerMixIn.__init__(self)
     BaseRawChecker.__init__(self)
     # provided reports
     self.reports = (('R0001', 'Messages by category',
                      report_total_messages_stats),
                     ('R0002', '% errors / warnings by module',
                      report_messages_by_module_stats),
                     ('R0003', 'Messages',
                      report_messages_stats),
                     ('R0004', 'Global evaluation',
                      self.report_evaluation),
                     )
     self.register_checker(self)
     self._dynamic_plugins = []
     self.load_provider_defaults()
     self.set_reporter(reporter or TextReporter(sys.stdout))
Exemple #5
0
 def __init__(self, options=(), reporter=None, option_groups=(), pylintrc=None):
     # some stuff has to be done before ancestors initialization...
     #
     # checkers / reporter / astng manager
     self.reporter = None
     self._checkers = {}
     self._ignore_file = False
     # visit variables
     self.base_name = None
     self.base_file = None
     self.current_name = None
     self.current_file = None
     self.stats = None
     # init options
     self.options = options + PyLinter.make_options()
     self.option_groups = option_groups + PyLinter.option_groups
     self._options_methods = {"enable": self.enable, "disable": self.disable}
     self._bw_options_methods = {"disable-msg": self.disable, "enable-msg": self.enable}
     full_version = "%%prog %s, \nastng %s, common %s\nPython %s" % (
         version,
         astng_version,
         common_version,
         sys.version,
     )
     OptionsManagerMixIn.__init__(self, usage=__doc__, version=full_version, config_file=pylintrc or config.PYLINTRC)
     MessagesHandlerMixIn.__init__(self)
     ReportsHandlerMixIn.__init__(self)
     BaseRawChecker.__init__(self)
     # provided reports
     self.reports = (
         ("RP0001", "Messages by category", report_total_messages_stats),
         ("RP0002", "% errors / warnings by module", report_messages_by_module_stats),
         ("RP0003", "Messages", report_messages_stats),
         ("RP0004", "Global evaluation", self.report_evaluation),
     )
     self.register_checker(self)
     self._dynamic_plugins = []
     self.load_provider_defaults()
     self.set_reporter(reporter or TextReporter(sys.stdout))