-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs-ruleset.xml
21 lines (21 loc) · 1.33 KB
/
phpcs-ruleset.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?xml version="1.0"?>
<ruleset name="PHP Custom Ruleset">
<description>Drupal Coder Ruleset with some exclusions</description>
<rule ref="bin/drupal/coder/coder_sniffer/Drupal">
<!-- CiviCRM expects to have file names with underscores -->
<!-- Example: The Class `CRM_CiviAwards_Upgrader` has a file name of `Upgrader.php` -->
<!-- Hence the following rules are excluded -->
<exclude name="Drupal.NamingConventions.ValidClassName.NoUnderscores"/>
<exclude name="Drupal.NamingConventions.ValidFunctionName.InvalidName"/>
<exclude name="Drupal.Classes.ClassFileName.NoMatch"/>
<!--Drupal expects function names like civiawards_civicrm_pre_process but civi can have-->
<!--civiawards_civicrm_preProcess which is valid for civi.-->
<exclude name="Drupal.NamingConventions.ValidFunctionName.InvalidName"/>
<!-- this was was added in drupal, but in civicrm we ignore this rule -->
<exclude name="Drupal.Classes.UseGlobalClass.RedundantUseStatement"/>
<!-- These files are mainly auto generated and has some rules we want to exclude -->
<exclude-pattern>CRM/CiviAwards/DAO/*</exclude-pattern>
<exclude-pattern>civiawards.civix.php</exclude-pattern>
<exclude-pattern>CRM/CiviAwards/Upgrader/Base.php</exclude-pattern>
</rule>
</ruleset>