Skip to content

Latest commit

 

History

History
72 lines (53 loc) · 2.18 KB

File metadata and controls

72 lines (53 loc) · 2.18 KB

Contributing to Drydock

Thank you for your interest in contributing to Drydock! This guide will help you get started.

Ways to Contribute

  • Report bugs via GitHub Issues
  • Suggest features via GitHub Issues
  • Submit pull requests for bug fixes or new tools
  • Improve documentation in StartHere/, README files, or analysis templates
  • Add analyzer tools to the Tools/ directory

Getting Started

  1. Fork the repository
  2. Clone your fork locally
  3. Create a feature branch: git checkout -b my-feature
  4. Make your changes
  5. Test your changes (see below)
  6. Commit with a clear message
  7. Push to your fork and open a PR

Development Setup

Drydock tools are pure Python (stdlib only). No virtual environment or pip install required.

# Clone
git clone https://github.com/YOUR_USERNAME/Drydock.git
cd Drydock

# Verify tools work
python Tools/analyzers/codemap.py --help
python Tools/analyzers/context_compiler.py --help

Coding Guidelines

  • Pure stdlib - No external dependencies for tools in Tools/
  • JSON-first output - All analyzers default to JSON, with --markdown option
  • No fat files - Keep files under 300 lines where possible
  • Naming convention - {action}_{target}.py for tools (e.g., dependency_analyzer.py)
  • Docstrings - Include a module-level docstring with usage examples
  • Non-destructive - Analyzers must never modify the source project

Adding a New Tool

  1. Place in the appropriate category folder under Tools/
  2. Follow the naming convention: {action}_{target}.py
  3. Output JSON by default, support --markdown flag
  4. Include a module-level docstring with usage
  5. Use argparse for CLI arguments
  6. Update Tools/README.md with your tool

Testing

# Run a tool against the Drydock repo itself as a smoke test
python Tools/analyzers/codemap.py . --output /tmp/test-codemap.json
python Tools/analyzers/structure_analyzer.py .

Pull Request Guidelines

  • Keep PRs focused on a single change
  • Include a clear description of what and why
  • Reference any related issues
  • Ensure all existing tools still run without errors

Questions?

Open an issue and we'll help you out.