Vigilance
A simple tool for enforcing code quality metrics on a codebase
 All Classes Namespaces Files Functions Variables Groups
vigilance.plugin Namespace Reference

Namespaces

 tooling
 

Classes

class  AbstractPlugin
 The external entrypoint for Vigilance plugins. More...
 

Functions

def get_configured_plugins
 Retrieves a list of all plugins that the user has configured for availability within Vigilance. More...
 
def load_suites
 Loads all quality suites that should be made available to the Vigilance tool. More...
 

Variables

tuple SuiteComponents = namedtuple('SuiteComponents', ['key', 'parser', 'constraints', 'configurations'])
 The components necessary to construct a vigilance.suite.QualitySuite instance. More...
 
list DefaultSuites
 The default suites that should be available to the Vigilance tool. More...
 

Function Documentation

def vigilance.plugin.get_configured_plugins ( )

Retrieves a list of all plugins that the user has configured for availability within Vigilance.

This list will prefer configurations from three sources in this order:

  1. The VIGILANCE_PLUGINS environment variable.
  2. A .vigilance file within the current working directory.
  3. A setup.cfg file within the current working directory.
    Returns
    A list of plugin specifier strings.
    See Also
    load_suites
def vigilance.plugin.load_suites (   plugins,
  disableDefaults = False 
)

Loads all quality suites that should be made available to the Vigilance tool.

Parameters
pluginsA list of strings specifying the plugins that should be loaded (e.g. 'vigilance.default_suites.doxygen:Default').
disableDefaultsWhether the default suites should be disabled from the suite load.

Variable Documentation

list DefaultSuites
Initial value:
1 = ['vigilance.default_suites.cobertura:Default',
2  'vigilance.default_suites.doxygen:Default']

The default suites that should be available to the Vigilance tool.

tuple SuiteComponents = namedtuple('SuiteComponents', ['key', 'parser', 'constraints', 'configurations'])

The components necessary to construct a vigilance.suite.QualitySuite instance.

key is the unique name of the quality suite; only one plugin for each key can be loaded by a single running instance of Vigilance.
parser is an object instance that should be a subclass of vigilance.parser.Parser. Used to parse the quality report.
constraints is a dictionary mapping constraint labels to their associated class objects (subclasses of vigilance.constraint.Constraint).
configurations is a dictionary mapping configuration stanza labels to their associated stanza objects (subclasses of vigilance.configuration.ConfigurationStanza).