Writing a coala Configuration File (coafile and coarc)¶
This document gives a short introduction to the specification of a coala configuration file. It is meant to be rather factual. If you wish to learn by example, please take a look at the Getting Started with coala.
Naming, Scope and Location¶
You can use up to three coafiles to configure your project.
- A project-wide coafile.
- A user-wide coafile.
- A system-wide coafile.
It is a convention that the project-wide coafile is named
and lies in the project root directory. If you follow this convention,
coala from the project root will execute the
configuration specified in that file.
Settings given in the project-wide coafile override all settings given by other files and can only be overridden by settings given via the command line interface.
User-Wide and System-Wide coafile¶
You can place a
.coarc file in your home directory to set certain
user wide settings. Those settings will automatically be taken for all
projects executed with that user.
All settings specified here override only settings given by the system
wide coafile which has the lowest priority. The
lie in the coala installation directory and is valid for everyone using
this coala installation.
Every coafile consists out of one or more sections. Section names are
case insensitive. The
default section is implicitly available and
all settings which have no section specified belong to it. The
default section is special because all settings residing in it are
automatically inherited to all other sections specified in the same
This is an example coafile:
enabled = True overridable = 2 [section-1] overridable = 3 other = 4 [section-2] overridable = 5 other = 2
This coafile would be interpreted the very same as this one, written a bit more explicitly:
[default] enabled = True overridable = 2 [section-1] enabled = True overridable = 3 other = 4 [section-2] enabled = True overridable = 5 other = 2