Skip to content

Commit

Permalink
Add Code Climate Config (thoughtbot#2275)
Browse files Browse the repository at this point in the history
Adds a Code Climate configuration enabling Fixme, Rubocop, and
Duplication.

The Code Climate RuboCop engine uses a newer version of RuboCop than the
current Hound config, so .hound.yml was modified to work for both. The
only notable change was removing PreferredHashMethods because there is
no syntax for that cop that works with bout Hound and Code Climate.
  • Loading branch information
pbrisbin authored and tute committed Aug 23, 2016
1 parent 2edf045 commit fa58ec3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
17 changes: 17 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
engines:
duplication:
enabled: true
config:
languages:
- ruby
fixme:
enabled: true
rubocop:
enabled: true
ratings:
paths:
- "**.rb"
exclude_paths:
- features/
- spec/
21 changes: 5 additions & 16 deletions .hound.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ AllCops:
- "db/schema.rb"
- 'vendor/**/*'
- 'gemfiles/vendor/**/*'
RunRailsCops: false
Rails:
Enabled: false
DisplayCopNames: false
StyleGuideCopsOnly: false
Style/AccessModifierIndentation:
Expand Down Expand Up @@ -434,7 +435,7 @@ Style/TrailingBlankLines:
SupportedStyles:
- final_newline
- final_blank_line
Style/TrailingComma:
Style/TrailingCommaInLiteral:
Description: Checks for trailing comma in parameter lists and literals.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
Enabled: false
Expand Down Expand Up @@ -560,11 +561,6 @@ Rails/ActionFilter:
- filter
Include:
- app/controllers/**/*.rb
Rails/DefaultScope:
Description: Checks if the argument passed to default_scope is a block.
Enabled: true
Include:
- app/models/**/*.rb
Rails/HasAndBelongsToMany:
Description: Prefer has_many :through to has_and_belongs_to_many.
Enabled: true
Expand Down Expand Up @@ -685,10 +681,6 @@ Style/DefWithParentheses:
Description: Use def with parentheses when there are arguments.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
Enabled: true
Style/DeprecatedHashMethods:
Description: Checks for use of deprecated Hash methods.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
Enabled: false
Style/Documentation:
Description: Document classes and non-namespace modules.
Enabled: false
Expand Down Expand Up @@ -840,7 +832,7 @@ Style/SelfAssignment:
used.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
Enabled: false
Style/SingleSpaceBeforeFirstArg:
Style/SpaceBeforeFirstArg:
Description: Checks that exactly one space is used between a method name and the
first argument for method calls without parentheses.
Enabled: true
Expand All @@ -852,7 +844,7 @@ Style/SpaceAfterComma:
Description: Use spaces after commas.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
Enabled: true
Style/SpaceAfterControlKeyword:
Style/SpaceAroundKeyword:
Description: Use spaces after if/elsif/unless/while/until/case/when.
Enabled: true
Style/SpaceAfterMethodName:
Expand Down Expand Up @@ -881,9 +873,6 @@ Style/SpaceAroundOperators:
Description: Use spaces around operators.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
Enabled: true
Style/SpaceBeforeModifierKeyword:
Description: Put a space before the modifier keyword.
Enabled: true
Style/SpaceInsideBrackets:
Description: No spaces after [ or before ].
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
Expand Down

0 comments on commit fa58ec3

Please sign in to comment.