fix linter #170
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Lint and format 💅 | |
| on: | |
| workflow_dispatch: | |
| push: | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| lint: | |
| runs-on: ${{ github.repository_owner == 'zondax' && 'zondax-runners' || 'ubuntu-latest' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| cmake \ | |
| clang-format \ | |
| clang-tidy \ | |
| wget | |
| - name: Lint and format 💅 | |
| uses: cpp-linter/cpp-linter-action@v2 | |
| id: linter | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| file-annotations: true | |
| files-changed-only: false | |
| ignore: "build|.github|cmake|fuzzing|.vscode|.idea|include/view_templates.h" | |
| step-summary: true | |
| style: file # uses .clang-format | |
| thread-comments: true | |
| tidy-checks: "-*" # disable clang-tidy, only use clang-format | |
| - name: Fail if errors | |
| if: ${{ steps.linter.outputs['checks-failed'] > 0 }} | |
| run: | | |
| echo "Linter or formatter failed!" | |
| exit 1 |