CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
97 lines
3.5 KiB
C++
97 lines
3.5 KiB
C++
// RUN: rm -rf %t.dir
|
|
// RUN: mkdir -p %t.dir/level1/level2
|
|
|
|
// RUN: cd %t.dir
|
|
// RUN: echo "*" > .clang-format-ignore
|
|
// RUN: echo "level*/*.c*" >> .clang-format-ignore
|
|
// RUN: echo "*/*2/foo.*" >> .clang-format-ignore
|
|
// RUN: touch foo.cc
|
|
// RUN: clang-format -verbose .clang-format-ignore foo.cc 2>&1 \
|
|
// RUN: | FileCheck %s -allow-empty
|
|
|
|
// RUN: cd level1
|
|
// RUN: touch bar.cc baz.c
|
|
// RUN: clang-format -verbose bar.cc baz.c 2>&1 | FileCheck %s -allow-empty
|
|
|
|
// RUN: cd level2
|
|
// RUN: touch foo.c foo.js
|
|
// RUN: clang-format -verbose foo.c foo.js 2>&1 | FileCheck %s -allow-empty
|
|
|
|
// CHECK-NOT: Formatting
|
|
|
|
// RUN: touch .clang-format-ignore
|
|
// RUN: clang-format -verbose foo.c foo.js 2>&1 \
|
|
// RUN: | FileCheck %s -check-prefix=CHECK2 -match-full-lines
|
|
// CHECK2: Formatting [1/2] foo.c
|
|
// CHECK2-NEXT: Formatting [2/2] foo.js
|
|
|
|
// RUN: echo "*.js" > .clang-format-ignore
|
|
// RUN: clang-format -verbose foo.c foo.js 2>&1 \
|
|
// RUN: | FileCheck %s -check-prefix=CHECK3 -match-full-lines
|
|
// CHECK3: Formatting [1/2] foo.c
|
|
// CHECK3-NOT: foo.js
|
|
|
|
// RUN: cd ../..
|
|
// RUN: clang-format -verbose *.cc level1/*.c* level1/level2/foo.* 2>&1 \
|
|
// RUN: | FileCheck %s -check-prefix=CHECK4 -match-full-lines
|
|
// CHECK4: {{Formatting \[1/5] .*foo\.c}}
|
|
// CHECK4-NOT: foo.js
|
|
|
|
// RUN: rm .clang-format-ignore
|
|
// RUN: clang-format -verbose *.cc level1/*.c* level1/level2/foo.* 2>&1 \
|
|
// RUN: | FileCheck %s -check-prefix=CHECK5 -match-full-lines
|
|
// CHECK5: {{Formatting \[1/5] .*foo\.cc}}
|
|
// CHECK5-NEXT: {{Formatting \[2/5] .*bar\.cc}}
|
|
// CHECK5-NEXT: {{Formatting \[3/5] .*baz\.c}}
|
|
// CHECK5-NEXT: {{Formatting \[4/5] .*foo\.c}}
|
|
// CHECK5-NOT: foo.js
|
|
|
|
// Check that ignored files are unformatted, but still output.
|
|
// RUN: echo "foo.*" > .clang-format-ignore
|
|
// RUN: echo "int i ;" > foo.c
|
|
// RUN: clang-format -assume-filename=foo.c < foo.c | diff foo.c -
|
|
// RUN: clang-format -assume-filename=bar.c < foo.c \
|
|
// RUN: | FileCheck %s -check-prefix=CHECK6 -match-full-lines
|
|
// CHECK6: int i;
|
|
|
|
// RUN: echo "foo.h" > .clang-format-ignore
|
|
// RUN: echo "!foo.c" >> .clang-format-ignore
|
|
// RUN: echo "int i ;" > foo.c
|
|
// RUN: echo "int i ;" > foo.h
|
|
// RUN: clang-format -verbose foo.c 2>&1 \
|
|
// RUN: | FileCheck %s -check-prefix=CHECK7 -match-full-lines
|
|
// CHECK7: Formatting [1/1] foo.c
|
|
// RUN: clang-format -verbose foo.h 2>&1 \
|
|
// RUN: | FileCheck %s -check-prefix=CHECK8 -allow-empty
|
|
// CHECK8-NOT: int
|
|
|
|
// RUN: mkdir -p %t.dir/ignore.dir/format.dir
|
|
// RUN: echo "ignore.dir/*" > .clang-format-ignore
|
|
// RUN: echo "!ignore.dir/format.dir/*" >> .clang-format-ignore
|
|
// RUN: echo "int i ;" > ignore.dir/foo.c
|
|
// RUN: echo "int i ;" > ignore.dir/format.dir/bar.c
|
|
// RUN: clang-format -verbose ignore.dir/**/*.c 2>&1 \
|
|
// RUN: | FileCheck %s -check-prefix=CHECK9 -match-full-lines
|
|
// CHECK9: {{Formatting \[1/1] .*ignore\.dir[/\\]format\.dir[/\\]bar\.c}}
|
|
|
|
// RUN: echo "foo.*" > .clang-format-ignore
|
|
// RUN: clang-format -verbose foo.c 2>&1 \
|
|
// RUN: | FileCheck %s -check-prefix=CHECK10 -allow-empty
|
|
// CHECK10-NOT: int
|
|
// RUN: echo "!foo.c" >> .clang-format-ignore
|
|
// RUN: clang-format -verbose foo.c 2>&1 \
|
|
// RUN: | FileCheck %s -check-prefix=CHECK11 -match-full-lines
|
|
// CHECK11: Formatting [1/1] foo.c
|
|
|
|
// RUN: echo "!foo.*" > .clang-format-ignore
|
|
// RUN: clang-format -verbose foo.c 2>&1 \
|
|
// RUN: | FileCheck %s -check-prefix=CHECK12 -match-full-lines
|
|
// CHECK12: Formatting [1/1] foo.c
|
|
// RUN: echo "foo.c" >> .clang-format-ignore
|
|
// RUN: clang-format -verbose foo.c 2>&1 \
|
|
// RUN: | FileCheck %s -check-prefix=CHECK13 -allow-empty
|
|
// CHECK13-NOT: int
|
|
|
|
// RUN: cd ..
|
|
// RUN: rm -r %t.dir
|