forked from civicrm/org.civicrm.civicase
-
Notifications
You must be signed in to change notification settings - Fork 16
/
phpcs-ruleset.xml
32 lines (30 loc) · 1.9 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
22
23
24
25
26
27
28
29
30
31
32
<?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_Civicase_Upgrader` has a file name of `Upgrader.php` -->
<!-- Hence the following rules are excluded -->
<exclude name="Drupal.NamingConventions.ValidClassName.NoUnderscores"/>
<exclude name="Drupal.Classes.ClassFileName.NoMatch"/>
<!--Drupal expects function names like civicase_civicrm_pre_process but civi can have-->
<!--civicase_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>tests/phpunit/bootstrap.php</exclude-pattern>
<exclude-pattern>mixin/*</exclude-pattern>
<!-- This file is from an external extension and we dont want to modify it -->
<exclude-pattern>CRM/Civicase/Form/Report/ExtendedReport.php</exclude-pattern>
<exclude-pattern>civicase.civix.php</exclude-pattern>
<exclude-pattern>CRM/Civicase/DAO/*</exclude-pattern>
<exclude-pattern>CRM/Civicase/Upgrader/Base.php</exclude-pattern>
<exclude-pattern>CRM/Civicase/Form/Report/Case/CaseWithActivityPivot.php</exclude-pattern>
<exclude-pattern>tests/phpunit/api/v3/Case/BaseTestCase.php</exclude-pattern>
<exclude-pattern>tests/phpunit/BaseHeadlessTest.phpp</exclude-pattern>
<!-- Civicrm APi tests classes do have names beginning with lower case -->
<!-- Hence the following rule is excluded -->
<exclude name="Drupal.NamingConventions.ValidClassName.StartWithCaptial"/>
</rule>
</ruleset>