Contributing to Bodge

We welcome contributions from the community! This guide will help you get started.

Ways to Contribute

Getting Started

1. Fork and Clone

# Fork the repository on GitHub, then:
git clone https://github.com/YOUR_USERNAME/bodge.git
cd bodge

2. Build and Test

# Build Bodge
make all  # Linux/macOS
# or 
.\make.bat  # Windows

# Test the build
./bodge help

3. Make Your Changes

4. Submit a Pull Request

Development Guidelines

Code Style

C++ Standards

Testing

Architecture Overview

Understanding Bodge’s architecture will help you contribute effectively:

src/
β”œβ”€β”€ main.cpp           # Entry point and CLI handling
β”œβ”€β”€ ProjectConfig.*    # Configuration data structures
β”œβ”€β”€ ConfigParser.*     # .bodge file parsing
β”œβ”€β”€ BuildSystem.*      # Build orchestration and execution
└── StringUtils.*      # Utility functions

Key Classes

  1. ConfigParser - Parses .bodge configuration files
  2. ProjectConfig - Holds all project configuration data
  3. BuildSystem - Orchestrates builds and file operations
  4. StringUtils - String manipulation utilities

Adding New Features

New Configuration Options

  1. Add the option to ProjectConfig struct
  2. Update ConfigParser to handle the new option
  3. Update BuildSystem to use the option
  4. Add documentation and examples

New Operations for Sequences

  1. Add new OperationType enum value
  2. Update ConfigParser::process_sequence_config_line()
  3. Implement the operation in BuildSystem::execute_operation()
  4. Add tests and documentation

New Target Types

  1. Add new BuildType enum value
  2. Update ConfigParser::parse_build_type()
  3. Update BuildTarget::get_output_extension()
  4. Update BuildSystem::generate_target_command() for any special handling

Submitting Issues

When reporting bugs, please include:

Example Issue Template

**Environment:**
- OS: Windows 11 / Ubuntu 22.04 / macOS 13
- Compiler: g++ 11.2.0
- Bodge version: 1.0.0

**Description:**
Brief description of the issue

**Steps to reproduce:**
1. Create .bodge file with: ...
2. Run: bodge build mylib
3. Observe error: ...

**Expected behavior:**
Should build successfully

**Actual behavior:**
Fails with error: ...

**Sample .bodge file:**

name: Test Project mylib.type: shared mylib.sources: test.cpp

Feature Requests

For feature requests, please describe:

Documentation

Help us improve our documentation:

Documentation files are in the docs/ directory and use Markdown format.

Code of Conduct

Please be respectful and constructive in all interactions. We want Bodge to have a welcoming community for everyone.

Questions?

Thank you for contributing to Bodge! πŸš€