Add Code Climate integration.

This commit is contained in:
evazion
2020-06-11 03:29:42 -05:00
parent be4646aa6f
commit 889c4ce4d9
3 changed files with 54 additions and 0 deletions

37
.codeclimate.yml Normal file
View File

@@ -0,0 +1,37 @@
version: 2
checks:
argument-count:
config:
threshold: 4
file-lines:
config:
threshold: 500
method-count:
config:
threshold: 40
method-lines:
config:
threshold: 100
plugins:
eslint:
enabled: true
channel: "eslint-6"
config:
extensions:
- .js
- .js.erb
rubocop:
enabled: true
channel: "rubocop-0-83"
stylelint:
enabled: true
exclude_patterns:
- "app/javascript/vendor"
- "config/"
- "db/"
- "lib/"
- "log/"
- "script/"
- "tmp/"
- "**/node_modules/"
- "**/test/"

View File

@@ -37,6 +37,21 @@ Layout/SpaceInsideBlockBraces:
Layout/SpaceInsideHashLiteralBraces:
Enabled: false
Metrics/BlockNesting:
Max: 4
Metrics/ClassLength:
Max: 500
Metrics/MethodLength:
Max: 100
Metrics/ModuleLength:
Max: 500
Metrics/ParameterLists:
Max: 4
Lint/InheritException:
EnforcedStyle: standard_error

View File

@@ -1,3 +1,5 @@
[![Maintainability](https://api.codeclimate.com/v1/badges/a51f46fb460a35104d82/maintainability)](https://codeclimate.com/github/danbooru/danbooru/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/a51f46fb460a35104d82/test_coverage)](https://codeclimate.com/github/danbooru/danbooru/test_coverage)
## Installation
It is recommended that you install Danbooru on a Debian-based system