For some projects, it may be undesirable to have a single configuration being applied to the entire code base.
Using the autils repository as an example, APIs in the utility modules that will be made public should require docstrings for the module, methods and functions. This is unfair to ask for the modules/classes/methods/functions that implement tests for a given module, as it would require too much boilerplate code just to conform with a lint check.
The idea here is to allow the static-checks to map a pattern or glob to a given configuration. For instance:
autils/*: default_config/pylintrc
tests/*: default_config/pylintrc_tests
The check-lint script should have the ability to look into the parent repository and look for the mapping. Example:
[autils] $ ls -la1
...
autils
tests
static-checks
.avocado_static_checks.conf
...
With .avocado_static_checks.conf containing something like:
For some projects, it may be undesirable to have a single configuration being applied to the entire code base.
Using the autils repository as an example, APIs in the utility modules that will be made public should require docstrings for the module, methods and functions. This is unfair to ask for the modules/classes/methods/functions that implement tests for a given module, as it would require too much boilerplate code just to conform with a lint check.
The idea here is to allow the static-checks to map a pattern or glob to a given configuration. For instance:
autils/*
: default_config/pylintrctests/*
: default_config/pylintrc_testsThe
check-lint
script should have the ability to look into the parent repository and look for the mapping. Example:With
.avocado_static_checks.conf
containing something like:In the absence of such a config file,
check-lint
should apply a reasonable action, using the default config on all Python files.