You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do not think the removal of trailing new lines or spaces should be forced. Can we convert this to an option at least?
I am agree with the removal of trailing spaces, but some other user may not. For newlines there is a list of very good reasons to keep the last one here
The text was updated successfully, but these errors were encountered:
The trailing newline linting error in YAML files threw me for a loop when I started using molecule as well. My objection is the same, namely that it feels distinctly anti-POSIX, but having a style pragma enforced by tooling is arguably better than bickering about preferences.
To put myself in the maintainers' shoes, adding an option to permit trailing newlines, but continue linting on all other attributes, would open the door for a nightmare of configurability. You can, after all, excuse directories from the linting, which may be the best course of action for you if you don't want to trim your YAML files. For spec and other files, doesn't seem like we have much recourse at this time.
Molecule's validator is not checking for trailing newlines (that the last line matches /\n$/), it is checking for trailing blank lines, that is that the last line of the file should not be empty (matches /^\n$/). This is an important distinction.
I do not think the removal of trailing new lines or spaces should be forced. Can we convert this to an option at least?
I am agree with the removal of trailing spaces, but some other user may not. For newlines there is a list of very good reasons to keep the last one here
The text was updated successfully, but these errors were encountered: