openSUSE/open-build-service

View on GitHub
.codeclimate.yml

Summary

Maintainability
Test Coverage
version: "2"
# Align the configuration of CodeClimate checks with those of RuboCop cops
# Documentation: https://docs.codeclimate.com/docs/maintainability#section-checks
checks:
  # Same as cop Metrics/ParameterLists from RuboCop
  # https://docs.rubocop.org/rubocop/cops_metrics.html#metricsparameterlists
  argument-count:
    config:
      threshold: 5
  # Same as cops Metrics/ClassLength and Metrics/ModuleLength from RuboCop
  # https://docs.rubocop.org/rubocop/cops_metrics.html#metricsmodulelength
  # https://docs.rubocop.org/rubocop/cops_metrics.html#metricsclasslength
  file-lines:
    enabled: false # We prefer to disable this check as it calculates differently from RuboCop cops
  # Same as cop Metrics/PerceivedComplexity from RuboCop
  # https://docs.rubocop.org/rubocop/cops_metrics.html#metricsperceivedcomplexity
  method-complexity:
    config:
      threshold: 8
  # Same as cop Metrics/MethodLength from RuboCop
  # https://docs.rubocop.org/rubocop/cops_metrics.html#metricsmethodlength
  method-length:
    config:
      threshold: 10
  # Same as cop Metrics/BlockNesting from RuboCop
  # https://docs.rubocop.org/rubocop/cops_metrics.html#metricsblocknesting
  nested-control-flow:
    config:
      threshold: 3
  # Same as cop Metrics/CyclomaticComplexity from RuboCop
  # https://docs.rubocop.org/rubocop/cops_metrics.html#metricscyclomaticcomplexity
  return-statements:
    config:
      threshold: 7
exclude_patterns:
  - "*.yml"
  - ".circleci/"
  - ".github/"
  - ".obs/"
  - "dist/"
  - "docs/"
  - "contrib/"
  - "src/backend/"
  - "src/api/test/"
  - "src/api/spec/"
  - "src/api/db/"
  - "src/api/vendor/"
  - "src/api/app/assets/"
  - "src/api/app/components/*.haml"
  - "src/api/app/views/"
  - "src/api/bin/"
  - "src/api/lib/tasks/"
  - "src/api/vendor/assets/"
  - "src/api/vendor/cache/"
  - "src/api/vendor/cache.next/"
  - "src/api/public/"