Skip to content

Latest commit

 

History

History
100 lines (63 loc) · 2.77 KB

File metadata and controls

100 lines (63 loc) · 2.77 KB

Contributing to Traktor

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

Getting Started

See the README for build instructions on macOS, Windows, and Linux.

Running the Test Suite

Tests are built automatically with the main project (BUILD_TESTING=ON by default):

cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)        # Linux
cmake --build build -j$(sysctl -n hw.ncpu)  # macOS
cd build && ctest --output-on-failure

On Windows with MSVC:

cmake -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release
cmake --build build
cd build && ctest --output-on-failure

On headless Linux (CI), set QT_QPA_PLATFORM=offscreen because tests use QApplication.

Development Workflow

  1. Fork the repository
  2. Create a feature branch from master
  3. Make your changes
  4. Ensure tests pass
  5. Open a pull request

Commit Messages

This project uses Conventional Commits. Your PR title must follow this format:

type(optional scope): description

Examples:

  • feat: add bzip2 progress reporting
  • fix: handle empty encrypted files
  • docs: update build instructions for Qt 6

Allowed types: feat, fix, chore, docs, test, refactor, build, ci

Code Style

This project uses clang-format to enforce a consistent code style. The configuration is in .clang-format at the repo root.

Automatic formatting (recommended)

Install the pre-commit framework:

pip install pre-commit
pre-commit install

This automatically formats your code on every git commit. If formatting changes are needed, the commit is aborted and the files are reformatted. Stage the reformatted files and commit again.

Manual formatting

find src tests \( -name '*.cpp' -o -name '*.h' \) | xargs clang-format -i

CI will reject PRs with style violations regardless of which method you use.

Testing

All new functionality should include tests. Tests use the Qt Test framework.

Test files live in tests/ and follow the naming convention tst_<module>.cpp.

PR Guidelines

  • Use conventional commit format for your PR title
  • Fill out the PR template checklist
  • Ensure CI passes on all platforms (Linux, macOS, Windows)
  • Link related issues using Fixes #123 syntax

Reporting Bugs

Use the Bug Report issue template.

Requesting Features

Use the Feature Request issue template.

Questions?

Open a discussion in GitHub Discussions.