forked from ec-europa/platform-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs-ruleset.xml
103 lines (88 loc) · 6.74 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?xml version="1.0"?>
<!-- PHP_CodeSniffer standard for NextEuropa. -->
<!-- See http://pear.php.net/manual/en/package.php.php-codesniffer.annotated-ruleset.php -->
<ruleset name="NextEuropa">
<description>Drupal coding standard for NextEuropa</description>
<!-- Exclude unsupported file types. -->
<exclude-pattern>*.gif</exclude-pattern>
<exclude-pattern>*.less</exclude-pattern>
<exclude-pattern>*.png</exclude-pattern>
<!-- Minified files don't have to comply with coding standards. -->
<exclude-pattern>*.min.css</exclude-pattern>
<exclude-pattern>*.min.js</exclude-pattern>
<exclude-pattern>profiles/common/modules/features/multisite_readspeaker/js/ReadSpeaker/</exclude-pattern>
<exclude-pattern>profiles/common/themes/ec_resp/css/ec_resp.css</exclude-pattern>
<exclude-pattern>profiles/common/themes/ec_resp/css/eu_resp.css</exclude-pattern>
<!-- Legacy modules which are not compliant with coding standards. These are
being fixed in NEXTEUROPA-3575. Whenever a module is fixed, please
remove it from this list so it can be tested. -->
<exclude-pattern>profiles/multisite_drupal_communities/inject_data.php</exclude-pattern>
<exclude-pattern>profiles/multisite_drupal_communities/themes/bootstrap</exclude-pattern>
<exclude-pattern>profiles/multisite_drupal_standard/themes/bootstrap</exclude-pattern>
<exclude-pattern>profiles/multisite_drupal_standard/themes/europa</exclude-pattern>
<rule ref="./vendor/drupal/coder/coder_sniffer/Drupal" />
<!-- Exclude third party code. -->
<exclude-pattern>profiles/common/libraries/</exclude-pattern>
<exclude-pattern>profiles/common/modules/custom/ecas/libraries/</exclude-pattern>
<exclude-pattern>profiles/common/themes/ec_resp/bootstrap/</exclude-pattern>
<exclude-pattern>profiles/common/themes/ec_resp/scripts/html5shiv.min.js</exclude-pattern>
<exclude-pattern>profiles/common/themes/ec_resp/scripts/jquery.mousewheel.min.js</exclude-pattern>
<exclude-pattern>profiles/common/themes/ec_resp/scripts/respond.min.js</exclude-pattern>
<exclude-pattern>profiles/multisite_drupal_communities/libraries/</exclude-pattern>
<exclude-pattern>profiles/multisite_drupal_communities/modules/contrib/</exclude-pattern>
<exclude-pattern>profiles/multisite_drupal_standard/libraries/</exclude-pattern>
<exclude-pattern>profiles/multisite_drupal_standard/modules/contrib/</exclude-pattern>
<exclude-pattern>profiles/common/themes/ec_resp/scripts/ec.js</exclude-pattern>
<exclude-pattern>profiles/common/modules/features/multisite_wysiwyg/ckeditor/skins</exclude-pattern>
<exclude-pattern>profiles/common/themes/ec_resp_20/</exclude-pattern>
<exclude-pattern>profiles/common/modules/custom/tmgmt_poetry/tests/</exclude-pattern>
<exclude-pattern>build/vendor/</exclude-pattern>
<!-- Views handlers/plugins not strictly follow Drupal class name conventions. -->
<rule ref="Drupal.NamingConventions.ValidClassName">
<exclude-pattern>profiles/common/modules/custom/ecas/ecas_extra/includes/views/handlers/*.inc</exclude-pattern>
<exclude-pattern>profiles/common/modules/features/multisite_business_indicators/multisite_business_indicators_standard/includes/views_handler_*.inc</exclude-pattern>
<exclude-pattern>profiles/common/modules/features/multisite_business_indicators/multisite_business_indicators_core/plugins/*.inc</exclude-pattern>
<exclude-pattern>profiles/*/modules/**/views/*.inc</exclude-pattern>
</rule>
<!-- Views handlers/plugins not strictly follow Drupal function name conventions. -->
<rule ref="Drupal.NamingConventions.ValidFunctionName">
<exclude-pattern>profiles/common/modules/custom/ecas/ecas_extra/includes/views/handlers/*.inc</exclude-pattern>
<exclude-pattern>profiles/common/modules/features/multisite_business_indicators/multisite_business_indicators_standard/includes/views_handler_*.inc</exclude-pattern>
<exclude-pattern>profiles/common/modules/features/multisite_business_indicators/multisite_business_indicators_core/plugins/*.inc</exclude-pattern>
<exclude-pattern>profiles/*/modules/**/views/*.inc</exclude-pattern>
</rule>
<!-- Context reaction not strictly follow Drupal function name conventions. -->
<rule ref="Drupal.NamingConventions.ValidFunctionName.ScopeNotCamelCaps">
<exclude-pattern>profiles/common/modules/features/multisite_twitterblock/plugins/multisite_twitterblock_reaction.inc</exclude-pattern>
</rule>
<!-- Code based on the classes from the Web Service Clients module do not follow Drupal class name conventions. -->
<rule ref="Drupal.NamingConventions.ValidClassName">
<exclude-pattern>profiles/common/modules/custom/multisite_cookie_consent/modules/connections/multisite_cookie_rest.inc</exclude-pattern>
</rule>
<!-- Code based on the classes from Web Service Clients or TMGMT do not follow Drupal function name conventions. -->
<rule ref="Drupal.NamingConventions.ValidFunctionName.ScopeNotCamelCaps">
<exclude-pattern>profiles/common/modules/custom/multisite_cookie_consent/modules/connections/multisite_cookie_rest.inc</exclude-pattern>
<exclude-pattern>profiles/common/modules/custom/tmgmt_workbench/includes/tmgmt_workbench.ui.inc</exclude-pattern>
</rule>
<!-- Callbacks for the SoapServer class (part of the Soap extension) do not follow Drupal function name conventions. -->
<rule ref="Drupal.NamingConventions.ValidFunctionName.InvalidName">
<exclude-pattern>profiles/common/modules/custom/tmgmt_poetry/tmgmt_poetry.module</exclude-pattern>
<exclude-pattern>profiles/common/modules/custom/tmgmt_poetry/inc/tmgmt_poetry.webservice.inc</exclude-pattern>
</rule>
<!-- Tmgmt poetry tests not strictly follow Drupal class name conventions. -->
<rule ref="Drupal.NamingConventions.ValidClassName">
<exclude-pattern>profiles/common/modules/custom/tmgmt_poetry/tests/tmgmt_poetry.test</exclude-pattern>
</rule>
<!-- Exclude third party code which is not following Drupal coding standards. -->
<exclude-pattern>profiles/common/modules/custom/multisite_drupal_toolbox/icons</exclude-pattern>
<!-- Phing tasks require to use CamelCaps for argument names. -->
<rule ref="Drupal.NamingConventions.ValidVariableName">
<exclude-pattern>src/Phing</exclude-pattern>
</rule>
<!-- Comments in exported fields are missing a period at the end. -->
<!-- Todo: Remove this when https://www.drupal.org/node/2568161 is fixed. -->
<rule ref="Drupal.Commenting.InlineComment.InvalidEndChar">
<exclude-pattern>sprofiles/*/modules/features/**/*features.field_base.inc</exclude-pattern>
<exclude-pattern>sprofiles/*/modules/features/**/*features.field_instance.inc</exclude-pattern>
</rule>
</ruleset>