Repository navigation
Commit 90528fb
committed
feat: add a clang-format playground
A page at /playground/ where you paste C or C++ code, pick an LLVM
version from 16 to 23 and a style (a preset or your own .clang-format),
and see what clang-format changes as a diff or as the formatted file.
clang-format runs in the browser: the WebAssembly builds of the
@wasm-fmt/clang-format npm package are imported from jsDelivr, one per
version picked, so the code never leaves the page.
Below the result, the page shows the same check for the version and
style picked: the clang-tools commands, the cpp-linter-hooks entry and
the cpp-linter-action step. The URL hash keeps the code and settings,
so "Copy link" shares what is on screen.
The page is in the top navigation, the home page header and its footer.
scripts/update-versions.py now also updates the cpp-linter-hooks rev in
the playground's script.1 parent 78e0c77 commit 90528fb
8 files changed
Lines changed: 880 additions & 4 deletions
File tree
- docs
- javascripts
- overrides
- stylesheets
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
0 commit comments