Fix #12214 FN constParameterReference / #12216 FP constParameterRefer… #7987
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions | |
# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners | |
name: format | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'releases/**' | |
tags: | |
- '2.*' | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache uncrustify | |
uses: actions/cache@v3 | |
id: cache-uncrustify | |
with: | |
path: | | |
~/uncrustify | |
key: ${{ runner.os }}-uncrustify | |
- name: build uncrustify | |
if: steps.cache-uncrustify.outputs.cache-hit != 'true' | |
run: | | |
wget https://github.com/uncrustify/uncrustify/archive/refs/tags/uncrustify-0.72.0.tar.gz | |
tar xzvf uncrustify-0.72.0.tar.gz && cd uncrustify-uncrustify-0.72.0 | |
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release | |
cmake --build build -- -j$(nproc) -s | |
mkdir ~/uncrustify | |
cd build && cp uncrustify ~/uncrustify/ | |
- name: Uncrustify check | |
run: | | |
~/uncrustify/uncrustify -c .uncrustify.cfg -l CPP --no-backup --replace */*.cpp */*.h | |
git diff | |
git diff | diff - /dev/null &> /dev/null |