Unverified Commit 80b2aac2 authored by Grossman, Aiden Michael's avatar Grossman, Aiden Michael Committed by GitHub
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.
parent 1be3b1ef
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
name: "Check code formatting"
on: pull_request_target

on:
  pull_request_target:
    paths:
      - '**/*.cpp'
      - '**/*.c'
      - '**/*.h'
      - '**/*.inc'

permissions:
  pull-requests: write

jobs:
  code_formatter:
  cpp_code_formatter:
    name: "Check C++ Formatting"
    runs-on: ubuntu-latest
    steps:
      - name: Fetch LLVM sources