Skip to content

feat: as is with anything→as with anything/as is the case with anything#3758

Open
hippietrail wants to merge 3 commits into
Automattic:masterfrom
hippietrail:as-is-with-anything
Open

feat: as is with anything→as with anything/as is the case with anything#3758
hippietrail wants to merge 3 commits into
Automattic:masterfrom
hippietrail:as-is-with-anything

Conversation

@hippietrail

Copy link
Copy Markdown
Collaborator

Issues

N/A

Description

One of several odd turns of phrase I took note of while reading a thread on changes to the Swift language.
"As is with anything" seems to be a new mixup of "as with anything" and "as is the case with". This linter lets you choose either of the two standard phrasings.

There is a small chance of false positives if punctuation is missing from a legitimate use of these words, but I only found one such instance:

This probably won't work as is with anything but DJGPP!
For such sentences the right correction would be changing "as is" to "as-is".

If this turns out not to be a rare false positive we would probably change this from Weir to Rust and try to analyse the context. Ideally with a greater variety of real-world examples.

How Has This Been Tested?

cargo test

AI Disclosure

  • I am a human and didn't use any AI.
  • I used LLM features of my editor, but not an agent.
  • I used an AI agent interactively.
  • I am an agent or I got an agent to do the work autonomously.

I did use Google Search AI to help verify the real-world snippets I found and suggest wording for the message and description fields.

If Your PR Implements or Enhances a Linter

  • I made up the sentences in the unit tests.
  • The sentences in the unit tests were generated by an AI.
  • I'm using examples from the bug report / feature request.
  • I collected real-world sentences for the unit tests.

Checklist

  • I have performed a self-review of my own code
  • I have added tests to cover my changes
  • I have considered splitting this into smaller pull requests.

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.

1 participant