name: cppcheck

on: [push, pull_request]

jobs:

  cppcheck_2004:
    runs-on: ubuntu-20.04
    if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Install Requirements
        run: |
          sudo apt update
          sudo apt install -y cppcheck

      - name: Run cppcheck test
        run: ./scripts/cppcheck.sh
