Skip to content

Commit

Permalink
Use different clang tool versions for different taskss.
Browse files Browse the repository at this point in the history
  * clang-format : use version 17, as 18 seems to have
    slight differences between microversions.
  * clang-tidy: use latest 18
  • Loading branch information
hzeller committed Nov 23, 2024
1 parent 7850f77 commit 095cd2e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ verible_used_stdenv.mkDerivation {
lcov # coverage html generation.
bazel-buildtools # buildifier

clang-tools_17 # For clang-tidy; clangd
clang-tools_18 # for clang-tidy
clang-tools_17 # for clang-format
];
shellHook = ''
# clang tidy: use latest.
export CLANG_TIDY=${pkgs.clang-tools_18}/bin/clang-tidy
# There is too much volatility between even micro-versions of
# clang-format 18. Let's use 17 for now.
export CLANG_FORMAT=${pkgs.clang-tools_17}/bin/clang-format
'';
}

0 comments on commit 095cd2e

Please sign in to comment.