Skip to content

馃敄 v0.7.0

馃敄 v0.7.0 #288

Workflow file for this run

name: Lint
on:
push:
branches: [main, develop]
pull_request:
types: [opened, synchronize, reopened]
branches: [main, develop]
jobs:
run-linters:
name: Run linters
runs-on: ubuntu-22.04
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: run clang-format
uses: DoozyX/clang-format-lint-action@v0.16.2
with:
sources: "./src"
exclude: "./vendor ./tests"
extensions: "h,cpp,hpp,tpp"
clangFormatVersion: 16
# - name: clang-format lint
# run: |
# clang-format-16 --version
# mkdir -p tmp_
# find ./src -type d | xargs -I {} mkdir -p tmp_/{}
# find ./src -regex ".*\.\(h\|cpp\)" -type f | xargs -I {} sh -c 'cp "$1" tmp_/"$1"' -- {}
# cp .clang-format tmp_
# cd tmp_
# find ./src -regex ".*\.\(h\|cpp\)" -type f | xargs -I {} sh -c 'clang-format-16 "$1" > "$1"\ \(Reformatted\)' -- {}
# find ./src -regex ".*\.\(h\|cpp\)" -type f | xargs -I {} sh -c 'cp "$1" "$1"\ \(Original\)' -- {}
# find . -regex ".*\.\(h\|cpp\)" -type f | xargs -I {} sh -c 'colordiff -u "$1"\ \(Original\) "$1"\ \(Reformatted\)' -- {}
# cd ..
# rm -rf tmp_
# uses: DoozyX/clang-format-lint-action@v0.15
# with:
# source: './src'
# exclude: './vender ./tests'
# extensions: 'h,cpp'
# clangFormatVersion: 15
# style: '.clang-format'