Skip to content

grt: Add use of DRT access points to CUGR #17691

grt: Add use of DRT access points to CUGR

grt: Add use of DRT access points to CUGR #17691

name: Format Code with pre commit trigger
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
Clang-Format:
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }}
steps:
- name: Check out repository code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v47
- name: Check format of cpp changed files
run: |
clang-format --version
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
if [[ "${file##*.}" =~ ^(h|C|cc|cp|cpp|c++|CPP|cxx|hh)$ && "${file}" != "src/sta/"* && "${file}" != "src/odb/src/codeGenerator/"* ]]; then
clang-format --dry-run --Werror $file
fi
done