-
Notifications
You must be signed in to change notification settings - Fork 13
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
check only reports one issue per file #60
Comments
This is a known limitation. I've had this conversation with other users in the Slack channel about this a few times. (I thought an enhancement request was already open on the topic, but I can't find it now.) So thanks again for taking the time to provide feedback, and documenting this enhancement :-) There's a fundamental parsing challenge here. Once a parsing error is encountered, the parser ends up in an unknown state, and therefore it's quite difficult to know what exactly is wrong with what comes next. For example:
So of course we should report that there's a problem with There's probably ways to optimize this output, but what you end up with is less consistent and predictable results. In other words, right now we know that I realize this can be frustrating to keep going back to the same file over and over again. I've often found that new users, in particular, find this frustrating. (And it make sense, it's one of the first things you encounter. Basically any I pretty frequently make mistakes while editing I do want to make some sort of "greedy error" reporting option mode available at some point in the future. So that users can "opt-in" for more tentative error reporting which would be helpful when first-importing new files. But I hesitate to invest in that kind of code change right now because I'm planning on completely overhauling the core TL; DR
Sorry for that really long response, but since this has come up a few times, I wanted to explain the topic more completely as a reference for others. Hopefully you found that useful. This certainly is a "final decision" or anything like that. I do have open questions on this myself. Should this be treated as a technical or training issue? Or, should this be a higher priority, simply because it negatively impacts a user's first impression of the tool? |
Thanks for the detailed explanation. I can see where you're coming from with the code simplicity. Counter argument would be any modern compiler finds/displays all the errors in the code at once and not the first one ;) |
Fair point. They also using proper parsers developed over decades with thousands of man hours invented. So in terms of maturity curve, friendly and accurate syntax error reporting, who knows, ksconf may even be ahead of the game at this point? LOL The parser in ksconf right now is about 90 lines of code (+20 for unicode/BOM support); so it's quite simple.) I've looked at adopting some proper parsing frameworks; which will undoubtedly increase the code base, and decrease performance (not that parsing time is all that significant), but the big benefit is that it's not hand-coded so it can do a bunch better job at error reporting and/or attempting to resume after a syntax error. If you or anyone you know has some hands on experience with TatSu I'd welcome the help! |
Env:
ksconf 0.7.7rc1
Windows
Issue:
check only reports one issue per .conf file, even though there are other issues present. here is an censored example. between each run, I would correct the identified issue and save the .conf file.
The text was updated successfully, but these errors were encountered: