-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
[java] Improve comments prettyPrinting #20
Conversation
This is contextual to the integration of this library into Spotless diffplug/spotless#1649 |
Just a quick note @blacelle that I'm working on a related PR for |
Thanks @xeger . This PR is ready since a month, but it seems there is no maintainer to review it. |
@mpkorstanje As you reviewed #16, please have a look to this PR. Thanks |
@Test | ||
void commentsBeforeAndAfterKeywords(){ | ||
GherkinDocument gherkinDocument = parse("# before Feature\n" + | ||
"Feature: Comments everywhere\n" + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it would be useful to harmonize our test cases between languages. How this might look:
- new directory
testdata/pretty/before
andtestdata/pretty/after
- @blacelle move our examples into
before/foo.feature
andafter/foo.feature
- we read these files from disk in our JS/Java test code, and both suites execute all examples
The benefit is, we ensure that both languages have identical treatment of comments when prettying. I am not sure how important this behavior is.
If interested, I can get this started on #16.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The benefit is, we ensure that both languages have identical treatment of comments when prettying. I am not sure how important this behavior is.
This would definitely be a good thing.
I would be happy to follow this structure, preferable in a separate PR. But I do not get how to contribute to this repository as this PR seems stuck :S.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. The JS implementation has gotten out of sync with these improvements, but we can achieve parity once we have a shared body of testdata
files to help us correlate between the languages' behavior.
@xeger @aslakhellesoy How can I move forward with this PR? |
Hi @blacelle, Thanks for your making your first contribution to Cucumber, and welcome to the Cucumber committers team! You can now push directly to this repo and all other repos under the cucumber organization! 🍾 In return for this generous offer we hope you will:
On behalf of the Cucumber core team, |
Thanks a lot @xeger |
Thank you for your contribution. I'll work on releasing a new JAR over the weekend. |
This follows the work from cucumber/common#2024 (Thanks @jamietanna ).
It proposes improvments for comments rendering. This is not perfect, but looks better than current behavior (especially over comments after a
@Tag
,Scenario
, etc).