AllCops: Exclude: - vendor/**/* - Guardfile AlignParameters: Enabled: false Documentation: Enabled: false Encoding: Enabled: false Style/FileName: Enabled: false Style/Alias: Enabled: false Style/SpaceBeforeFirstArg: Enabled: false LineLength: Enabled: false MethodLength: Enabled: false Metrics/AbcSize: Enabled: false Metrics/ModuleLength: Enabled: false Metrics/ClassLength: Enabled: false Metrics/CyclomaticComplexity: Enabled: false PerceivedComplexity: Enabled: false Style/ClassAndModuleChildren: Enabled: false # https://github.com/chef/cookstyle/pull/5 Style/TrailingCommaInLiteral: Enabled: true EnforcedStyleForMultiline: comma # Underscores in numbers are unnecessary, especially for port numbers where they are unexpected Style/NumericLiterals: Enabled: false # regex rules often trigger no matter what you do with inspec/serverspec matchers Style/RegexpLiteral: Exclude: - 'test/**/*' # some names are not ascii and this prevents copyright comments Style/AsciiComments: Enabled: false # avoid case statements where the 2nd 'when' would never fire Lint/DuplicateCaseCondition: Enabled: true # empty expressions serve no purpose Lint/EmptyExpression: Enabled: true # when in a case statement should always do something Lint/EmptyWhen: Enabled: true # %w('something') is almost always a typo Lint/PercentStringArray: Enabled: true # %w(:something) should be a string not a symbol Lint/PercentSymbolArray: Enabled: true # if you rescue Exception, then rescue say StandardError you're gonna have a bad time Lint/ShadowedException: Enabled: true # We're on modern ruby so let's assume Integer everywhere Lint/UnifiedInteger: Enabled: true # consistent hash key/value checks Style/PreferredHashMethods: Enabled: true # when iterating a fixed number of times this is much easier to read Style/EachForSimpleLoop: Enabled: true # a case statement without a condition is just an if statement Style/EmptyCaseCondition: Enabled: true # helpers are easiest to read Style/NumericPredicate: Enabled: true # this is bad %w(something another_thing one_more) Style/SpaceInsideArrayPercentLiteral: Enabled: true # disable this until there's an autocorrect Bundler/OrderedGems: Enabled: false # There's no reason to have a gem listed twice Bundler/DuplicatedGem: Enabled: true