-
Notifications
You must be signed in to change notification settings - Fork 90
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=txtto test -
bin/php-cs-fixer fix --allow-risky=yes --verbose --format=txtto automatically try to fix the problems
or
-
npm run test-phpto test -
npm run fix-phpto automatically try to fix the problems
-
npm run test-jsto test -
npm run fix-jsto automatically try to fix the problems
-
npm run test-cssto test -
npm run fix-cssto automatically try to fix the problems
-
npm run testto test all -
npm run fixto 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)