Skip to content

Commit

Permalink
Officially support fix-all-without-prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
jfmengels committed Oct 30, 2024
1 parent d613afb commit 2d22606
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## [Unreleased]

- Publicly document the `--fix-all-without-prompt` CLI flag. Please use it well!
- Fixed an issue where the initial rule created with `elm-review new-package` was always a module rule, even when it was requested to be a project rule. Thanks to [@mateusfpleite](https://github.com/mateusfpleite)!
- Plenty of behind the scenes improvement to the maintenance of the repository. Thanks to [@lishaduck](https://github.com/lishaduck) for all of those.

Expand Down
17 changes: 12 additions & 5 deletions lib/flags.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,18 @@ const flags = [
`Fixed files will be reformatted using ${chalk.magentaBright('elm-format')}.`
]
},
{
name: 'fix-all-without-prompt',
boolean: true,
color: chalk.blueBright,
sections: ['fix'],
description: [
// prettier-ignore
`Same as ${chalk.blueBright('--fix-all')} but fixes are applied without a prompt.`,
'I recommend to commit all changes prior to running with this option and',
'to review the applied changes afterwards.'
]
},
{
name: 'fix-limit',
boolean: false,
Expand All @@ -344,11 +356,6 @@ const flags = [
sections: ['fix'],
description: ['Limit the number of fixes applied in a single batch to N.']
},
{
name: 'fix-all-without-prompt',
boolean: true,
sections: null
},
{
name: 'elm-format-path',
boolean: false,
Expand Down
5 changes: 5 additions & 0 deletions test/snapshots/help/default.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ If you wish to use automatic fixing, you can use the following flags:
called without --fix-all.
Fixed files will be reformatted using elm-format.

--fix-all-without-prompt
Same as --fix-all but fixes are applied without a prompt.
I recommend to commit all changes prior to running with this option and
to review the applied changes afterwards.

--fix-limit=N
Limit the number of fixes applied in a single batch to N.

Expand Down

2 comments on commit 2d22606

@lishaduck
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: "I recommend to commit" → "I recommend committing" (same with "to review" → "reviewing")

@jfmengels
Copy link
Owner Author

Choose a reason for hiding this comment

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

Thanks 👍

Please sign in to comment.