build-configs/templates/php/phpcs.xml.twig

41 lines
1.8 KiB
Twig
Raw Normal View History

2023-01-19 19:47:15 +00:00
<?xml version="1.0"?>
<!-- {{ managedText | raw }} -->
2023-01-19 19:47:15 +00:00
<ruleset name="{{ name }} coding standards">
2023-04-23 19:14:04 +00:00
<description>PHPCS configuration file for {{ name }}.</description>
2023-04-23 16:37:27 +00:00
2023-04-23 19:14:04 +00:00
{% for path in php.phpcs.paths|default('[]') %}
<file>{{ path }}</file>
{% endfor %}
2023-04-23 16:37:27 +00:00
2023-04-23 19:14:04 +00:00
<arg value="np"/>
2023-04-23 16:37:27 +00:00
2023-04-23 19:14:04 +00:00
{% for standard in php.phpcs.standards|default(['Drupal', 'DrupalPractice']) %}
{% if not standard is same as "Drupal" %}
<rule ref="{{ standard }}"/>
{% endif %}
{% endfor %}
2023-04-23 16:37:27 +00:00
2023-07-22 09:40:02 +00:00
{% if type is same as "drupal" and "Drupal" in php.phpcs.standards or php.phpcs.standards is empty %}
2023-04-23 19:14:04 +00:00
<rule ref="Drupal">
<exclude name="Drupal.Commenting.ClassComment.Missing"/>
<exclude name="Drupal.Commenting.DataTypeNamespace.DataTypeNamespace"/>
<exclude name="Drupal.Commenting.Deprecated"/>
<exclude name="Drupal.Commenting.DocComment.ContentAfterOpen"/>
<exclude name="Drupal.Commenting.DocComment.MissingShort"/>
<exclude name="Drupal.Commenting.FunctionComment.IncorrectParamVarName"/>
<exclude name="Drupal.Commenting.FunctionComment.IncorrectTypeHint"/>
<exclude name="Drupal.Commenting.FunctionComment.InvalidReturn"/>
<exclude name="Drupal.Commenting.FunctionComment.Missing"/>
<exclude name="Drupal.Commenting.FunctionComment.MissingParamComment"/>
<exclude name="Drupal.Commenting.FunctionComment.MissingReturnComment"/>
<exclude name="Drupal.Commenting.FunctionComment.ParamTypeSpaces"/>
<exclude name="Drupal.Commenting.FunctionComment.TypeHintMissing"/>
<exclude name="Drupal.Commenting.InlineComment.DocBlock"/>
<exclude name="Drupal.Commenting.VariableComment.Missing"/>
<exclude name="Drupal.NamingConventions.ValidFunctionName.ScopeNotCamelCaps"/>
<exclude name="DrupalPractice.Objects.StrictSchemaDisabled.StrictConfigSchema"/>
</rule>
{% endif %}
2023-01-19 19:47:15 +00:00
</ruleset>