Standardize on `clang-format` version
Closed this issue · 4 comments
Our dev-tools code style check currently uses either clang-format-12
or clang-format-13
, depending on the platform you run on:
dev-tools/check-code-style/action.yml
Lines 18 to 40 in 226b31d
Additionally, our internal codespaces currently have clang-format-13
installed.
Let's make this less confusing by standardizing on one version everywhere (maybe `clang-format-13)
(@while-false was confusing formatting errors that were only happening on the GitHub Actions Runner but weren't reproducing on his codespace)
@stephaniepalocz FYI
FYI, here's how we install clang-format-13
on our internal codespaces: https://github.com/reboot-dev/respect/blob/33636cab2e71654663d7ed9a17a0d3ce6caa8214/.devcontainer/Dockerfile#L54-L65
Here is how llvm thinks we should install it (which the Dockerfile
was inspired by): https://apt.llvm.org/ (see the section Install (stable branch))
It turns out this clang-format
version mismatch was exactly what was causing the errors that @while-false was seeing: locally running clang-format-13
produced no errors, but running clang-format-12
on the same code (which is what the GitHub Actions Runners were running) produced errors.
So yes, let's standardize on one version :)
@while-false I spent a bit of time on this and threw up #53, but was having some trouble getting it tested in context via https://github.com/reboot-dev/respect/pull/548 (something something submodule sync gone wrong). Please feel free to adopt these PRs as you find it helpful, or just make your own, or leave it for me to finish up in the morning.