@@ -11,24 +11,39 @@ vendor/bin/drush pm:enable os2forms_get_organized
1111
1212## Settings
1313
14- Set GetOrganized ` username ` , ` password ` and ` base url `
15- on ` /admin/os2forms_get_organized/settings ` .
16-
17- You can also test that the provided
18- details work on ` /admin/os2forms_get_organized/settings ` .
14+ Go to ` /admin/os2forms_get_organized/settings ` and configure the module.
1915
2016## Coding standards
2117
22- Check coding standards:
18+ Our coding are checked by GitHub Actions (cf. [ .github/workflows/pr.yml] ( .github/workflows/pr.yml ) ). Use the commands
19+ below to run the checks locally.
2320
24- ``` sh
25- docker run --rm --interactive --tty --volume ${PWD} :/app itkdev/php8.1-fpm:latest composer install
26- docker run --rm --interactive --tty --volume ${PWD} :/app itkdev/php8.1-fpm:latest composer coding-standards-check
21+ ### PHP
22+
23+ ``` shell
24+ # Update to make sure that we use the latest versions of tools.
25+ docker run --rm --volume ${PWD} :/app --workdir /app itkdev/php8.3-fpm composer update
26+ # Fix (some) coding standards issues
27+ docker run --rm --volume ${PWD} :/app --workdir /app itkdev/php8.3-fpm composer coding-standards-apply
28+ # Check that code adheres to the coding standards
29+ docker run --rm --volume ${PWD} :/app --workdir /app itkdev/php8.3-fpm composer coding-standards-check
30+ ```
31+
32+ ### Markdown
33+
34+ ``` shell
35+ docker pull peterdavehello/markdownlint
36+ docker run --rm --volume $PWD :/md peterdavehello/markdownlint markdownlint --ignore vendor --ignore LICENSE.md ' **/*.md' --fix
37+ docker run --rm --volume $PWD :/md peterdavehello/markdownlint markdownlint --ignore vendor --ignore LICENSE.md ' **/*.md'
2738```
2839
29- Apply coding standards:
40+ ## Code analysis
41+
42+ We use [ PHPStan] ( https://phpstan.org/ ) for static code analysis.
43+
44+ Running statis code analysis on a standalone Drupal module is a bit tricky, so we use a helper script to run the
45+ analysis:
3046
3147``` shell
32- docker run --rm --interactive --tty --volume ${PWD} :/app itkdev/php8.1-fpm:latest composer coding-standards-apply
33- docker run --rm --interactive --tty --volume ${PWD} :/app node:18 yarn --cwd /app coding-standards-apply
48+ docker run --rm --volume ${PWD} :/app --workdir /app itkdev/php8.3-fpm ./scripts/code-analysis
3449```
0 commit comments