Skip to content

Commit 4a4f1e6

Browse files
oliverkleeSam Tuke
authored andcommitted
[TASK] Provide the code language in markdown files (#38)
This enables syntax highlighting when rendering markdown.
1 parent d1a2635 commit 4a4f1e6

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

.github/CONTRIBUTING.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,16 @@ schema once. Assuming that your database is named `phplist_test`, the user is
8484
named `phplist`, and the password is `batterystaple`, the command looks like
8585
this:
8686

87-
mysql -u phplist_test --password=batterystaple phplist_test < vendor/phplist/phplist4-core/Database/Schema.sql
87+
```bash
88+
mysql -u phplist_test --password=batterystaple phplist_test < vendor/phplist/phplist4-core/Database/Schema.sql
89+
```
8890

8991
When running the integration tests, you will need to specify the database name
9092
and access credentials on the command line (in the same line):
9193

92-
PHPLIST_DATABASE_NAME=phplist_test PHPLIST_DATABASE_USER=phplist PHPLIST_DATABASE_PASSWORD=batterystaple vendor/bin/phpunit -c Configuration/PHPUnit/phpunit.xml Tests/Integration/
94+
```bash
95+
PHPLIST_DATABASE_NAME=phplist_test PHPLIST_DATABASE_USER=phplist PHPLIST_DATABASE_PASSWORD=batterystaple vendor/bin/phpunit -c Configuration/PHPUnit/phpunit.xml Tests/Integration/
96+
```
9397

9498

9599
## Coding Style
@@ -103,18 +107,27 @@ We will only merge pull requests that follow the project's coding style.
103107

104108
Please check your code with the provided PHP_CodeSniffer standard:
105109

106-
vendor/bin/phpcs --standard=vendor/phplist/phplist4-core/Configuration/PhpCodeSniffer/ Classes/ Tests/
110+
```bash
111+
vendor/bin/phpcs --standard=vendor/phplist/phplist4-core/Configuration/PhpCodeSniffer/ Classes/ Tests/
112+
```
107113

108114
Please also check the code structure using PHPMD:
109115

110-
vendor/bin/phpmd Classes/ text vendor/phplist/phplist4-core/Configuration/PHPMD/rules.xml
116+
```bash
117+
vendor/bin/phpmd Classes/ text vendor/phplist/phplist4-core/Configuration/PHPMD/rules.xml
118+
```
111119

112120
And also please run the static code analysis:
113121

114-
vendor/bin/phpstan analyse -l 5 Classes/ Tests/
122+
```bash
123+
vendor/bin/phpstan analyse -l 5 Classes/ Tests/
124+
```
115125

116126
You can also run all code style checks using one long line from a bash shell:
117-
find Classes/ Tests/ -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l && vendor/bin/phpstan analyse -l 5 Classes/ Tests/ && vendor/bin/phpmd Classes/ text vendor/phplist/phplist4-core/Configuration/PHPMD/rules.xml && vendor/bin/phpcs --standard=vendor/phplist/phplist4-core/Configuration/PhpCodeSniffer/ Classes/ Tests/
127+
128+
```bash
129+
find Classes/ Tests/ -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l && vendor/bin/phpstan analyse -l 5 Classes/ Tests/ && vendor/bin/phpmd Classes/ text vendor/phplist/phplist4-core/Configuration/PHPMD/rules.xml && vendor/bin/phpcs --standard=vendor/phplist/phplist4-core/Configuration/PhpCodeSniffer/ Classes/ Tests/
130+
```
118131

119132
This will execute all tests except for the unit tests and the integration
120133
tests.

0 commit comments

Comments
 (0)