-
Notifications
You must be signed in to change notification settings - Fork 53
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
it would be nice if editorconfig-checker could collect instances of the same issues found in adjacent lines into a single report line #359
Comments
I agree that this would be much better. The editorconfig-checker/pkg/error/error.go Lines 35 to 67 in b4353d5
editorconfig-checker/pkg/error/error.go Lines 11 to 21 in b4353d5
Right now, this is a generic message, so we would probably need to make them identifiable somehow or do some magic string comparisons. We are more than happy to take PRs or other ideas how to implement that. |
I'm definitely giving it a shot - looks doable for a novice like me. Expect a PR hopefully this afternoon. |
If you need help or any pointers feel free to ask in here or in an (incomplete) PR! 🚀 |
I'll definitely need help for writing the test case and somebody telling me how idiomatic the code is. But the core logic is working to 90% already. |
…ecker#359) This changes the human output format to collect multiple identical error messages on consecutive lines into one error message that list both the starting and ending line. This is still missing a properly written testcase, I so far only tested with make (cd testfiles; ../bin/ec multiple-wrong-indentations.txt)
…ditorconfig-checker#359) This changes the human output format to collect multiple identical error messages on consecutive lines into one error message that list both the starting and ending line. This is still missing a properly written testcase, I so far only tested with make (cd testfiles; ../bin/ec multiple-wrong-indentations.txt)
…ditorconfig-checker#359) This changes the human output format to collect multiple identical error messages on consecutive lines into one error message that list both the starting and ending line. This is still missing a properly written testcase, I so far only tested locally.
…ditorconfig-checker#359) This changes the human output format to collect multiple identical error messages on consecutive lines into one error message that list both the starting and ending line. This is still missing a properly written testcase, I so far only tested locally.
I've just put a bunch of generated json documents into one of our repositories, but forgot to either ignore them or adjust their indentation to fit our editorconfig.
However this lead to me getting flooded with about 10k lines of reports that the indentation was incorrect.
I think a better output format would collect consecutive issues by not outputting each line by line, but rather turning consecutive lines having the same issue into a range. Although I can imagine that this naive approach would fail in cases where each line has two errors reported (they would ping-pong, interrupting each other's consecutiveness).
The text was updated successfully, but these errors were encountered: