Skip to content

Commit 83809c3

Browse files
authored
refs sparkfabrik-innovation-team/board#1108: Enforce some rules
1 parent f50bf16 commit 83809c3

File tree

11 files changed

+2033
-589
lines changed

11 files changed

+2033
-589
lines changed

.phpcs.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ruleset name="DrupalCS">
3+
<description>PHP CodeSniffer configuration for development.</description>
4+
5+
<!-- Check all files in the current directory and below. -->
6+
<file>web/modules/custom</file>
7+
<file>web/themes/custom</file>
8+
<arg name="extensions" value="php,module,inc,install,test,profile,theme"/>
9+
10+
<config name="drupal_core_version" value="9"/>
11+
12+
<!-- Coder rules. -->
13+
<rule ref="../vendor/drupal/coder/coder_sniffer/Drupal"/>
14+
<rule ref="../vendor/drupal/coder/coder_sniffer/DrupalPractice"/>
15+
16+
<!-- No need for @file comments. -->
17+
<rule ref="Drupal.Commenting.FileComment.Missing">
18+
<severity>0</severity>
19+
</rule>
20+
21+
<!-- Module name as class prefix is redundant. -->
22+
<rule ref="DrupalPractice.General.ClassName.ClassPrefix">
23+
<severity>0</severity>
24+
</rule>
25+
</ruleset>

.phpqa.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ phpmd:
77
# Php file extensions to parse.
88
phpqa:
99
report: true
10+
verbose: true
1011
buildDir: /app/reports
1112
extensions:
1213
- php
@@ -19,3 +20,7 @@ phpqa:
1920
phpcpd:
2021
minLines: 5
2122
minTokens: 70
23+
24+
phpstan:
25+
level: 5
26+
standard: phpstan.neon

composer.json

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
{
22
"require": {
3-
"edgedesign/phpqa": "^1.24",
4-
"enlightn/security-checker": "^1.7",
5-
"php-parallel-lint/php-parallel-lint": "^1.3",
6-
"phpstan/phpstan": "^0.12.83",
7-
"mglaman/phpstan-drupal": "^0.12.9",
8-
"nette/neon": "^3.2",
9-
"phpstan/phpstan-deprecation-rules": "^0.12.6",
3+
"cweagans/composer-patches": "^1.6",
104
"drupal/coder": "^8.3",
5+
"edgedesign/phpqa": "^1.25",
6+
"enlightn/security-checker": "^1.9",
7+
"mglaman/phpstan-drupal": "^1.1",
8+
"nette/neon": "^3.3",
9+
"php-parallel-lint/php-parallel-lint": "^1.3",
10+
"phpstan/phpstan": "^1.4",
11+
"phpstan/phpstan-deprecation-rules": "^1.0",
1112
"sebastian/phpcpd": "5.0.2",
13+
"vimeo/psalm": "^4.13",
1214
"webflo/drupal-finder": "^1.2"
1315
},
14-
"scripts": {
15-
"post-install-cmd": [
16-
"vendor/bin/phpcs --config-set installed_paths vendor/drupal/coder/coder_sniffer/Drupal"
17-
]
16+
"extra": {
17+
"patches": {
18+
"edgedesign/phpqa": {
19+
"Replace deprecated function excludes analyse whit excludePaths": "https://patch-diff.githubusercontent.com/raw/EdgedesignCZ/phpqa/pull/242.patch"
20+
}
21+
}
1822
}
1923
}

0 commit comments

Comments
 (0)