Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/__call-common-lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# This workflow will lint the code in the repository using various tools. Most linting tools in LizardByte
# should be included in this workflow; however there are cases where that is not true, such as with eslint.
# should be included in this workflow; however, there are cases where that is not true, such as with eslint.

name: common lint (called)
permissions:
Expand All @@ -20,6 +20,8 @@ jobs:
lint:
name: Common Lint
runs-on: ubuntu-latest
env:
CLANG_FORMAT_VERSION: 20
steps:
- name: Checkout
uses: actions/checkout@v5
Expand Down Expand Up @@ -74,7 +76,7 @@ jobs:
run: |
# shellcheck disable=SC2102 # this is triggered by the [toolchain] extra
python -m pip install --upgrade \
clang-format \
"clang-format==${CLANG_FORMAT_VERSION}.*" \
pip \
setuptools \
wheel \
Expand Down Expand Up @@ -162,17 +164,18 @@ jobs:
echo found_files=${found_files} >> "${GITHUB_OUTPUT}"

- name: C++ - Clang format (diff)
id: clang_format_diff
if: always() && steps.cpp_files.outputs.found_files
uses: DoozyX/clang-format-lint-action@v0.20
with:
source: ${{ steps.cpp_files.outputs.found_files }}
clangFormatVersion: '20'
clangFormatVersion: '${{ env.CLANG_FORMAT_VERSION }}'
extensions: 'c,cpp,h,hpp,m,mm'
style: file
inplace: false

- name: C++ - Clang format (simple)
if: always() && steps.cpp_files.outputs.found_files
if: always() && steps.clang_format_diff.outcome == 'failure'
run: |
echo "::add-matcher::.github/matchers/clang-format.json"
set +e
Expand Down