Невозможно изменить ExcessiveMethodLength на phpmd через codeclimate

Такие предупреждения продолжают появляться в Code Climate для моего проекта:

  • Файл YummySearchComponent.php содержит 360 строк кода (превышает 250
    позволил). Рассмотрим рефакторинг.
  • Метод getYummyHelperData имеет 43 строки кода (разрешено более 25). Рассмотрим рефакторинг.

Я попытался изменить конфигурации, но ничего не работает. Проект Github находится здесь: https://github.com/cnizzardini/cakephp-yummy

Что странного в том, что такие, как ShortVariable, работали, поскольку по умолчанию они равны 3, но я смог изменить их на 1. Что я делаю не так?

.codeclimate.yml

---
engines:
duplication:
enabled: true
config:
languages:
- php
eslint:
enabled: true
fixme:
enabled: true
phpmd:
enabled: true
config:
file_extensions: "php"rulesets: "unusedcode,codesize,naming,phpmd.xml"ratings:
paths:
- "**.inc"- "**.ctp"- "**.module"- "**.php"exclude_paths:
- config/
- tests/
- webroot/

phpmd.xml

<?xml version="1.0"?>
<ruleset name="PHPMD rule set for my project" xmlns="http://pmd.sf.net/ruleset/1.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>Custom rules for checking my project</description>

<rule ref="rulesets/cleancode.xml">
<exclude name="ElseExpression"/>
</rule>

<rule ref="rulesets/codesize.xml">
<exclude name="TooManyPublicMethods"/>
</rule>

<rule ref="rulesets/codesize.xml/ExcessiveMethodLength">
<properties>
<property name="ignore-whitespace" value="true" />
<property name="minimum" value="100" />
</properties>
</rule>

<rule ref="rulesets/codesize.xml/ExcessiveClassLength">
<properties>
<property name="minimum" value="700" />
</properties>
</rule>

<rule ref="rulesets/namingrules.xml/ShortVariable">
<properties>
<property name="minimum" value="1" />
</properties>
</rule>
</ruleset>

1

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector