Adopt Tap House layout rules (naming exempt)#23
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 byreadability-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-namingis 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 --Werrorover own sources), not the shareddrift-check.yml@v1— a naming-exempt repo can't keep the three configs byte-identical, so the drift check is deliberately not used..git-blame-ignore-revs."osc/…"/"ip/…", but theip/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: theoscpack/redirect shim tree (models the public include contract) andtests/CompatIncludeShim.cpp(the deprecated-path CI guard). This keeps.clang-formatbyte-identical to canonical.Why not full adoption
The canonical
.clang-tidynaming 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-inoscpackcompatibility promise. So layout is adopted; naming is exempted rather than enforced.Notes
winsock2.hbeforewindows.h; include-regroup would alphabetize and break the build, so those blocks are wrapped in// clang-format off/onguards.-Werror) and ran the fullctestsuite on the reformatted tree — 9/9 pass, includingCompatIncludeShim(confirming the deprecated<oscpack/...>path still resolves).clang-format-18 --dry-run --Werroris clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01MFv37taZQPMMcYG1haRcrk