Configuration
Curlylint is able to read project-specific default values for its command line options, or from a PEP 518 pyproject.toml
file.
#
Command Line flagsSee Command Line Usage for all flags.
pyproject.toml
#
#
Where Curlylint looks for the fileBy default Curlylint looks for pyproject.toml
starting from the common base directory of all files and directories passed on the command line. If it's not there, it looks in parent directories. It stops looking when it finds the file, or a .git
directory, or a .hg
directory, or the root of the file system, whichever comes first.
You can also explicitly specify the path to a particular file that you want with --config
.
Use --verbose
to display whether a file was found and used.
#
Configuration formatpyproject.toml
is a TOML file. It contains separate sections for
different tools. Curlylint is using the [tool.curlylint]
section. The option keys are the same as long names of options on the command line.
Example pyproject.toml
, note how rules are under [tool.curlylint.rules]
:
#
Lookup hierarchyCommand-line options have defaults that you can see in --help
. A pyproject.toml
can override those defaults. Finally, options provided by the user on the command line override both.
Curlylint will only ever use one pyproject.toml
file during an entire run. It doesn't look for multiple files, and doesn't compose configuration from different levels of the file hierarchy.