Skip to content

p_buff

p_buff #17

# This is a workflow to get source code and check the coding style using clang-format and cppcheck
name: CommonFunctionLints
on:
# # Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allows you to run this workflow every time a commit is pushed to the repository
push:
branches:
- '**'
paths:
- 'F01_Common_Functions/**'
- '.github/workflows/common_function_lint.yml'
- '.github/workflows/taskRunner/common_functions/runCpplint.sh'
- '.github/workflows/taskRunner/common_functions/runCppcheck.sh'
- '.github/workflows/taskRunner/common_functions/runGoogleStyleCheck.sh'
# Allows you to run this workflow every time a pull request is opened or updated
pull_request:
branches:
- '**'
jobs:
# Job
Cpplint:
# environment
runs-on: ubuntu-latest
steps:
# step to checkout the source code
- name: Checkout source code
uses: actions/checkout@main
# step to install tools
- name: Install Cpplint
run: pip install cpplint
# Step to check tool versions
- name: Tool Versions
run: |
cpplint --version
# step to run cpplint
- name: Run Cpplint
run: |
chmod +x .github/workflows/taskRunner/common_functions/run_cpplint.sh
.github/workflows/taskRunner/common_functions/run_cpplint.sh
# Job
Cppcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@main
- name: Install Cppcheck
run: sudo apt-get install -y cppcheck
- name: Tool Versions
run: |
cppcheck --version
- name: Run Cppcheck
run: |
chmod +x .github/workflows/taskRunner/common_functions/run_cppcheck.sh
.github/workflows/taskRunner/common_functions/run_cppcheck.sh
# Job
GoogleStyleCheck:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@main
- name: Install clang-format
run: sudo apt-get install clang-format
- name: Tool Versions
run: |
clang-format --version
# - name: Run clang-format google style check
# run: |
# chmod +x .github/workflows/taskRunner/common_functions/run_clang_format.sh
# .github/workflows/taskRunner/common_functions/run_clang_format.sh