Contributing Guide¶
Thank you for your interest in contributing to Code Context Analyzer!
This guide will help you get started with local development, testing, and submitting changes.
๐งฐ Prerequisites¶
- Python 3.10+
piporpoetry- Git
๐ฆ Setting Up Locally¶
git clone https://github.com/ahasanular/code-context-analyzer.git
cd code-context-analyzer
pip install -r requirements.txt
You can also use
poetry installif you're using Poetry.
๐งช Running Tests¶
This project uses pytest.
pytest
To run tests with coverage:
pytest --cov=parsers
๐งผ Code Style¶
- Follow PEP8 for formatting
- Use type hints wherever possible
- Run
flake8&isortbefore submitting
Format your import:
isort
Check for linting errors:
flake8
๐ Submitting a Pull Request¶
- Fork the repository
- Create a new branch (
git checkout -b feature/my-new-feature) - Make your changes
- Write tests if applicable
- Run tests and linters
- Commit and push (
git commit -m "Add: my new feature") - Open a Pull Request against
master
๐ Adding a New Language Parser¶
- Create a new file in
analyzer/parsers/(e.g.go_parser.py) - Implement the
ParserProtocol - Register it in the CLI (
parsers/__init__.py) - Add tests for the parser
๐ Documentation¶
Documentation is powered by MkDocs and lives in the docs/ folder.
To preview locally:
mkdocs serve
https://ahasanular.github.io/code-context-analyzer/
๐ Code of Conduct¶
Please be respectful and inclusive in all interactions. We follow the Contributor Covenant.
Thanks again for contributing! ๐ See License.