[CI] Using clang-17 for clang tidy & format (#35595)

Clang-17 is now better at formatting. Clang-16 used to do some questionable formatting.

Closes #35595

PiperOrigin-RevId: 600829055
pull/35639/head
Esun Kim 10 months ago committed by Copybara-Service
parent 9c94059036
commit af95eafb34
  1. 7
      .clang-tidy
  2. 2
      templates/tools/dockerfile/grpc_clang_format/Dockerfile.template
  3. 2
      templates/tools/dockerfile/grpc_clang_tidy/Dockerfile.template
  4. 7
      templates/tools/dockerfile/test/sanity/Dockerfile.template
  5. 2
      tools/bazelify_tests/dockerimage_current_versions.bzl
  6. 2
      tools/dockerfile/grpc_clang_format/Dockerfile
  7. 2
      tools/dockerfile/grpc_clang_tidy/Dockerfile
  8. 2
      tools/dockerfile/test/sanity.current_version
  9. 7
      tools/dockerfile/test/sanity/Dockerfile

@ -32,6 +32,7 @@
# - bugprone-not-null-terminated-result
# - bugprone-signed-char-misuse
# - bugprone-sizeof-expression
# - bugprone-switch-missing-default-case
# - bugprone-too-small-loop-variable
# - bugprone-unchecked-optional-access
# - clang-diagnostic-deprecated-declarations
@ -50,8 +51,10 @@
# - modernize-use-equals-default
# - modernize-use-equals-delete
# - modernize-use-using
# - performance-avoid-endl
# - performance-no-automatic-move
# - performance-no-int-to-ptr
# - performance-noexcept-swap
# - performance-unnecessary-copy-initialization
# - performance-unnecessary-value-param
# - readability-else-after-return
@ -67,6 +70,7 @@ Checks: '-*,
-bugprone-assignment-in-if-condition,
-bugprone-branch-clone,
-bugprone-easily-swappable-parameters,
-bugprone-empty-catch,
-bugprone-exception-escape,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-infinite-loop,
@ -75,6 +79,7 @@ Checks: '-*,
-bugprone-reserved-identifier,
-bugprone-signed-char-misuse,
-bugprone-sizeof-expression,
-bugprone-switch-missing-default-case,
-bugprone-too-small-loop-variable,
-bugprone-unchecked-optional-access,
google-*,
@ -82,8 +87,10 @@ Checks: '-*,
-google-runtime-int,
-google-runtime-references,
performance-*,
-performance-avoid-endl,
-performance-no-automatic-move,
-performance-no-int-to-ptr,
-performance-noexcept-swap,
-performance-unnecessary-copy-initialization,
-performance-unnecessary-value-param,
clang-diagnostic-deprecated-declarations,

@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM silkeh/clang:16-bullseye
FROM silkeh/clang:17-bullseye
ADD clang_format_all_the_things.sh /

@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM silkeh/clang:16-bullseye
FROM silkeh/clang:17-bullseye
# Install prerequisites for the clang-tidy script
RUN apt-get update && apt-get install -y python3 jq git && apt-get clean

@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM silkeh/clang:16-bullseye
FROM silkeh/clang:17-bullseye
<%include file="../../apt_get_basic.include"/>
@ -52,10 +52,7 @@
RUN python3 -m pip install --upgrade --ignore-installed PyYAML==5.4.1 --user
# Install prerequisites for the clang-tidy script
RUN apt-get update && apt-get install -y jq git
# Install prerequisites for the iwyu script
RUN apt-get update && apt-get install -y jq git cmake zlib1g-dev libtinfo-dev libclang-16-dev && apt-get clean
RUN apt-get update && apt-get install -y jq git && apt-get clean
<%include file="../../bazel.include"/>
<%include file="../../buildifier.include"/>

@ -111,5 +111,5 @@ DOCKERIMAGE_CURRENT_VERSIONS = {
"tools/dockerfile/test/rbe_ubuntu2004.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/rbe_ubuntu2004@sha256:d3951aeadf43e3bee6adc5b86d26cdaf0b9d1b5baf790d7b2530d1c197adc9f8",
"tools/dockerfile/test/ruby_debian11_arm64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_arm64@sha256:7e77cf17e2e8657f4cc23ac9f93630bf13213fff961799e0f16dae17cd45cf6d",
"tools/dockerfile/test/ruby_debian11_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64@sha256:e4cb502caccf2db733268ce2ddc951fda8a9df2f7f53d6b74523c33d40c83006",
"tools/dockerfile/test/sanity.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/sanity@sha256:f1f5ca30491698f793cae75d5989cb53887d159800aef662cf7e6c3df6f86a88",
"tools/dockerfile/test/sanity.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/sanity@sha256:ca65b29302e8e381aabf9deb1952281f4e9963654e19c3d681148b5aa972c8a2",
}

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM silkeh/clang:16-bullseye
FROM silkeh/clang:17-bullseye
ADD clang_format_all_the_things.sh /

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM silkeh/clang:16-bullseye
FROM silkeh/clang:17-bullseye
# Install prerequisites for the clang-tidy script
RUN apt-get update && apt-get install -y python3 jq git && apt-get clean

@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/sanity:091d8e85bebb7b9f089178ae96435926cdc82fb8@sha256:f1f5ca30491698f793cae75d5989cb53887d159800aef662cf7e6c3df6f86a88
us-docker.pkg.dev/grpc-testing/testing-images-public/sanity:2d20232b40465f3487deef87274f4bfd7122b201@sha256:ca65b29302e8e381aabf9deb1952281f4e9963654e19c3d681148b5aa972c8a2

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM silkeh/clang:16-bullseye
FROM silkeh/clang:17-bullseye
#=================
# Basic C core dependencies
@ -102,10 +102,7 @@ RUN python3 -m pip install simplejson mako virtualenv==16.7.9 lxml six
RUN python3 -m pip install --upgrade --ignore-installed PyYAML==5.4.1 --user
# Install prerequisites for the clang-tidy script
RUN apt-get update && apt-get install -y jq git
# Install prerequisites for the iwyu script
RUN apt-get update && apt-get install -y jq git cmake zlib1g-dev libtinfo-dev libclang-16-dev && apt-get clean
RUN apt-get update && apt-get install -y jq git && apt-get clean
#========================
# Bazel installation

Loading…
Cancel
Save