{{ message }}
ci: adopt WasmEdge clang-format lint method (#45)#49
Merged
Conversation
Replace super-linter's bundled clang-format with upstream WasmEdge's own clang-format method, resolving the lint leftovers from import PR #44. - Add .github/scripts/clang-format.sh, mirroring upstream verbatim except targets="plugins" (the only first-party C/C++ tree in this repo). Scope excludes thirdparty/ and does not format-check test/, matching upstream policy -- which also covers the three paths that failed Lint on #44. - Add .github/workflows/clang-format.yml: installs a pinned clang-format-22 (the version current upstream master uses) and runs the script. Pinning the version removes the drift that caused #44's false failures. - Drop VALIDATE_CLANG_FORMAT from super-linter; it keeps markdown, yaml, commitlint, github-actions and gitleaks. All 347 in-scope plugins/ files are already clean under clang-format-22 (verified locally), so no reformatting commit is needed. Signed-off-by: Yi Huang <yi@secondstate.io> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
Author
Super-linter summaryAll files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
6 tasks
hydai
approved these changes
Jun 25, 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.

PR summary
Part of #45 (lint leftover from import PR #44): replaces super-linter's bundled clang-format with upstream WasmEdge's own clang-format method, so PRs stop failing clang-format on imported/generated/test paths and the clang-format version is pinned (no more drift). Supersedes #46, which used a super-linter
FILTER_REGEX_EXCLUDEworkaround.Implementation design
.github/scripts/clang-format.sh— copied from upstreamWasmEdge/WasmEdgeverbatim excepttargets="plugins"(the only first-party C/C++ tree in this repo). Lintsplugins/, pipes throughgrep -v "/thirdparty/", runsclang-format -Werror --dry-run.test/is intentionally not format-checked, matching upstream..github/workflows/clang-format.yml— installs a pinnedclang-format-22(the version current upstream master uses) from apt.llvm.org and runs the script. Mirrors upstream'sreusable-call-linter.ymlinstall steps, adapted to this repo's workflow conventions (pull_request → main,actions/checkout@v7, minimal permissions).super-linter.yml— dropVALIDATE_CLANG_FORMAT; super-linter keeps markdown, yaml, commitlint, github-actions, gitleaks.Design decisions
include lib tools plugins examplesminusthirdparty/, nevertest/, with a pinned clang-format. Mapping that to this repo (onlyplugins/is first-party) resolves all three feat: import plugin sources, tests, and CI utils from WasmEdge core #44 failures structurally —thirdparty/wasi_crypto/api.hpp(generated),test/plugins/wasm_bpf/assets/(fixtures), andtest/plugins/wasi_crypto/asymmetric.cpp(test code) all fall outside scope — and pins the version so drift can't recur.plugins/files are already clean under it, so no reformatting commit is needed..clang-formatalready matches upstream (BasedOnStyle: LLVM,IndentWidth: 2) — confirmed byte-identical, so there is no style-config divergence to reconcile.Commit slicing
Single commit:
ci: adopt WasmEdge clang-format lint method (#45).Test plan
bash .github/scripts/clang-format.sh "$(which clang-format-22)"exits0locally againstplugins/(347 files in scope, 0 reformatted).clang-formatconfirmed identical to upstream WasmEdgeclang-formatjob runs green (the workflow validates itself on this PR)Non-goals / afterwards
docs/IMPORTING.md) is a separate leftover, not in this PR🤖 Generated with Claude Code