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

Deprecate StringSubject.doesNotMatch? #790

Open
cpovirk opened this issue Nov 23, 2020 · 0 comments
Open

Deprecate StringSubject.doesNotMatch? #790

cpovirk opened this issue Nov 23, 2020 · 0 comments
Labels
P3 not scheduled type=defect Bug, not working as expected

Comments

@cpovirk
Copy link
Member

cpovirk commented Nov 23, 2020

As noted in #789 (comment), it's very frequently misused.

Users who want that behavior would likely be better served by having to opt into it more explicitly with a call like doesNotContainMatch("(?s)^.*something.*$"). Unfortunately, even that is likely to lead to misuse: If users omit (?s), then . does not match newlines, so any string with a newline will pass a test like doesNotContainMatch("^.*something.*$") :( Perhaps our regex methods would ideally have enabled (?s) by default. But then that would be different from the Pattern-accepting overloads. There is no great solution here.

@cpovirk cpovirk added type=defect Bug, not working as expected P3 not scheduled labels Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 not scheduled type=defect Bug, not working as expected
Projects
None yet
Development

No branches or pull requests

1 participant