Rewrite option, env, and config handling #282
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This completely replaces our options, environment, and configuration
handling with the off-the-shelf library
opt-env-conf
.All settings are now normalized and parsed through the three sources, we
have a much richer help and man-page output, and we dropped a massive
amount of code.
It's hard to say what users were relying on, so we aimed to be somewhat
compatible, but not completely. Options and configuration are backwards
completely compatible because we know users rely on the latter and
actions/run
uses the former. We gave ourselves more liberties withenvironment variables, in the interest of normalization and simplicity.
Here is a possibly-not-exhaustive summary of changes:
--config-file
--{also,}exclude
--ignore-{authors,branches,labels}
--restylers-version
--host-directory
--restyler-{restricted,net-none,cpu-shares,memory}
--x
and--no-x
.CONFIG_FILE
FAIL_ON_DIFFERENCES
{ALSO_,}EXCLUDE
IGNORE_{AUTHORS,BRANCHES,LABELS}
RESTYLERS_VERSION
NO_IMAGE_CLEANUP
toIMAGE_CLEANUP=False
NO_PULL
toPULL=False
NO_COMMIT
toCOMMIT=False
NO_CLEAN
toCLEAN=False
UNRESTRICTED
toRESTYLER_RESTRICTED=False
logging.*
dry_run
fail_on_differences
restylers_manifest
docker.*
git.*
ignore.*
(ignore_*
is still supported)For complete details, see the complete reference and the updated
config/defaults.yaml