Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new --disable-formats flag to replace --disable-format #261

Merged
merged 6 commits into from
May 4, 2023

Conversation

sirosen
Copy link
Member

@sirosen sirosen commented May 4, 2023

--disable-formats "*" will replace --disable-format (deprecated).
--disable-formats regex is an alternative to --format-regex disabled, but that usage is not deprecated yet (I'm unusre if it should be).
--disable-formats uri-reference --disable-formats email --disable-formats ipv4 is new behavior to disable specific checks.

--disable-format will warn when used, but is still effective.

'--disable-formats' disables any given format string, and can be
passed multiple times. '--disable-format' is deprecated.
'--disable-formats "*"' can be used to disable all formats -- and in
the implementation, it has slightly different behavior from disabling
the full list of known formats.
Docs for the new option, a changelog entry, and a minor fix to some
helptext.
@sirosen
Copy link
Member Author

sirosen commented May 4, 2023

Hm. In #231 I wrote this down as a comma-delimited list, and here I implemented it as a multi-use option.
Comma-delimited usage would be nicer and I don't like the way that click is rendering a really long list of choices.

sirosen and others added 4 commits May 4, 2023 11:30
Minor refactor, no new or changed code -- just renames.
- Convert to a custom metavar and a nicely printed list in the
  helptext
- Use a new CommaDelimitedList type to capture comma delimited args,
  then join the results to keep the tuple of strings type which is
  desired. Add new test cases for this.
@sirosen sirosen merged commit 95f98c7 into main May 4, 2023
43 checks passed
@sirosen sirosen deleted the disable-formats branch May 4, 2023 16:58
@sirosen
Copy link
Member Author

sirosen commented May 4, 2023

Fixed it by adding comma-delimited-list parsing and allowing that combined with the multi-argument usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant