Skip to content

ci: exclude vendored nlohmann sources from the clang-format lint - #2594

Merged
ronaldtse merged 1 commit into
mainfrom
fix/lint-ignore-vendored
Nov 25, 2026
Merged

ronaldtse merged 1 commit into
mainfrom
fix/lint-ignore-vendored

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Summary

The clang-format lint job on main has been failing since the vendored nlohmann single headers (json.hpp, json_fwd.hpp) entered the action's file walk with the json migration. The action's exclude parameter matches paths with fnmatch, so the previous pattern without a wildcard never matched anything.

Two changes:

  • A .clang-format-ignore file excludes the vendored nlohmann sources and the libsexpp submodule from formatting checks, so upstream formatting drift in vendored trees cannot fail this repository's lint.
  • The workflow's exclude pattern gains the wildcard so the parameter works as documented.

Verified locally with clang-format 11.1.0 (the CI version): with the ignore file, a sweep over all first-party sources, submodule sources and vendored headers reports no unformatted files.

Test plan

  • Local clang-format 11.1.0 sweep over src, include, src/common, src/libsexpp and src/lib/nlohmann passes with the ignore file in place.
  • fnmatch verification of both the ignore pattern and the corrected workflow exclude against the vendored header paths.

The clang-format lint began failing on the vendored nlohmann single
headers, which entered the action's file walk with the json migration.
The action's exclude parameter matches paths with fnmatch, so the
pattern needs a wildcard; a .clang-format-ignore file adds the same
exclusion for the vendored sources together with the libsexpp
submodule.
@ronaldtse
ronaldtse merged commit 468cdab into main Nov 25, 2026
117 of 147 checks passed
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