Skip to content

Adopt Tap House layout rules (naming exempt)#23

Merged
tap merged 5 commits into
mainfrom
claude/osctap-tap-house-rules-ncj7ze
Jul 17, 2026
Merged

Adopt Tap House layout rules (naming exempt)#23
tap merged 5 commits into
mainfrom
claude/osctap-tap-house-rules-ncj7ze

Conversation

@tap

@tap tap commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Brings OscTap into the Tap House Rules — the layout half only. OscTap is a drop-in source-compatible continuation of oscpack, so the house naming rules (snake_case/m_, enforced by readability-identifier-naming) cannot apply without renaming the public API and breaking the compatibility that is the library's reason to exist. This adopts the naming-agnostic layout rules and documents the naming exemption.

Companion PR documenting the exemption in the canonical style: tap/TapHouse#1.

What's in here

  • .clang-format — copied verbatim from TapHouse (layout in full: 4-space indent, attached braces, aligned columns, include regroup, 120 cols).
  • .clang-tidy — OscTap-local, intentionally diverging from canonical: readability-identifier-naming is disabled; mandatory braces (readability-braces-around-statements) are kept. A header comment explains the deviation.
  • STYLE.md — synced from TapHouse (includes the new OscTap naming exception).
  • .github/workflows/style.yml — a format-only gate (clang-format-18 --dry-run --Werror over own sources), not the shared drift-check.yml@v1 — a naming-exempt repo can't keep the three configs byte-identical, so the drift check is deliberately not used.
  • Bulk reformat of OscTap's own sources under the new style, as its own commit and recorded in .git-blame-ignore-revs.
  • Quoted includes for OscTap's own headers — OscTap was internally inconsistent (most sibling includes already used "osc/…"/"ip/…", but the ip/ backends still used <osctap/…>), which split its own headers across the third-party and project include groups. Converted the stragglers (osctap/ip/*.h, examples/OscDump.cpp) to quotes so all own-header includes group together and angle brackets are reserved for standard + third-party — matching the rest of the Tap family. Deliberately left angle-bracket: the oscpack/ redirect shim tree (models the public include contract) and tests/CompatIncludeShim.cpp (the deprecated-path CI guard). This keeps .clang-format byte-identical to canonical.

Why not full adoption

The canonical .clang-tidy naming check would flag essentially every symbol in the ~5,800-line, PascalCase oscpack-derived API (AsFloat(), BeginBundle(), OutboundPacketStream, size_/value_ members). Making it pass means a mass rename that breaks the drop-in oscpack compatibility promise. So layout is adopted; naming is exempted rather than enforced.

Notes

  • Winsock ordering: the win32 backends require winsock2.h before windows.h; include-regroup would alphabetize and break the build, so those blocks are wrapped in // clang-format off/on guards.
  • Verification: configured + built (gcc and clang, -Werror) and ran the full ctest suite on the reformatted tree — 9/9 pass, including CompatIncludeShim (confirming the deprecated <oscpack/...> path still resolves). clang-format-18 --dry-run --Werror is clean.
  • The reformat commit is mechanical only; no behavioural changes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MFv37taZQPMMcYG1haRcrk

claude added 5 commits July 11, 2026 02:27
OscTap is a drop-in source-compatible continuation of oscpack, so the house
NAMING rules cannot apply without breaking the API. Adopt the LAYOUT half:

- .clang-format: copied verbatim from TapHouse (layout in full).
- .clang-tidy: OscTap-local, with readability-identifier-naming DISABLED and
  mandatory braces kept; documents the deviation from the canonical config.
- STYLE.md: synced from TapHouse (includes the OscTap naming exception).
- .github/workflows/style.yml: format-only gate (clang-format-18 --dry-run
  --Werror) instead of the shared drift-check.yml, which a naming-exempt repo
  cannot satisfy.

Guard the win32 Winsock include blocks with clang-format off/on: winsock2.h
must precede windows.h, which include-regroup would otherwise alphabetize and
break the build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MFv37taZQPMMcYG1haRcrk
Mechanical reformat only (no behavioural change) applying the verbatim
.clang-format from the previous commit across OscTap's own sources. The win32
Winsock include blocks stay ordered via their clang-format off guards. Recorded
in .git-blame-ignore-revs so blame skips this commit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MFv37taZQPMMcYG1haRcrk
Point git blame past the mechanical clang-format commit so line history stays
attributed to the real changes. Enable locally with:
    git config blame.ignoreRevsFile .git-blame-ignore-revs

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MFv37taZQPMMcYG1haRcrk
OscTap was internally inconsistent: most sibling includes already used quotes
("osc/...", "ip/...") but the ip/ backends still used <osctap/...> angle
brackets. Under the Tap house include ordering (own headers = "this project"),
that split scattered OscTap's own headers across the third-party and project
groups. Convert the stragglers in osctap/ip/*.h and examples/OscDump.cpp to the
quoted form so all own-header includes sit in one group. Angle brackets are now
reserved for standard and genuinely third-party headers, matching the rest of
the Tap family.

Left as-is on purpose:
- oscpack/ redirect shim tree keeps <osctap/...> (it models the public include
  contract, forwarding old <oscpack/...> paths to the new prefix).
- tests/CompatIncludeShim.cpp keeps <oscpack/...> (deliberate CI guard for the
  deprecated include path).

Keeps .clang-format byte-identical to canonical. Verified: gcc + clang builds
(-Werror) and full ctest suite (9/9) green; clang-format gate clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MFv37taZQPMMcYG1haRcrk
Pull the v2 canonical .clang-format (adds the inert Min-DevKit Macros hints) so
OscTap's local copy stays byte-identical to canonical. OscTap uses none of the
Min macros, so the addition is inert: own sources stay clang-format-clean, no
reformat.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MFv37taZQPMMcYG1haRcrk
@tap
tap merged commit 527638c into main Jul 17, 2026
36 checks passed
@tap
tap deleted the claude/osctap-tap-house-rules-ncj7ze branch July 17, 2026 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants