diff --git a/.clang-format b/.clang-format index f1cfdc9..aedca32 100644 --- a/.clang-format +++ b/.clang-format @@ -63,3 +63,12 @@ IncludeCategories: # This project: quoted includes - Regex: '^".*"$' Priority: 4 + +# Min-DevKit declarative DSL (Max/Min externals: TapTools, AmbiTap-Max, ...). +# MIN_FUNCTION / MIN_ARGUMENT_FUNCTION expand to a lambda; teach clang-format +# their shape so attribute/message/argument setter bodies format as lambda +# blocks instead of being shredded. Completely inert for repos that don't use +# these macros (the pure-C++ libraries). Requires clang-format >= 15. +Macros: + - 'MIN_FUNCTION=[](const atoms& args, int inlet) -> atoms' + - 'MIN_ARGUMENT_FUNCTION=[](const atom& arg, int index) -> void' diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 850d406..f6a23ec 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -7,9 +7,9 @@ on: [push, pull_request] jobs: drift: - uses: tap/taphouse/.github/workflows/drift-check.yml@v1 + uses: tap/taphouse/.github/workflows/drift-check.yml@v2 with: - ref: v1 + ref: v2 clang-tidy: runs-on: ubuntu-latest diff --git a/STYLE.md b/STYLE.md index fe70fba..ebfcf54 100644 --- a/STYLE.md +++ b/STYLE.md @@ -50,6 +50,20 @@ member/parameter collision, and prefixes would clutter the public signatures that *are* the library's contract. Lean on `const` and small functions for input/local clarity. +**Repo exception — OscTap (drop-in legacy continuation).** OscTap continues +[oscpack](http://www.rossbencina.com/code/oscpack) as a *drop-in +source-compatible* successor: its public API keeps oscpack's original +identifiers — PascalCase types and methods (`ReceivedMessage`, +`OutboundPacketStream`, `BeginBundle()`, `AsFloat()`) and trailing-underscore +data members (`size_`, `value_`). Renaming these to the house `snake_case`/`m_` +scheme would break the source compatibility that is the library's reason to +exist. OscTap therefore adopts the **layout** rules (`.clang-format`) in full +but is **exempt from the naming rules** (`readability-identifier-naming`): it +ships a local `.clang-tidy` that disables that check while keeping mandatory +braces, and its CI runs a format-only style gate instead of the shared +`drift-check.yml`. The exemption is specific to legacy-continuation repos; +greenfield `*Tap` code follows the naming rules above. + ## 2. Layout - **Indent:** 4 spaces, including inside namespaces.