First off, thank you for considering contributing to CodeThreat CLI! Your involvement helps us make this tool even better. The following is a set of guidelines for contributing to this project.
By participating in this project, you agree to abide by our Code of Conduct. Please read it to understand what actions will and will not be tolerated.
If you encounter a bug or have a question, please open an issue on GitHub. When reporting an issue, provide as much detail as possible:
- A clear title and description.
- Steps to reproduce the issue.
- Expected and actual results.
- System information (OS, Python version, etc.).
We welcome ideas and suggestions! To propose a new feature:
- Search the existing issues and discussions to see if the idea has already been discussed.
- If not, open a new issue describing your idea.
- Explain your proposal clearly, including potential use cases, benefits, and possible implementation strategies.
We appreciate your efforts to contribute to the codebase. Here’s how you can submit a pull request (PR):
- Fork the repository and create your branch from
master. - Make your changes in a new branch (e.g.,
feature/add-new-command). - Ensure that your code adheres to our style guides and passes all tests.
- Commit your changes following the conventional commit guidelines.
- Push your branch to your fork and submit a pull request.
- In your pull request, describe what changes were made and why they are necessary.
To set up a development environment, follow these steps:
-
Clone the repository:
git clone https://github.com/CodeThreat/codethreat-cli.git cd codethreat-cli -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
Install dependencies:
pip install -r requirements.txt
We use pytest for testing. Ensure all tests pass before submitting your PR:
-
Run all tests:
pytest tests/ -
Check test coverage:
pytest --cov=cli tests/
We use Conventional Commits for our commit messages. This helps in automatically generating changelogs and versioning. Here’s a summary of the format:
- feat: A new feature (e.g.,
feat: add scan command) - fix: A bug fix (e.g.,
fix: resolve auth token issue) - docs: Documentation only changes (e.g.,
docs: update README) - style: Changes that do not affect the meaning of the code (white-space, formatting, etc.)
- refactor: A code change that neither fixes a bug nor adds a feature
- test: Adding missing tests or correcting existing tests
- chore: Changes to the build process or auxiliary tools and libraries (e.g.,
chore: update dependencies)
Example commit message:
feat: add authentication support
- Added login and logout commands
- Improved token management`
By contributing, you agree that your contributions will be licensed under the MIT License. See the LICENSE file for more details.