Skip to content

Commit

Permalink
Codeclimate configuration (#405)
Browse files Browse the repository at this point in the history
* Allow local Gemfile to be used

* Tweak codeclimate configuration
  • Loading branch information
mhenrixon authored Jun 3, 2019
1 parent 953b2f2 commit 29c6cb4
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 3 deletions.
36 changes: 34 additions & 2 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
---
version: '2'
version: "2" # required to adjust maintainability checks
checks:
argument-count:
config:
threshold: 5
complex-logic:
config:
threshold: 4
file-lines:
config:
threshold: 300
method-complexity:
config:
threshold: 5
method-count:
config:
threshold: 20
method-lines:
config:
threshold: 25
nested-control-flow:
config:
threshold: 4
return-statements:
config:
threshold: 4
similar-code:
config:
threshold: # language-specific defaults. an override will affect all languages.
identical-code:
config:
threshold: # language-specific defaults. an override will affect all languages.

plugins:
duplication:
enabled: true
Expand All @@ -18,7 +50,7 @@ plugins:
file: .reek.yml
rubocop:
enabled: true
channel: rubocop-0-70
channel: rubocop-0-71
config:
file: .rubocop.yml

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ my_app/spec/examples.txt
tmp/

/OLD_README.md

/Gemfile.local
6 changes: 5 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
source "https://rubygems.org"
gemspec

gem "appraisal", "~> 2.2.0"
LOCAL_GEMS = "Gemfile.local"

gem "appraisal", ">= 2.2"
gem "rspec-eventually", require: false
gem "rspec-its", require: false
gem "sidekiq", git: "https://github.com/mperham/sidekiq.git"
Expand Down Expand Up @@ -31,3 +33,5 @@ platforms :mri do
gem "toxiproxy"
gem "travis"
end

eval(File.read(LOCAL_GEMS)) if File.exist?(LOCAL_GEMS) # rubocop:disable Security/Eval

0 comments on commit 29c6cb4

Please sign in to comment.