Skip to content

Enhancement (config): Change dryRun config option to a boolean integer#142

Merged
leojonathanoh merged 1 commit intomasterfrom
enhancement/config-change-dryrun-config-option-to-a-boolean-integer
Nov 8, 2022
Merged

Enhancement (config): Change dryRun config option to a boolean integer#142
leojonathanoh merged 1 commit intomasterfrom
enhancement/config-change-dryrun-config-option-to-a-boolean-integer

Conversation

@leojonathanoh
Copy link
Copy Markdown
Member

@leojonathanoh leojonathanoh commented Nov 8, 2022

Previously, dryRun config option used integer values 1 and 2, in order to mirror other non-boolean config options. While it may not be a problem for non-technical users, technical users may find that it makes no sense to have $dryRun = 1 do an actual conversion, and $dryRun = 2 do a dry run. It has become apparent that dryRun is not more intuitive being an integer.

Now, dryRun is changed to a boolean (0 or 1). Retaining its integer type keeps it easy to use, rather than using actual boolean values $true and $false which are difficult to type and error prone. This keeps the dryRun config options easy to use for both non-technical users and technical users by not violating the principle of least astonishment. Simply set $dryRun = 0 to disable dry run, and $dryRun = 1 to enable dry run.

@leojonathanoh leojonathanoh force-pushed the enhancement/config-change-dryrun-config-option-to-a-boolean-integer branch from bb91353 to 8d34fab Compare November 8, 2022 08:11
@leojonathanoh leojonathanoh self-assigned this Nov 8, 2022
@leojonathanoh leojonathanoh added the enhancement New feature or request label Nov 8, 2022
@leojonathanoh leojonathanoh added this to the v2.19.0 milestone Nov 8, 2022
Previously, `dryRun` config option used integer values `1` and `2`, in order to mirror other non-boolean config options. While it may not be a problem for non-technical users, technical users may find that it makes no sense to have `$dryRun = 1` do an actual conversion, and `$dryRun = 2` do a dry run. It has become apparent that `dryRun` is not more intuitive being an integer.

Now, `dryRun` is changed to a boolean (`0` or `1`). Retaining its integer type keeps it easy to use, rather than using actual boolean values `$true` and `$false` which are difficult to type and error prone. This keeps the `dryRun` config options easy to use for both non-technical users and technical users by not violating the principle of least astonishment. Simply set `$dryRun = 0` to disable dry run, and `$dryRun = 1` to enable dry run.
@leojonathanoh leojonathanoh force-pushed the enhancement/config-change-dryrun-config-option-to-a-boolean-integer branch from 8d34fab to 5258b08 Compare November 8, 2022 08:24
Copy link
Copy Markdown
Member Author

@leojonathanoh leojonathanoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@leojonathanoh leojonathanoh merged commit 3a83d52 into master Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant