Skip to content

Commit

Permalink
bump clang-format to clang-15
Browse files Browse the repository at this point in the history
clang 11 was released in 2007, and the last variant of Ubuntu with the
clang-format-11 package is 22.04.

This bumps the clang-format used for the formatting check to clang 15,
available with 24.04.
  • Loading branch information
kroening committed Jan 10, 2025
1 parent 36b2335 commit aacfebe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/syntax-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
# This job takes approximately 1 minute
check-clang-format:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -19,7 +19,7 @@ jobs:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -yq clang-format-11
sudo apt-get install --no-install-recommends -yq clang-format-15
- name: Check updated lines of code match clang-format-11 style
env:
BASE_BRANCH: ${{ github.base_ref }}
Expand Down
11 changes: 5 additions & 6 deletions CODING_STANDARD.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,13 +341,12 @@ To avoid waiting until you've made a PR to find formatting issues, you can
install clang-format locally and run it against your code as you are working.

Different versions of clang-format have slightly different behaviors. CBMC uses
clang-format-11 as it is available the repositories for Ubuntu 20.04 and
Homebrew.
To install on a Unix-like system, try installing using the system package
manager:
clang-format-15, available in the standard Ubuntu 24.04 and Homebrew
repositories. To install on a Unix-like system, try installing using the
system package manager:
```
apt-get install clang-format-11 # Run this on Ubuntu, Debian etc.
brew install clang-format@11 # Run this on a Mac with Homebrew installed
apt-get install clang-format-15 # Run this on Ubuntu, Debian etc.
brew install clang-format # Run this on a Mac with Homebrew installed
```

If your platform doesn't have a package for clang-format, you can download a
Expand Down

0 comments on commit aacfebe

Please sign in to comment.