ci: upgrade clang-format check to v18 (Ubuntu 24.04)#1723
Open
summeroff wants to merge 2 commits into
Open
Conversation
Move the clang-format CI from clang-format-13 (Ubuntu 22.04) to clang-format-18 (Ubuntu 24.04, preinstalled) to match the clang-format bundled with Visual Studio 2022, the primary build toolchain. Use command -v instead of type for discovery so a successful lookup no longer prints to stdout in CI logs. Reformat controller.cpp, utility.hpp, nodeobs_display.cpp and nodeobs_display.h to satisfy clang-format-18 (stream-chain join, macro reflow, empty-body collapse, cast spacing). No functional changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Upgrades the clang-format CI check to use clang-format 18 on Ubuntu 24.04 to reduce formatting drift between developer environments (VS 2022/clang-format 19) and CI.
Changes:
- Update the GitHub Actions clang-format workflow to run on
ubuntu-24.04and installclang-format-18. - Update
ci/check-format.shto discover/require clang-format 18 and usecommand -vfor quieter detection. - Apply clang-format-18-driven reformatting to a small set of C/C++ source/header files (no functional changes intended).
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/clang-format.yml |
Moves the formatting job to Ubuntu 24.04 and installs clang-format-18. |
ci/check-format.sh |
Updates clang-format discovery/version gating to major version 18 and reduces log noise. |
obs-studio-client/source/controller.cpp |
Formatting-only change to command-line stream concatenation. |
obs-studio-client/source/utility.hpp |
Formatting-only reflow of macro bodies to match clang-format 18 output. |
obs-studio-server/source/nodeobs_display.cpp |
Formatting-only: collapses an empty struct definition. |
obs-studio-server/source/nodeobs_display.h |
Formatting-only: adjusts cast spacing in a Win32 macro. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
sandboxcoder
approved these changes
Jun 3, 2026
Advance the lib-streamlabs-ipc submodule 0f7acbb -> dbb7fdd, pulling in streamlabs/lib-streamlabs-ipc#59 (the companion clang-format-18 CI upgrade + reformat). Formatting-only on the IPC side; no functional change to osn. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
aleksandr-voitenko
approved these changes
Jun 11, 2026
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.
What
Upgrade obs-studio-node's clang-format CI from clang-format-13 (Ubuntu 22.04) to clang-format-18 (Ubuntu 24.04), and bump the
lib-streamlabs-ipcsubmodule to the merged companion change.Why
Dev machines build with Visual Studio 2022, which bundles clang-format 19; CI pinned to clang-format-13 caused local-vs-CI formatting drift. clang-format-18 is preinstalled on the
ubuntu-24.04runner (18.1.3), closing most of the gap with no extra install tooling.Companion to streamlabs/lib-streamlabs-ipc#59 (same upgrade for the IPC submodule) — now merged and pulled in here.
Changes
.github/workflows/clang-format.yml: runnerubuntu-22.04->ubuntu-24.04; installclang-format-18.ci/check-format.sh: clang-format discovery + version gate13->18; usecommand -vinstead oftype(no stdout noise in CI logs).controller.cpp,utility.hpp,nodeobs_display.cpp,nodeobs_display.hto satisfy clang-format-18 (stream-chain join, macro reflow, empty-body collapse, cast spacing). No functional changes.lib-streamlabs-ipcsubmodule0f7acbb->dbb7fdd(ci: upgrade clang-format check to v18 (Ubuntu 24.04) lib-streamlabs-ipc#59). This is exactly one commit ahead on thestreamlabsline — the merged companion upgrade — and is formatting-only on the IPC side, so osn builds identically.Notes
git ls-files --modified, which does not flag dirty submodule content, so the submodule bump is not required for this PR's clang-format CI to pass — the IPC tree's formatting is owned by its own CI (Ipc integration #59). The bump is included to keep osn's vendored IPC in lockstep with the merged companion change, not for CI reasons..gitmodulesentry still declaresbranch = master, butmasteris a stale/legacy branch (49 commits behind) and the pinned commits live on the defaultstreamlabsline. Correcting that stalebranchfield is out of scope here; flagging as follow-up.Verification
Formatted all 241 osn source files with clang-format 18.1.3 (the runner's exact build); only the 4 listed files changed and zero residual remained, so
check-format.sh/check-changes.shpass. Submodule bump verified as a single-commit advance (0f7acbb..dbb7fdd= #59 only) viagit diff --submodule=log.