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 a check for a missing trailing comma #894

Open
natemccurdy opened this issue Oct 15, 2019 · 0 comments
Open

Add a check for a missing trailing comma #894

natemccurdy opened this issue Oct 15, 2019 · 0 comments

Comments

@natemccurdy
Copy link

There was a previous issue that requested adding the ability to check for missing trailing commas: #237. That was closed because the Puppet Style Guide, at the time, didn't enforce this style.

A trailing comma is now specifically called out in the style guide: https://puppet.com/docs/puppet/latest/style_guide.html#spacing-indentation-and-whitespace

Must include trailing commas after all resource attributes and parameter definitions.

As puppet-lint is the primary tool used to enforce the source-of-truth for Puppet Style decisions, I think that puppet-lint should check for missing trailing commas out of the box.

A gem for this already exists, but if a user doesn't know about it, they won't get the required style check.
https://github.com/voxpupuli/puppet-lint-trailing_comma-check


Note that this was brought up in the PDK office hours in the Puppet Community slack because out of the box, the PDK does not check for missing trailing commas. While the voxpopuli gem could be added to the default gemset of the PDK, it's probably better to just integrate this check into puppet-lint itself so everyone can benefit without any extra work.

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