Skip to content

Bug fixes & resolve warnings #168

Bug fixes & resolve warnings

Bug fixes & resolve warnings #168

Workflow file for this run

name: Lint
on:
pull_request:
branches:
- '**'
jobs:
cpplint:
runs-on: ubuntu-20.04
steps:
- name: Check git version
env:
min-ver: "2.18"
run: dpkg --compare-versions $(git version | awk '{print $3}') ge ${{ env.min-ver }}
- name: Check out Git repository
uses: actions/checkout@v3
- name: Install ClangFormat
run: sudo apt-get install -y clang-format
- name: Run cpplint
run: |
CPPSOURCES=$(find ./ -regextype posix-extended -regex '.*\.(c|cpp|h|hpp|cc|cxx|cu)' -not -path "./build/*" -not -path "./python/*")
PYTHONCPPSOURCES=$(find ./python/src/ -regextype posix-extended -regex '.*\.(c|cpp|h|hpp|cc|cxx|cu)')
clang-format -style=file --verbose --Werror --dry-run ${CPPSOURCES}
clang-format --dry-run ${PYTHONCPPSOURCES}
spelling:
runs-on: ubuntu-20.04
steps:
- name: Check git version
env:
min-ver: "2.18"
run: dpkg --compare-versions $(git version | awk '{print $3}') ge ${{ env.min-ver }}
- name: Check out Git repository
uses: actions/checkout@v3
- name: Download misspell
run: |
curl -L https://github.com/client9/misspell/releases/download/v0.3.4/misspell_0.3.4_linux_64bit.tar.gz -o /tmp/misspell_0.3.4_linux_64bit.tar.gz
tar -xzf /tmp/misspell_0.3.4_linux_64bit.tar.gz -C .
- name: Check spelling
run: |
./misspell -error .