Story: Set up clang-format with CMake targets and CI integration

Table of Contents

This page documents a story in Sprint 19. It captures the goal, current status, acceptance criteria, and the tasks that compose it.

Goal

The codebase has an existing .clang-format file (copied verbatim from QuantLib) that is wrong for ORE Studio: Standard: c++14 instead of c++23, QuantLib-specific include ordering, and no enforcement whatsoever. The goal is a correctly tuned config, CMake targets to format locally, and a nightly GitHub Actions workflow that raises a format-only PR whenever drift is detected — so formatting is corrected continuously without blocking PRs.

Status

Field Value
State DONE
Parent sprint Sprint 19
Now Nothing.
Waiting on Nothing.
Next Nothing.
Last touched 2026-06-04

Acceptance

  • .clang-format uses Standard: c++23, ORE Studio include ordering (ores.* local → Qt → Boost → std), and settings that match the existing code conventions.
  • CMake format target runs clang-format in-place on all projects/ C++ sources.
  • CMake check-format target runs clang-format --dry-run and exits non-zero if any file would change.
  • A nightly GH Actions workflow runs check-format and — if files differ — commits the formatted result and raises a PR titled [format] Nightly clang-format run.
  • An initial format pass PR is merged, cleaning up the existing drift across the codebase.

Tasks

Task State Start End Description
Fix .clang-format config for ORE Studio conventions BACKLOG     Update Standard to c++23, fix include ordering, tune to match actual code style.
Add CMake format and check-format targets BACKLOG     format target runs in-place; check-format is a dry-run gate for CI/local use.
Add nightly GH Actions format workflow + initial format pass DONE 2026-06-04 2026-06-04 Nightly workflow raises a PR on drift; run initial pass to clean up the tree.
Format pass: logging, service, storage, geo, fpml, codegen DONE 2026-06-04 2026-06-05 Group 1 — 51 files.
Format pass: platform, utility, nats, eventing, security, testing DONE 2026-06-04 2026-06-05 Group 2 — 123 files.
Format pass: connections, database, workspace, variability DONE 2026-06-04 2026-06-05 Group 3 — 163 files.
Format pass: http, shell, wt.service DONE 2026-06-04 2026-06-05 Group 4 — 126 files.
Format pass: analytics, scheduler, workflow, synthetic DONE 2026-06-04 2026-06-05 Group 5 — 170 files.
Format pass: assets, marketdata, telemetry, controller DONE 2026-06-04 2026-06-05 Group 6 — 314 files.
Format pass: iam DONE 2026-06-04 2026-06-05 Group 7 — 277 files.
Format pass: compute, reporting, cli DONE 2026-06-04 2026-06-05 Group 8 — 464 files.
Format pass: ore DONE 2026-06-04 2026-06-05 Group 9 — 139 files.
Format pass: dq DONE 2026-06-04 2026-06-05 Group 10 — 433 files.
Format pass: refdata DONE 2026-06-04 2026-06-05 Group 11 — 723 files.
Format pass: trading DONE 2026-06-04 2026-06-05 Group 12 — 769 files.
Format pass: qt DONE 2026-06-04 2026-06-05 Group 13 — 1014 files.

Decisions

Out of scope

  • Per-PR blocking format gate (revisit once nightly PRs go silent).
  • Wt / Python / SQL formatting (C++ only for now).
  • clang-tidy static analysis — separate story; filed as capture.

Emacs 29.1 (Org mode 9.6.6)