Skip to content

Add static analysis using fortitude, clang, and ruff #1

Add static analysis using fortitude, clang, and ruff

Add static analysis using fortitude, clang, and ruff #1

Workflow file for this run

# workflow to run static-analysis and linting checks on C/C++ files
name: C/C++Lint
# Controls when the workflow will run
on:
# Triggers the workflow on pushes to the "main" branch and any pull request events
push:
branches: [ "main"]
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Workflow run - one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "test-suite"
C-C++-lint:

Check failure on line 18 in .github/workflows/cpp-linter.yml

View workflow run for this annotation

GitHub Actions / C/C++Lint

Invalid workflow file

The workflow is not valid. .github/workflows/cpp-linter.yml (Line: 18, Col: 3): The identifier 'C-C++-lint' is invalid. IDs may only contain alphanumeric characters, '_', and '-'. IDs must start with a letter or '_' and and must be less than 100 characters.
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
fail-fast: false
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v4
- uses: cpp-linter/cpp-linter-action@v2
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: 'file' # Use .clang-format config file
tidy-checks: '' # Use .clang-tidy config file
# only 'update' a single comment in a pull request thread.
thread-comments: ${{ github.event_name == 'pull_request' && 'update' }}
- name: Fail fast?!
if: steps.linter.outputs.checks-failed > 0
run: exit 1