SpecFlow.Rider icon indicating copy to clipboard operation
SpecFlow.Rider copied to clipboard

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

Open Otiel opened this issue 2 years ago • 3 comments

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?

Otiel avatar Jan 20 '23 16:01 Otiel

It should already work if you have this checked

image

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

Socolin avatar Nov 26 '23 22:11 Socolin

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 avatar Dec 20 '23 21:12 Otiel

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

Otiel avatar Jan 23 '24 10:01 Otiel