-
Notifications
You must be signed in to change notification settings - Fork 459
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
Implement Gherkin formatting plugin #907
Comments
Great idea! Happy to help get a PR for this merged. |
Thanks Ned! Looking at the options available, I think it'll be a case of creating a new package to provide the pretty-printing functionality as a standalone package so will look at doing that first, then contributing the Spotless bindings 👍 |
As part of diffplug#907, we want to be able to format our Gherkin source files automagically. To do this, we can utilise the upstream gherkin-formatter project to do the heavy lifting, and add a few test cases within this project to make sure that functionality looks correct. We're calling this a `simple` formatter as it doesn't allow much to be configured other than the indentation size in spaces.
As we've created a Gherkin formatter as part of diffplug#907, we should make it possible to use it natively in Gradle, which requires we add it as a new supported type in `SpotlessExtension`.
As part of diffplug#907, we want to be able to format our Gherkin source files automagically. To do this, we can utilise the upstream gherkin-formatter project to do the heavy lifting, and add a few test cases within this project to make sure that functionality looks correct. We're calling this a `simple` formatter as it doesn't allow much to be configured other than the indentation size in spaces.
As we've created a Gherkin formatter as part of diffplug#907, we should make it possible to use it natively in Gradle, which requires we add it as a new supported type in `SpotlessExtension`.
As part of diffplug#907, we want to be able to format our Gherkin source files automagically. To do this, we can utilise the upstream gherkin-formatter project to do the heavy lifting, and add a few test cases within this project to make sure that functionality looks correct. We're calling this a `simple` formatter as it doesn't allow much to be configured other than the indentation size in spaces.
As we've created a Gherkin formatter as part of diffplug#907, we should make it possible to use it natively in Gradle, which requires we add it as a new supported type in `SpotlessExtension`.
What's the status for that? The doc has a gherkin section (https://github.com/diffplug/spotless/tree/main/plugin-maven#gherkin), but when trying to use it, it ignores it with:
|
Looks like you need to bump the version you're using #928 (comment) |
Closed by #1649 |
Something that @goughy000 mentioned recently is that having the ability for Spotless to format our Gherkin files for Cucumber testing would be super useful.
Between the two of us we're looking at getting this implemented for Gradle.
Working thoughts
https://github.com/cucumber/cucumber-jvm/blob/main/gherkin-messages/src/main/java/io/cucumber/core/gherkin/messages/GherkinMessagesFeatureParser.java
https://github.com/JetBrains/intellij-plugins/tree/master/cucumber/src/org/jetbrains/plugins/cucumber
https://github.com/cucumber/cucumber-eclipse/blob/main/cucumber.eclipse.editor/src/main/java/cucumber/eclipse/editor/editors/PrettyFormatter.java
https://github.com/podnov/gherkin/tree/main/utils/src/main/java/com/evanzeimet/gherkin/formatter
The text was updated successfully, but these errors were encountered: