# Contributing to gitlogue Thank you for your interest in contributing to gitlogue! This document provides guidelines and instructions for contributing to the project. ## Table of Contents - [Code of Conduct](#code-of-conduct) - [Getting Started](#getting-started) - [Development Setup](#development-setup) - [Making Changes](#making-changes) - [Coding Standards](#coding-standards) - [Testing](#testing) - [Submitting Changes](#submitting-changes) - [Reporting Bugs](#reporting-bugs) - [Suggesting Features](#suggesting-features) - [Project Structure](#project-structure) ## Code of Conduct This project follows a simple code of conduct: - Be respectful and considerate in all interactions - Welcome newcomers and help them get started - Focus on constructive criticism - Respect different viewpoints and experiences ## Getting Started ### Prerequisites - Git - Rust 1.70 or later - A GitHub account - Familiarity with Rust programming ### First Steps 1. **Fork the repository** on GitHub 2. **Clone your fork** locally: ```bash git clone https://github.com/YOUR_USERNAME/gitlogue.git cd gitlogue ``` 3. **Add the upstream remote**: ```bash git remote add upstream https://github.com/unhappychoice/gitlogue.git ``` 4. **Create a branch** for your changes: ```bash git checkout -b feature/your-feature-name ``` ## Development Setup ### Building the Project ```bash # Build in debug mode cargo build # Build in release mode cargo build --release # Run the project cargo run # Run with arguments cargo run -- --theme dracula ``` ### Running Tests ```bash # Run all tests cargo test # Run tests with output cargo test -- --nocapture # Run specific test cargo test test_name ``` ### Running Examples ```bash # Run the syntax highlighter test cargo run --example test_highlighter ``` ### Code Formatting ```bash # Format code cargo fmt # Check formatting without making changes cargo fmt -- --check ``` ### Linting ```bash # Run clippy for linting cargo clippy # Run clippy with all features cargo clippy --all-features -- -D warnings ``` ## Making Changes ### Branch Naming Use descriptive branch names with prefixes: - `feature/` - New features (e.g., `feature/custom-themes`) - `fix/` - Bug fixes (e.g., `fix/crash-on-empty-repo`) - `docs/` - Documentation changes (e.g., `docs/improve-readme`) - `refactor/` - Code refactoring (e.g., `refactor/theme-loading`) - `test/` - Test additions or improvements (e.g., `test/add-integration-tests`) ### Commit Messages Follow the [Conventional Commits](https://www.conventionalcommits.org/) specification: ``` ():