Skip to content

Commit

Permalink
Adds codeclimate configuration files
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlieIGG committed Nov 10, 2019
1 parent fdb9e96 commit 34e50b0
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 0 deletions.
87 changes: 87 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
version: "2" # required to adjust maintainability checks

prepare:
# Fetch the configuration from our guides site:
fetch:
# Fetch the Rubocop Ruby + Rails configuration files:
- url: "https://raw.githubusercontent.com/IcaliaLabs/guides/master/best_practices/code-analysis/rubocop/0.60/core.yml"
path: ".rubocop.yml"
- url: "https://raw.githubusercontent.com/IcaliaLabs/guides/master/best_practices/code-analysis/rubocop/0.60/rails.yml"
path: ".rubocop-rails.yml"

# Fetch the reek rules:
- url: "https://raw.githubusercontent.com/IcaliaLabs/guides/master/best_practices/code-analysis/reek-rails.yml"
path: ".reek.yml"

# Fetch the SCSS Lint Rules:
- url: "https://raw.githubusercontent.com/IcaliaLabs/guides/master/best_practices/code-analysis/.scss-lint.yml"
path: ".scss-lint.yml"

checks:
argument-count:
config:
threshold: 4
complex-logic:
config:
threshold: 4
file-lines:
config:
threshold: 250
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:
rubocop:
enabled: true
channel: rubocop-0-60
config:
file: ".rubocop-rails.yml"
eslint:
enabled: false
csslint:
enabled: true
scss-lint:
enabled: true
brakeman:
enabled: true
bundler-audit:
enabled: true
fixme:
enabled: true
reek:
enabled: true
shellcheck:
enabled: true

exclude_patterns:
- ".rubocop*.yml"
- "spec/"
- "node_modules/"
- "!spec/support/helpers"
- "config/"
- "db/"
- "spec/"
- "vendor/"
- "coverage/"
- "bin/"
- ".idea/"
- "Guardfile"
8 changes: 8 additions & 0 deletions jarvis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: testapp

features:
- github



6 changes: 6 additions & 0 deletions lib/tasks/auto_generate_diagram.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# NOTE: only doing this in development as some production environments (Heroku)
# NOTE: are sensitive to local FS writes, and besides -- it's just not proper
# NOTE: to have a dev-mode tool do its thing in production.
if Rails.env.development?
RailsERD.load_tasks
end

0 comments on commit 34e50b0

Please sign in to comment.