Add documentation for code quality tools and standards

This commit is contained in:
2025-04-21 03:58:18 +01:00
parent 04cdd49a3f
commit 497c44c3c6
8 changed files with 738 additions and 1 deletions

View File

@@ -78,6 +78,45 @@ If you want to contribute code:
- Keep pull requests focused on a single change
- Write a clear, descriptive title and description
- Reference any related issues
- Ensure your code passes the automated code quality checks (see below)
#### Code Quality Tools
This project uses several automated code quality tools to ensure high standards. These tools are free for public repositories and will automatically analyze your code when you create a pull request:
1. **CodeRabbit**: AI-powered code review tool
- [Website](https://www.coderabbit.ai/)
- Provides automated feedback on pull requests
2. **CodeFactor**: Continuous code quality monitoring
- [Website](https://www.codefactor.io/)
- Provides a grade for your codebase
3. **Codacy**: Code quality and static analysis
- [Website](https://www.codacy.com/)
- Identifies issues related to code style, security, and performance
4. **SonarCloud**: Code quality and security analysis
- [Website](https://sonarcloud.io/)
- Provides detailed analysis of code quality and security
#### Using AI Assistants with Code Quality Tools
When you receive feedback from these code quality tools, you can use AI assistants to help address the issues:
1. Copy the output from the code quality tool
2. Paste it into your AI assistant chat
3. Ask the AI to help you understand and fix the issues
4. Implement the suggested fixes
5. Commit the changes and verify that the issues are resolved
Example prompt for AI assistants:
```
I received the following feedback from [Tool Name]. Please help me understand these issues and suggest fixes:
[Paste the tool output here]
```
## Development Environment
@@ -95,6 +134,17 @@ Before submitting a pull request, make sure to run the tests:
- End-to-End Tests: `npm run test:e2e`
- Coding Standards: `npm run lint:php`
#### Code Quality Checks
To ensure your code meets the quality standards, run these commands before submitting a pull request:
- Check coding standards: `composer run phpcs`
- Fix coding standards automatically: `composer run phpcbf`
- Check JavaScript coding standards: `npm run lint:js`
- Check CSS coding standards: `npm run lint:css`
These checks will help identify and fix issues before they are caught by the automated code quality tools in the pull request process.
## Documentation
If you're adding a new feature or changing existing functionality, please update the documentation: