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

Improve no-dupe-disjunctions by reordering alternatives #251

Closed
RunDevelopment opened this issue Jun 15, 2021 · 0 comments · Fixed by #256 or #281
Closed

Improve no-dupe-disjunctions by reordering alternatives #251

RunDevelopment opened this issue Jun 15, 2021 · 0 comments · Fixed by #256 or #281
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@RunDevelopment
Copy link
Collaborator

To implement sort-alternatives, I had to implement a method to decide whether two alternatives can be reordered.

We can use this method to improve the reporting of no-dupe-disjunctions. Right now, superset alternatives are not reported by default (e.g. /\b(?:Foo|\w+)\b/). But if the alternatives can be reordered, a superset alternative can be become a subset alternative (e.g. /\b(?:Foo|\w+)\b/ == /\b(?:\w+|Foo)\b/).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant