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

39 lines
1.7 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">
<description>PHPCS configuration file for {{ name }}.</description>
2023-04-23 16:37:27 +00:00
{% for path in php.phpcs.paths|default('[]') %}
<file>{{ path }}</file>
{% endfor %}
2023-01-19 19:47:15 +00:00
<arg value="np"/>
2023-04-23 16:37:27 +00:00
2023-04-23 16:16:32 +00:00
{% for standard in php.phpcs.standards|default(['Drupal', 'DrupalPractice']) %}
<rule ref="{{ standard }}"/>
2023-04-23 16:20:21 +00:00
{% endfor %}
2023-04-23 16:37:27 +00:00
{% if type is same as "drupal-project" and "Drupal" in php.phpcs.standards %}
<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>