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

Substitution style fails in 3.7.0 #887

Closed
jdkato opened this issue Aug 25, 2024 Discussed in #877 · 0 comments
Closed

Substitution style fails in 3.7.0 #887

jdkato opened this issue Aug 25, 2024 Discussed in #877 · 0 comments

Comments

@jdkato
Copy link
Member

jdkato commented Aug 25, 2024

Discussed in #877

Originally posted by daobrien July 25, 2024
We have the following style that works in version 3.6.1:

---
extends: substitution
message: "Use '%s' instead of '%s'."
ignorecase: false
level: error
nonword: true
action:
  name: replace
swap:
  '\b(?:[Ee]\.[Gg]\.)': for example
  '\b(?:[Ii]\.[Ee]\.)': that is
  '\b(?:[Ee][Tt][Cc]\.)': and so on
  '\b(?:[Vv][Ss]\.)': versus
  '\b(?:[Vv][Ss]\s)(?!Code)': versus

TL;DR Replace e.g., i.e., etc., with their expansions.

One notable exception is the last line, which ignores VS Code. But, in 3.7.0, this style does not match against vs and I can't work out why. Did a bug sneak in? Do I need to tweak my regex a bit more (how?).

Thanks for any help.

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

No branches or pull requests

1 participant