Thank you for considering contributing to Snipe. This document outlines expectations and workflow so contributions are smooth and consistent.
- Be respectful and constructive in discussions, issues, and pull requests.
- Focus on the code and ideas, not on individuals.
- Bug reports & feature requests: Open an Issue with a clear title and description.
- Code or docs: Open a Pull Request (PR) against the default branch. Do not push directly to
main; all changes go through review.
mainis the default branch and should stay stable.- Do not merge directly into
main. All changes must go through a Pull Request. - Create a branch for your work (e.g.
fix/array-bounds-false-positive,feat/python-type-hints,docs/readme-quickstart). - PRs require at least one approval from a maintainer before merge, unless the project explicitly states otherwise.
- Keep PRs focused: one logical change per PR when possible.
- Ensure the backend and extension still work (see README Quick Start).
- If you change backend logic, run:
cd backend && python -m pytest ../tests/ -v(or the project’s test command). - Rebase or merge the latest
maininto your branch and fix any conflicts.
- Title: Short and descriptive (e.g.
Fix C array size extraction for declarators,Add CONTRIBUTING and MIT license). - Description: Include:
- What changed and why (problem or goal).
- How it was addressed (high-level approach).
- Any breaking changes or follow-up work.
- How you tested (manual steps and/or tests).
- Address review comments in new commits or by amending, and keep the conversation professional.
- Use a clear, concise title (e.g.
Array bounds not reported when size in separate file). - In the description, include:
- Steps to reproduce (and sample code/repo layout if relevant).
- Expected vs actual behavior.
- Environment (OS, Python/Node versions, VSCode/Cursor version) if it might matter.
- Keep messages short and concise.
- Use the imperative mood (“Add feature”, “Fix crash”, not “Added feature” / “Fixes crash”).
- Optionally prefix with scope:
parser: fix array size from declarator,extension: show diagnostics for unsaved file.
Examples:
Fix C array size extraction for declarator size fieldextension: reload instructions in READMEAdd CONTRIBUTING.md and MIT LICENSE
- Comments: Explain why when it’s not obvious from the code; avoid restating what the code does in one line.
- Docstrings: Use for public functions, classes, and modules (backend and extension) so behavior is clear.
- Follow existing style in the file (indentation, naming, imports). The project uses Python in the backend and TypeScript in the extension.
- Backend:
backend/(FastAPI server, parsers, analyzers, graph). - Extension:
extension/(VSCode/Cursor plugin). - Tests:
tests/(e.g.unit_tests.py). - Docs:
README.md,CONTRIBUTING.md, and any SDP/SRS or design docs in the repo.
If something is unclear, open an Issue with the “question” label or ask in the PR description. We’re happy to clarify expectations or workflow.
Thank you for contributing to Snipe.