Skip to content

Qcir adjoint

Qcir adjoint #102

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/[email protected]
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/[email protected]
# with:
# source: './src'
# exclude: './vender ./tests'
# extensions: 'h,cpp'
# clangFormatVersion: 15
# style: '.clang-format'