Skip to content

Commit

Permalink
Merge pull request #7995 from diffblue/clang-format
Browse files Browse the repository at this point in the history
CODING_STANDARD.md: fix references to clang-format
  • Loading branch information
kroening authored Nov 5, 2023
2 parents fec1314 + d082399 commit 9238a38
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions CODING_STANDARD.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ Here a few minimalistic coding rules for the CPROVER source tree.

# Whitespaces

Formatting is enforced using clang-format. For more information about this, see
`COMPILING.md`. A brief summary of the formatting rules is given below:
Formatting is enforced using clang-format. For more information about this,
see the section "using clang-format" below. A brief summary of the
formatting rules is given below:

- Use 2 spaces indent, no tabs.
- No lines wider than 80 chars.
Expand Down Expand Up @@ -340,13 +341,13 @@ 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-10 as it is available the repositories for Ubuntu 18.04 and
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:
```
apt-get install clang-format-10 # Run this on Ubuntu, Debian etc.
brew install clang-format@10 # Run this on a Mac with Homebrew installed
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
```

If your platform doesn't have a package for clang-format, you can download a
Expand All @@ -373,7 +374,7 @@ rebase your work onto the tip of the branch it's based on before running
Note: By default, git-clang-format uses the git config variable
`clangformat.binary`. If you have multiple versions of clang-format installed,
you might need to update this, or explicitly specify the binary to use via
`--binary clang-format-10`.
`--binary clang-format-11`.

### RETROACTIVELY FORMATTING INDIVIDUAL COMMITS

Expand Down

0 comments on commit 9238a38

Please sign in to comment.