* fix: address PR #10 CodeRabbit review feedback - Fix SC2115 shellcheck warning in build.sh (use ${var:?} for safe rm -rf) - Fix SC2164 shellcheck warning in build.sh (cd build || exit 1) - Standardise bullet points from hyphens to asterisks in .wiki/Contributing.md - Refine verb formality in readme.txt, README.md, .wiki/Contributing.md, .wiki/Coding-Standards.md - Clarify PHPDoc wording in .wiki/Coding-Standards.md - Add clarifying comment to phpcs-simple.xml arg value * fix: re-enable PHPUnit test step in tests.yml Tests were commented out in PR #10. PHPUnit test files exist in tests/phpunit/ and phpunit.xml is configured. Re-enabling the step so tests actually run in CI. Closes #45 * fix: remove redundant composer require steps in code-quality workflow szepeviktor/phpstan-wordpress, wp-coding-standards/wpcs, and dealerdirect/phpcodesniffer-composer-installer are already declared in composer.json require-dev. The extra 'composer require' steps after 'composer install' caused a second packagist.org network hit that timed out in CI, failing the PHPStan Static Analysis job. Fixes the Code Quality CI failure on PR #51 (issue #45).
5.9 KiB
Contributing
Thank you for considering contributing to this project! This document provides guidelines and instructions for contributing.
Code of Conduct
By participating in this project, you agree to abide by our code of conduct:
- Be respectful and inclusive
- Be patient and welcoming
- Be considerate
- Be collaborative
- Be open-minded
How to Contribute
Reporting Bugs
If you find a bug, please report it by creating an issue on GitHub:
- Go to the Issues page
- Click "New Issue"
- Select "Bug Report"
- Fill out the template with as much detail as possible
- Submit the issue
Please include:
- A clear, descriptive title
- Steps to reproduce the bug
- Expected behavior
- Actual behavior
- Screenshots (if applicable)
- Your environment (WordPress version, PHP version, browser, etc.)
Suggesting Enhancements
If you have an idea for an enhancement:
- Go to the Issues page
- Click "New Issue"
- Select "Feature Request"
- Fill out the template with as much detail as possible
- Submit the issue
Please include:
- A clear, descriptive title
- A detailed description of the enhancement
- Why this enhancement would be useful
- Any relevant examples or mockups
Pull Requests
If you want to contribute code:
- Fork the repository
- Create a new branch for your feature or bugfix
- Make your changes
- Run tests to ensure your changes don't break anything
- Submit a pull request
Pull Request Process
- Fork the repository on GitHub or Gitea
- Clone your fork:
git clone https://github.com/YOUR-USERNAME/wp-plugin-starter-template-for-ai-coding.git - Create your feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Commit your changes:
git commit -m 'Add some amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Submit a pull request
Pull Request Guidelines
- Follow the coding standards (see Coding Standards)
- Write tests for your changes
- Update documentation as needed
- 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:
-
CodeRabbit: AI-powered code review tool
- Website
- Provides automated feedback on pull requests
-
CodeFactor: Continuous code quality monitoring
- Website
- Provides a grade for your codebase
-
Codacy: Code quality and static analysis
- Website
- Identifies issues related to code style, security, and performance
-
SonarCloud: Code quality and security analysis
- Website
- 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:
- Copy the output from the code quality tool
- Paste it into your AI assistant chat
- Request the AI's assistance to interpret and resolve the reported issues
- Apply the suggested fixes
- 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 and resolve these issues:
[Paste the tool output here]
Development Environment
To set up your development environment:
- Clone the repository:
git clone https://github.com/wpallstars/wp-plugin-starter-template-for-ai-coding.git - Install dependencies:
composer install && npm install - Start the development environment:
npm run start
Testing
Before submitting a pull request, make sure to run the tests:
- PHP Unit Tests:
npm run test:php - 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 assist in identifying and resolving 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:
- Update the README.md file if necessary
- Update the readme.txt file if necessary
- Update or create wiki pages as needed
- Update code comments
Community
Join our community to discuss the project:
Recognition
Contributors will be recognized in the following ways:
- Added to the contributors list in readme.txt
- Mentioned in release notes for significant contributions
- Thanked in the Changelog for specific contributions
License
By contributing to this project, you agree that your contributions will be licensed under the project's GPL-2.0+ License.
Questions?
If you have any questions about contributing, please open an issue or contact the maintainers.
Thank you for your contributions!