Skip to content

Commit 80b2aac

Browse files
[Github] Make PR formatting job only run with C/C++ changes (#69556)
Currently the PR formatting job only runs clang-format. There isn't a lot of utility in running it if there aren't any C/C++ changes as there will be nothing to format. This isn't super noisy currently as the job doesn't fail if there aren't any C/C++ changes, but it's a bit of a waste. In addition, this patch names the code formatting job "Check C++ Formatting" to make it clear that this job only checks C/C++ formatting rather than Python formatting/other languages.
1 parent 1be3b1e commit 80b2aac

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/pr-code-format.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
name: "Check code formatting"
2-
on: pull_request_target
2+
3+
on:
4+
pull_request_target:
5+
paths:
6+
- '**/*.cpp'
7+
- '**/*.c'
8+
- '**/*.h'
9+
- '**/*.inc'
10+
311
permissions:
412
pull-requests: write
513

614
jobs:
7-
code_formatter:
15+
cpp_code_formatter:
16+
name: "Check C++ Formatting"
817
runs-on: ubuntu-latest
918
steps:
1019
- name: Fetch LLVM sources

0 commit comments

Comments
 (0)