Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Validate Query Test Case Formatting #1421

Validate Query Test Case Formatting

Validate Query Test Case Formatting #1421

name: Validate Query Test Case Formatting
on:
merge_group:
types: [checks_requested]
pull_request:
branches:
- main
- next
- "rc/**"
env:
XARGS_MAX_PROCS: 4
jobs:
validate-test-case-files:
runs-on: ubuntu-22.04
strategy:
matrix:
language: [cpp, c]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- name: Install clang-format
run: |
sudo apt-get install --yes --quiet --no-install-recommends clang-format
- name: Validating Current versus Expected Test Case Formatting
env:
LANGUAGE: ${{ matrix.language }}
# IMPORTANT: This step current relies on the fact that a file extension is the same as the language name for simplicity.
run: |
if ! test -f .clang-format; then
echo "Cannot find .clang-format in '$PWD'. Exiting..."
fi
find $LANGUAGE/*/test -name \*.$LANGUAGE -print0 | xargs -0 --max-procs "$XARGS_MAX_PROCS" clang-format --style=file -i --verbose
git diff
git diff --compact-summary
git diff --quiet
Morty Proxy This is a proxified and sanitized view of the page, visit original site.