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

Add pretty-formatters for Gherkin (for Java) #1729

Closed
jamietanna opened this issue Sep 6, 2021 · 4 comments
Closed

Add pretty-formatters for Gherkin (for Java) #1729

jamietanna opened this issue Sep 6, 2021 · 4 comments

Comments

@jamietanna
Copy link
Contributor

Is your feature request related to a problem? Please describe.

As someone who writes Gherkin feature files, I'd like to be sure my formatting is consistent across contributors to the project - whether editing in an IDE, or a text editor - and that can be automated as part of i.e. a code formatter like Spotless

Describe the solution you'd like

Add a pretty-formatter for Gherkin as a first-class citizen. This would allow taking i.e. a String, returning a String that is formatted according to pre-defined rules, and with indentation that can be specified.

I've recently implemented this in https://gitlab.com/jamietanna/gherkin-formatter and have licensed as MIT purposefully so Cucumber could take it as-is.

Describe alternatives you've considered

We write our own formatter.

@aslakhellesoy
Copy link
Contributor

Duplicate of cucumber/gherkin-utils#4. Also see #1725

@aslakhellesoy
Copy link
Contributor

But your code is really nice! Thanks for the effort :-)

@jamietanna
Copy link
Contributor Author

Thanks @aslakhellesoy - do you think it's worth me raising a separate PR for importing my implementation?

@laeubi
Copy link

laeubi commented Sep 14, 2021

@jamietanna this could be really usefull especially for the cucumber-eclipse plugin that currently lacks formatting capabilities.

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

3 participants