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

Allow formatting tags on a single line (different implementation) #29

Merged
merged 6 commits into from Jan 25, 2020

Conversation

ducminh-phan
Copy link
Owner

No description provided.

Add a --single-line-tags option, which causes consecutive tags to be
output on a single line. Also add a --multi-line-tags option to
explicitly specify the current default behaviour of outputting one tag
per line.

When the --single-line-tags option is specified, tags separated by
comments are merged into one line, as discussed in issue #22.
Copy link
Contributor

@rayjolt rayjolt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this approach more than mine; specifying the location of the tag group and leaving it to sorted() to find out where the tag group line should go is cleaner than my approach of grouping tags and comments together. I have one suggestion about filtering Tags from __nodes in single-line-tag mode which I think will make the code a little clearer; I've left the comment inline.

reformat_gherkin/formatter.py Outdated Show resolved Hide resolved
Copy link
Contributor

@rayjolt rayjolt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, looks good. Thank you for implementing this!

@ducminh-phan ducminh-phan merged commit 7b5590c into develop Jan 25, 2020
@ducminh-phan ducminh-phan deleted the feature/single-line-tags branch January 25, 2020 03:40
@ducminh-phan ducminh-phan added this to the v1.1.0 milestone Jan 25, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants