Skip to content

Commit d1133f8

Browse files
authored
Add clang-format version 18 to requirements.in (#1039)
Higher versions of `clang-format` produce different outputs than the version used to format what's currently in the repository. On a system where the developer installs a system package for clang-format (using, e.g., `apt install clang-format`), they may unknowingly get a different version than what was used to format the code in the repository. If they run `./scripts/format_all.sh` they may see many changes and not realize that it's due to a different in clang-format versions. Adding clang-format to `requirements.in` and regenerating `requirements.txt` is an easy way to get a known version of clang-format. Thankfully, requiring clang-format does not bring in other dependencies, so this ends up being a fairly surgical intervention.
1 parent 99d417d commit d1133f8

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

requirements.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ pylint==3.3.3
3535
nbformat==5.1.3
3636
nbclient==0.6.5
3737
tensorflow-docs
38+
clang-format~=18.1.0

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ cirq-core==1.5.0
3434
# cirq-google
3535
cirq-google==1.5.0
3636
# via -r requirements.in
37+
clang-format==18.1.8
38+
# via -r requirements.in
3739
contourpy==1.3.2
3840
# via
3941
# -r requirements.in

0 commit comments

Comments
 (0)