Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Test codeclimate #506

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
version: "2"

prepare:
fetch:
- url: "https://raw.githubusercontent.com/digipolisgent/ci_config-files-and-scripts/master/php/drupal8/.phpmd.xml"
path: ".phpmd.xml"
- url: "https://raw.githubusercontent.com/digipolisgent/ci_config-files-and-scripts/master/php/drupal8/.csslintrc"
MPParsley marked this conversation as resolved.
Show resolved Hide resolved
path: ".csslintrc"
- url: "https://raw.githubusercontent.com/digipolisgent/ci_config-files-and-scripts/master/php/drupal8/.eslintrc.json"
MPParsley marked this conversation as resolved.
Show resolved Hide resolved
path: ".eslintrc.json"
- url: "https://raw.githubusercontent.com/digipolisgent/ci_config-files-and-scripts/master/php/drupal8/.eslintignore"
MPParsley marked this conversation as resolved.
Show resolved Hide resolved
path: ".eslintignore"

checks:
argument-count:
enabled: false
complex-logic:
config:
threshold: 4
MPParsley marked this conversation as resolved.
Show resolved Hide resolved
file-lines:
config:
threshold: 250
MPParsley marked this conversation as resolved.
Show resolved Hide resolved
method-complexity:
config:
threshold: 5
MPParsley marked this conversation as resolved.
Show resolved Hide resolved
method-count:
config:
threshold: 20
MPParsley marked this conversation as resolved.
Show resolved Hide resolved
method-lines:
config:
threshold: 50
MPParsley marked this conversation as resolved.
Show resolved Hide resolved
nested-control-flow:
config:
threshold: 4
MPParsley marked this conversation as resolved.
Show resolved Hide resolved
return-statements:
config:
threshold: 4
MPParsley marked this conversation as resolved.
Show resolved Hide resolved
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:
phpcodesniffer:
enabled: true
config:
standard: "Drupal"
MPParsley marked this conversation as resolved.
Show resolved Hide resolved
file_extensions: "php,inc,module,install"
phpmd:
enabled: true
config:
file_extensions:
- php
- inc
- module
- install
rulesets: ".phpmd.xml"
csslint:
enabled: true
eslint:
enabled: true
duplication:
enabled: true
config:
languages:
php:
javascript:
fixme:
enabled: true
markdownlint:
enabled: true
issue_override:
severity: minor

exclude_patterns:
- "config/"
- "translations/"
- "**/vendor/**/*"
- "**/.idea/**/*"
- "**/tests/**/*"
- "**/*.settings.php"
- "RoboFile.php"
3 changes: 1 addition & 2 deletions src/GroupTypeManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
use Drupal\Core\Routing\RouteBuilderInterface;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\og\Event\GroupCreationEvent;
MPParsley marked this conversation as resolved.
Show resolved Hide resolved
use Drupal\og\Event\GroupCreationEventInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Drupal\node\Entity\Node;
MPParsley marked this conversation as resolved.
Show resolved Hide resolved

/**
* A manager to keep track of which entity type/bundles are OG group enabled.
Expand Down