coalib package

Subpackages

Submodules

coalib.coala module

coalib.coala.main()

coalib.coala_ci module

coalib.coala_ci.main()

coalib.coala_dbus module

coalib.coala_dbus.main()
coalib.coala_dbus.on_disconnected()
coalib.coala_dbus.sys_clean_exit()

coalib.coala_delete_orig module

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

coalib.coala_format module

coalib.coala_format.main()

coalib.coala_json module

coalib.coala_json.main()

coalib.coala_main module

coalib.coala_main.do_nothing(*args)
coalib.coala_main.run_coala(log_printer=None, print_results=<function <lambda>>, acquire_settings=<function fail_acquire_settings>, print_section_beginning=<function <lambda>>, nothing_done=<function <lambda>>, autoapply=True)

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

Parameters:
  • 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 to False to autoapply nothing by default; this is overridable via any configuration file/CLI.
Returns:

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

Module contents

coalib.assert_supported_version()