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

[wip] gherkin-pretty: create CLI to format Gherkin AST #400

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@nfisher

nfisher commented May 31, 2018

Summary

Implement standardised output of Gherkin AST into feature files.

Details

  • Add stringer to AST structs.
  • Implement CLI main to consume a stream of Gherkin AST and write to disk as required.

Motivation and Context

Provide standardised and consistent formatting of feature files.

How Has This Been Tested?

Creating unit tests with the scenarios outlined in #384.

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist:

  • I've added tests for my code.
  • My change requires a change to the documentation.
  • TBD - I have updated the documentation accordingly.

nfisher added some commits May 26, 2018

Add stringer methods for Gherkin AST elements
Get some feedback from @aslakhellesoy before I proceed too far with this
approach.

refs #384
Add stringer methods for Gherkin AST elements
- Add Description type with stringer to Feature and ScenarioDefinition.
- Add naive stringer to TableRow.

refs #384
@aslakhellesoy

This comment has been minimized.

Contributor

aslakhellesoy commented Jun 18, 2018

I'm working on #378, which will introduce protobuf-generated structs for the AST. I suggest holding off until that's merged to master.

@aslakhellesoy

This comment has been minimized.

Contributor

aslakhellesoy commented Jul 5, 2018

Now that I've written down a draft release plan it's become apparent that this isn't the way to go.

The pretty formatter should not be part of the Gherkin library - it should be a standalone formatter.

It should be able to render Gherkin both with and without results.

Sorry for not having communicated this more clearly from the start - it didn't become clear to me until I wrote it down. Besides, we've move to protocol buffers now.

@nfisher

This comment has been minimized.

nfisher commented Jul 5, 2018

No problem! I viewed this as the "fast approach" and thought it might not be aligned with your desired implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment