humanmade / humanmade/hm-content-import

Avoid positional arguments that are true by default

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
30
Forks
7
Avg merge
6h 39m
Merged PRs (30d)
2

Description

A boolean positional argument that's true by default is not nice to set to false.

For example, with the `--rel-abspath` argument in the IOL importer it's not immediately clear how to set this to a false-y value (I usually use `--rel-abspath=0`).

A better design is to use a state that's false by default, so it can simply be enabled by passing `--whatever`. The argument name can be inverted as appropriate if the default state needs to be truth-y.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.