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

Avoid reporting duplicate errors #1

Open
bryanrsmith opened this issue Jan 16, 2016 · 0 comments
Open

Avoid reporting duplicate errors #1

bryanrsmith opened this issue Jan 16, 2016 · 0 comments

Comments

@bryanrsmith
Copy link
Owner

In the current implementation there are two forms of violations that can cause redundant errors.

Members appearing multiple positions late

Given an expected order of [ a, b, c ], and an actual order of [ b, c, a ], the rule will currently report 2 errors:

  1. expected a to come before b
  2. expected a to come before c

The second error is redundant and should not be reported.

Members appearing multiple positions early

Given an expected order of [ a, b, c ], and an actual order of [ c, a, b ], the rule will currently report 2 errors:

  1. expected a to come before c
  2. expected b to come before c

This can be more succinctly reported as a single error: "expected c to come after b".

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

No branches or pull requests

1 participant