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

feat: new rule tag-line; fixes #93 #727

Merged
merged 6 commits into from
May 15, 2021
Merged

feat: new rule tag-line; fixes #93 #727

merged 6 commits into from
May 15, 2021

Conversation

brettz9
Copy link
Collaborator

@brettz9 brettz9 commented May 11, 2021

Includes a always vs. never option as well as two special options for always (count and noEndLine). Fixes #93.

@brettz9 brettz9 requested a review from golopot May 11, 2021 23:03
@brettz9 brettz9 force-pushed the tag-lines branch 4 times, most recently from 46e0112 to 630421d Compare May 12, 2021 03:06
@golopot
Copy link
Collaborator

golopot commented May 13, 2021

What does noEndLine: true do? I thought it bans empty lines after last tag but there are no tests for it?

@brettz9
Copy link
Collaborator Author

brettz9 commented May 13, 2021

There are tests for it but I can look to add some passing tests instead of only failing ones. You might want to hold off a little, as I think I have some fixing to do as far as line numbers (and am seeking to add tests for that).

@golopot
Copy link
Collaborator

golopot commented May 13, 2021

Do you think it would be better if the always/never options is dropped, and that fee "count: 0" means no empty lines are allowed?

@brettz9
Copy link
Collaborator Author

brettz9 commented May 13, 2021

Do you think it would be better if the always/never options is dropped, and that fee "count: 0" means no empty lines are allowed?

The one reason I thought it may be ok, as is, is because we can have a sensible defaults for "always" which avoids the need for specifying a number in that case as with "never". But I'm ok with switching it if you think it should be changed.

I've updated, btw, so the line number tests/fixes and added test should otherwise be ready for review.


##### `noEndLine` (defaults to `false`)

Use with "always" to indicate tag lines should not be added at the end.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand this option. What is a tag line?

Copy link
Collaborator Author

@brettz9 brettz9 May 13, 2021

Choose a reason for hiding this comment

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

Clarified to state:

Use with "always" to indicate the normal lines to be added after tags should
not be added after the final tag.

Also changed noEndLine to noEndLines as can be more than one between tags normally.

@brettz9 brettz9 merged commit 1b305f0 into gajus:master May 15, 2021
@brettz9 brettz9 deleted the tag-lines branch May 15, 2021 16:01
@gajus
Copy link
Owner

gajus commented May 15, 2021

🎉 This PR is included in version 34.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label May 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add rule to (dis)allow empty lines between tags
3 participants