Skip to content

Commit f98d09a

Browse files
oliverkleeSam Tuke
authored andcommitted
[TASK] Provide the code language in markdown files (#74)
This enables syntax highlighting when rendering markdown.
1 parent 05764ee commit f98d09a

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

.github/CONTRIBUTING.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ code coverage of the fixed bugs and the new features.
7878

7979
To run the existing unit tests, run this command:
8080

81-
vendor/bin/phpunit -c Configuration/PHPUnit/phpunit.xml Tests/Unit/
81+
```bash
82+
vendor/bin/phpunit -c Configuration/PHPUnit/phpunit.xml Tests/Unit/
83+
```
8284

8385
### Running the integration tests
8486

@@ -90,12 +92,16 @@ schema once. Assuming that your database is named `phplist_test`, the user is
9092
named `phplist`, and the password is `batterystaple`, the command looks like
9193
this:
9294

93-
mysql -u phplist_test --password=batterystaple phplist_test < vendor/phplist/phplist4-core/Database/Schema.sql
95+
```bash
96+
mysql -u phplist_test --password=batterystaple phplist_test < vendor/phplist/phplist4-core/Database/Schema.sql
97+
```
9498

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

98-
PHPLIST_DATABASE_NAME=phplist_test PHPLIST_DATABASE_USER=phplist PHPLIST_DATABASE_PASSWORD=batterystaple vendor/bin/phpunit -c Configuration/PHPUnit/phpunit.xml Tests/Integration/
102+
```bash
103+
PHPLIST_DATABASE_NAME=phplist_test PHPLIST_DATABASE_USER=phplist PHPLIST_DATABASE_PASSWORD=batterystaple vendor/bin/phpunit -c Configuration/PHPUnit/phpunit.xml Tests/Integration/
104+
```
99105

100106

101107
## Coding Style
@@ -109,18 +115,27 @@ We will only merge pull requests that follow the project's coding style.
109115

110116
Please check your code with the provided PHP_CodeSniffer standard:
111117

112-
vendor/bin/phpcs --standard=vendor/phplist/phplist4-core/Configuration/PhpCodeSniffer/ Classes/ Tests/
118+
```bash
119+
vendor/bin/phpcs --standard=vendor/phplist/phplist4-core/Configuration/PhpCodeSniffer/ Classes/ Tests/
120+
```
113121

114122
Please also check the code structure using PHPMD:
115123

116-
vendor/bin/phpmd Classes/ text vendor/phplist/phplist4-core/Configuration/PHPMD/rules.xml
124+
```bash
125+
vendor/bin/phpmd Classes/ text vendor/phplist/phplist4-core/Configuration/PHPMD/rules.xml
126+
```
117127

118128
And also please run the static code analysis:
119129

120-
vendor/bin/phpstan analyse -l 5 Classes/ Tests/
130+
```bash
131+
vendor/bin/phpstan analyse -l 5 Classes/ Tests/
132+
```
121133

122134
You can also run all code style checks using one long line from a bash shell:
123-
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/
135+
136+
```bash
137+
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/
138+
```
124139

125140
This will execute all tests except for the unit tests and the integration
126141
tests.

0 commit comments

Comments
 (0)