Cookstyle 1.0 released


#1

Back in April we released cookstyle 0.0.1 as an experiment to bundle the .rubocop.yml file we had been using in community cookbooks with a pre-determined Rubocop release. Since then it’s turned out quite well and today I’m excited to announce that we’ve released cookstyle 1.0. Why 1.0? First there are breaking changes in this release as we’ve upgraded from Rubocop 0.39 -> 0.46 and enabled new cops. Second we think Cookstyle is ready for primetime and we want to make sure any users that want to pin versions according to SemVer can.

Here’s a summary of the new cops that were introduced with this release:

Newly disabled Cops:
Metrics/CyclomaticComplexity
Style/NumericLiterals
Style/RegexpLiteral in /tests/ directory
Style/AsciiComments

Newly Enabled Cops:
Bundler/DuplicatedGem
Style/SpaceInsideArrayPercentLiteral
Style/NumericPredicate
Style/EmptyCaseCondition
Style/EachForSimpleLoop
Style/PreferredHashMethods
Lint/UnifiedInteger
Lint/ShadowedException
Lint/PercentSymbolArray
Lint/PercentStringArray
Lint/EmptyWhen
Lint/EmptyExpression
Lint/DuplicateCaseCondition
Style/TrailingCommaInLiteral

For the thoughts behind these rules check out the config file directly at https://github.com/chef/cookstyle/blob/master/config/cookstyle.yml

-Tim