Contributing to Infigraph
Thank you for your interest in contributing!
Prerequisites
- Rust stable (via rustup)
cmake— required by the graph database- macOS:
brew install cmake - Linux:
sudo apt install cmake
- macOS:
Building
cargo build --release -p infigraph-cli -p infigraph-mcp
Running Tests
cargo test --all
Code Style
cargo fmt --all
cargo clippy --all-targets --all-features -- -D warnings
Both are enforced in CI. Please run them before pushing.
Adding a Language
Tree-sitter path — add a tree-sitter-<lang> crate dependency and write two query files:
crates/infigraph-languages/languages/<lang>/entities.scm— symbolscrates/infigraph-languages/languages/<lang>/relations.scm— call edges, imports
Grammar plugin path — for languages without a tree-sitter grammar, write ANTLR .g4 grammars and a Java extractor. See GRAMMAR_PLUGINS.md for a full walkthrough.
Submitting a PR
- Fork the repo and create a branch from
main - Write tests for your change
- Ensure
cargo test --all,cargo fmt --all, andcargo clippyall pass - Submit a pull request — the template will guide you through the checklist
Reporting Bugs
Open an issue using the bug report template.
License
By contributing, you agree that your contributions will be licensed under the Apache 2.0 license.