coala settings

coala provides a common command-line interface for linting and fixing all your code, regardless of the programming languages you use.

To find out what kind of analysis coala offers for the languages you use, visit, or run:

$ coala --show-bears --filter-by language C Python

To perform code analysis, simply specify the analysis routines (bears) and the files you want it to run on, for example:


$ coala --bears SpaceConsistencyBear --files **.py

coala can also automatically fix your code:


$ coala --bears SpaceConsistencyBear --files **.py --apply-patches

To run coala without user interaction, run the coala –non-interactive, coala –json and coala –format commands.

usage: coala [-h] [-v] [-C] [--ci] [--json] [--format [STR]] [-c FILE] [-F]
             [-I] [-s [FILE]] [--disable-caching] [--flush-cache]
             [--no-autoapply-warn] [-b NAME [NAME ...]] [-f FILE [FILE ...]]
             [-i FILE [FILE ...]] [--limit-files FILE [FILE ...]]
             [-d DIR [DIR ...]] [-V] [-L ENUM] [-m ENUM] [-N] [-B]
             [-l LANG [LANG ...]]
             [--filter-by FILTER_NAME FILTER_ARG [FILTER_ARG ...]]
             [-p LANG [LANG ...]] [-D] [--show-settings] [--show-details]
             [--log-json] [-o FILE] [-r [RELPATH]] [-S SETTING [SETTING ...]]
             [-a] [-j JOBS] [-n] [-A] [--debug]
             [TARGETS [TARGETS ...]]

Positional Arguments

TARGETS sections to be executed exclusively


-v, --version show program’s version number and exit


-C, --non-interactive
 run coala in non interactive mode
--ci continuous integration run, alias for –non-interactive
--json mode in which coala will display output as json
--format output results with a custom format string, e.g. “Message: {message}”; possible placeholders: id, origin, file, line, end_line, column, end_column, severity, severity_str, message, message_base, message_arguments, affected_code, source_lines


-c, --config configuration file to be used, defaults to .coafile
-F, --find-config
 find .coafile in ancestors of the working directory
-I, --no-config
 run without using any config file
-s, --save save used arguments to a config file to a .coafile, the given path, or at the value of -c
 run on all files even if unchanged
--flush-cache rebuild the file cache
 turn off warning about patches not being auto applicable


-b, --bears names of bears to use
-f, --files files that should be checked
-i, --ignore files that should be ignored
--limit-files filter the –files argument’s matches further
-d, --bear-dirs
 additional directories which may contain bears


-V, --verbose alias for -L DEBUG
-L, --log-level

Possible choices: ERROR, INFO, WARNING, DEBUG

set log output level to DEBUG/INFO/WARNING/ERROR, defaults to INFO

-m, --min-severity

Possible choices: INFO, NORMAL, MAJOR

set minimal result severity to INFO/NORMAL/MAJOR

-N, --no-color display output without coloring (excluding logs)
-B, --show-bears
 list all bears
-l, --filter-by-language
 filters –show-bears by the given languages
--filter-by filters –show-bears by the filter given as argument. Available filters: can_detect, can_fix, language
-p, --show-capabilities
 show what coala can fix and detect for the given languages
-D, --show-description
 show bear descriptions for –show-bears
 show bear settings for –show-bears
--show-details show bear details for –show-bears
--log-json output logs as json along with results (must be called with –json)
-o, --output write results to the given file (must be called with –json)
-r, --relpath return relative paths for files (must be called with –json)


-S, --settings arbitrary settings in the form of section.key=value
-a, --apply-patches
 apply all patches automatically if possible
-j, --jobs number of jobs to use in parallel
-n, --no-orig don’t create .orig backup files before patching
-A, --single-action
 apply a single action for all results
--debug run coala in debug mode, starting ipdb, which must be separately installed, on unexpected internal exceptions (implies –verbose)