-
Notifications
You must be signed in to change notification settings - Fork 83
Coding Standard
Stephan Schauberger edited this page May 30, 2023
·
6 revisions
A project should look like it was written by only one developer. Consistency and clean code style significantly improve the readability and hence the maintainability of code. The exact code style does not matter. In the Catroweb project, we mainly use de default industry standards:
-
bin/php-cs-fixer fix --dry-run --allow-risky=yes --verbose --format=txt
to test -
bin/php-cs-fixer fix --allow-risky=yes --verbose --format=txt
to automatically try to fix the problems
or
-
npm run test-php
to test -
npm run fix-php
to automatically try to fix the problems
-
npm run test-js
to test -
npm run fix-js
to automatically try to fix the problems
-
npm run test-css
to test -
npm run fix-css
to automatically try to fix the problems
-
npm run test
to test all -
npm run fix
to automatically try to fix all the problems
-
All .scss, .js (and image) files should be in the assets folder.
Do not create/move them directly to the public folder. This is done automatically by npm. -
For more details feel free to look up the config files in the project if necessary.
-
The Continuous Integration system will automatically check your code style on every pull request, but will not fix it and fail on errors. It is advised to run the mentioned commands before pushing.
Check out /share.catrob.at/pocketcode/
- Docker - Linux/Mac/Windows
- Ubuntu - VM/Native
- Installing Elasticsearch
- Server Setup
- Using Webpack (material components)