Closed heathsnow closed 9 years ago
Hi @heathsnow -- I'm not familiar with Rubocop. A cursory look makes me wonder how appropriate it is for Chef code (vs typical Ruby).
The rake file already has test-kitchen and foodcritic.
(read this as: I'm happy to take PRs, but educate me on Rubocop pls ;-)
Really, Chef IS just ruby so I think rubocop does fit. This being a public cookbook it is, imho, better if everyone is following the same set of ruby style standards. Foodcritic is lint for chef-specific dsl to help prevent converge errors before they happen.
The first couple paragraphs here outline my meaning more clearly I think (http://blog.crowdint.com/2013/11/29/improve-your-ruby-syntax-with-rubocop.html).
Most of the issues that rubocop reports are along the lines of "line too long", "Prefer single-quoted strings when you don't need string interpolation". It may seem nit-picky but, you know, it's a linting tool :) I think public repos are better served when (minimal) style standards are imposed.
Robocop + chef is lovely. But don't take my word for it, look at Chef DK, which includes rubocop.
I'd love to have rubocop PRs merged into this cookbook.
Justin
On Friday, October 3, 2014, Heath Snow notifications@github.com wrote:
Really, Chef IS just ruby so I think rubocop does fit. This being a public cookbook it is, imho, better if everyone is following the same set of ruby style standards. Foodcritic is lint for chef-specific dsl to help prevent converge errors before they happen.
The first couple paragraphs here outline my meaning more clearly I think ( http://blog.crowdint.com/2013/11/29/improve-your-ruby-syntax-with-rubocop.html ).
Most of the issues that rubocop reports are along the lines of "line too long", "Prefer single-quoted strings when you don't need string interpolation". It may seem nit-picky but, you know, it's a linting tool :) I think public repos are better served when (minimal) style standards are imposed.
— Reply to this email directly or view it on GitHub https://github.com/ThoughtWorksInc/go-cookbook/issues/27#issuecomment-57878207 .
Justin (503) 877-3335
@heathsnow @justinredd OK - let's do it!
Sweet, I should have a PR for you today or tomorrow.
OK - I'll be closing this for now. Thanks :)
I would like to do a rubocop PR but I don't want to waste my time if it isn't going to get merged. I don't know the proper place for this request so I'm just creating an issue :P Let me know in the comments please.
Thx
P.S. - follow up PRs can then start to have tests (tailor, rubocop, foodcritic) and I think rubocop is a low barrier to entry for the tests. Thoughts?