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

Maximum parse errors that the parser will output #54

Open
ciaranmcnulty opened this issue Nov 11, 2022 · 3 comments
Open

Maximum parse errors that the parser will output #54

ciaranmcnulty opened this issue Nov 11, 2022 · 3 comments

Comments

@ciaranmcnulty
Copy link
Contributor

Currently both Java and PHP cap the number of errors at 11 (this maybe was meant to be 10 but I copied Java!) I imagine some others do to?

This is not really reflected in the testdata - I think we should have a document in there with ~20 errors and some pickle parseErrors showing it's capped off

OR we should remove the (arbitrary?) cap...

@mpkorstanje
Copy link
Contributor

mpkorstanje commented Nov 11, 2022

The cap is there for human interaction reasons.

Once you've got more then a few parse errors it is likely that only the first few are actual problems, the others are false errors caused by the previous incorrect syntax.

For example, imagine a feature file with 20 scenarios, but missing the Feature keyword. Every line would have a parse error.

Some parsers are smart enough to make assumptions and somehow guess the intended structure, Berp unfortunately is not.

So to keep the user from being overwhelmed we are limited to limiting the parse errors shown.

@ciaranmcnulty
Copy link
Contributor Author

Ok I'll canonicalise it in a testdata feature

is 11 the right number? :)

@mpkorstanje
Copy link
Contributor

I guess, it's a prime. So it's not an ugly number. 😆

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

2 participants