coalib package

Subpackages

Submodules

coalib.coala module

coalib.coala.main()[source]

coalib.coala_ci module

coalib.coala_ci.main()[source]

coalib.coala_delete_orig module

coalib.coala_delete_orig.main(log_printer=None, section: coalib.settings.Section.Section = None)[source]

coalib.coala_format module

coalib.coala_format.main()[source]

coalib.coala_json module

coalib.coala_json.main()[source]

coalib.coala_main module

coalib.coala_main.do_nothing(*args)[source]
coalib.coala_main.run_coala(console_printer=None, log_printer=None, print_results=<function do_nothing>, acquire_settings=<function fail_acquire_settings>, print_section_beginning=<function do_nothing>, nothing_done=<function do_nothing>, autoapply=True, force_show_patch=False, arg_parser=None, arg_list=None)[source]

This is a main method that should be usable for almost all purposes and reduces executing coala to one function call.

Parameters:
  • console_printer – Object to print messages on the console.
  • log_printer – A LogPrinter object to use for logging.
  • print_results – A callback that takes a LogPrinter, a section, a list of results to be printed, the file dict and the mutable file diff dict.
  • acquire_settings – The method to use for requesting settings. It will get a parameter which is a dictionary with the settings name as key and a list containing a description in [0] and the names of the bears who need this setting in all following indexes.
  • print_section_beginning – A callback that will be called with a section name string whenever analysis of a new section is started.
  • nothing_done – A callback that will be called with only a log printer that shall indicate that nothing was done.
  • autoapply – Set this to false to not autoapply any actions. If you set this to False, force_show_patch will be ignored.
  • force_show_patch – If set to True, a patch will be always shown. (Using ApplyPatchAction.)
  • arg_parser – Instance of ArgParser that is used to parse non-setting arguments.
  • arg_list – The CLI argument list.
Returns:

A dictionary containing a list of results for all analyzed sections as key.

coalib.coala_modes module

coalib.coala_modes.mode_format()[source]
coalib.coala_modes.mode_json(args)[source]
coalib.coala_modes.mode_non_interactive(console_printer, args)[source]
coalib.coala_modes.mode_normal(console_printer, log_printer)[source]

Module contents

The coalib package is a collection of various subpackages regarding writing, executing and editing bears. Various other packages such as formatting and settings are also included in coalib.

coalib.assert_supported_version()[source]
coalib.get_version()[source]