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

Add support for a "line feed at end of file" in code style rules #190

Open
Otiel opened this issue Jan 20, 2023 · 3 comments
Open

Add support for a "line feed at end of file" in code style rules #190

Otiel opened this issue Jan 20, 2023 · 3 comments

Comments

@Otiel
Copy link

Otiel commented Jan 20, 2023

I would like to enforce that all my *.feature files end with an empty line (to ease diffs, cat display...).

Is it possible to add a "☑️ Line feed at end of file" rule in the GherkinDotnet code style, so that an "Reformat" automatically adds this line?

@Socolin
Copy link
Collaborator

Socolin commented Nov 26, 2023

It should already work if you have this checked

image

You also need to modify the file for it to have an effect.

@Otiel
Copy link
Author

Otiel commented Dec 20, 2023

This ensure that files of all types ends with a line break.

My goal is to make sure *.feature files ends with a line break, not all files. I was thinking of something along the line of what is available in C# code style:

image

Plus, as you said, the file needs to be modified, which it isn't in case you are calling Reformat and cleanup on a set of files.

And lastly and more importantly, in case you run Reformat and cleanup on a .feature file without opening it, it will remove the existing line break at end of file.

@Otiel
Copy link
Author

Otiel commented Jan 23, 2024

@Socolin Would you consider reopening this issue considering my previous comment?

@Socolin Socolin reopened this Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants