Skip to content

Commit fa58ec3

Browse files
pbrisbintute
authored andcommitted
Add Code Climate Config (thoughtbot#2275)
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.
1 parent 2edf045 commit fa58ec3

File tree

2 files changed

+22
-16
lines changed

2 files changed

+22
-16
lines changed

.codeclimate.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
engines:
3+
duplication:
4+
enabled: true
5+
config:
6+
languages:
7+
- ruby
8+
fixme:
9+
enabled: true
10+
rubocop:
11+
enabled: true
12+
ratings:
13+
paths:
14+
- "**.rb"
15+
exclude_paths:
16+
- features/
17+
- spec/

.hound.yml

+5-16
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ AllCops:
2020
- "db/schema.rb"
2121
- 'vendor/**/*'
2222
- 'gemfiles/vendor/**/*'
23-
RunRailsCops: false
23+
Rails:
24+
Enabled: false
2425
DisplayCopNames: false
2526
StyleGuideCopsOnly: false
2627
Style/AccessModifierIndentation:
@@ -434,7 +435,7 @@ Style/TrailingBlankLines:
434435
SupportedStyles:
435436
- final_newline
436437
- final_blank_line
437-
Style/TrailingComma:
438+
Style/TrailingCommaInLiteral:
438439
Description: Checks for trailing comma in parameter lists and literals.
439440
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
440441
Enabled: false
@@ -560,11 +561,6 @@ Rails/ActionFilter:
560561
- filter
561562
Include:
562563
- app/controllers/**/*.rb
563-
Rails/DefaultScope:
564-
Description: Checks if the argument passed to default_scope is a block.
565-
Enabled: true
566-
Include:
567-
- app/models/**/*.rb
568564
Rails/HasAndBelongsToMany:
569565
Description: Prefer has_many :through to has_and_belongs_to_many.
570566
Enabled: true
@@ -685,10 +681,6 @@ Style/DefWithParentheses:
685681
Description: Use def with parentheses when there are arguments.
686682
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
687683
Enabled: true
688-
Style/DeprecatedHashMethods:
689-
Description: Checks for use of deprecated Hash methods.
690-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
691-
Enabled: false
692684
Style/Documentation:
693685
Description: Document classes and non-namespace modules.
694686
Enabled: false
@@ -840,7 +832,7 @@ Style/SelfAssignment:
840832
used.
841833
StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
842834
Enabled: false
843-
Style/SingleSpaceBeforeFirstArg:
835+
Style/SpaceBeforeFirstArg:
844836
Description: Checks that exactly one space is used between a method name and the
845837
first argument for method calls without parentheses.
846838
Enabled: true
@@ -852,7 +844,7 @@ Style/SpaceAfterComma:
852844
Description: Use spaces after commas.
853845
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
854846
Enabled: true
855-
Style/SpaceAfterControlKeyword:
847+
Style/SpaceAroundKeyword:
856848
Description: Use spaces after if/elsif/unless/while/until/case/when.
857849
Enabled: true
858850
Style/SpaceAfterMethodName:
@@ -881,9 +873,6 @@ Style/SpaceAroundOperators:
881873
Description: Use spaces around operators.
882874
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
883875
Enabled: true
884-
Style/SpaceBeforeModifierKeyword:
885-
Description: Put a space before the modifier keyword.
886-
Enabled: true
887876
Style/SpaceInsideBrackets:
888877
Description: No spaces after [ or before ].
889878
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces

0 commit comments

Comments
 (0)