-
Notifications
You must be signed in to change notification settings - Fork 8
47 lines (43 loc) · 1.35 KB
/
linting-formatting.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
name: Linting & Formatting
on:
pull_request:
types: [opened, synchronize, reopened]
merge_group:
permissions:
contents: read
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
linter:
name: Linter
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
security-events: write
steps:
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
with:
fetch-depth: 0
persist-credentials: false
- uses: oxsecurity/megalinter/flavors/c_cpp@a7a0163b6c8ff7474a283d99a706e27483ddd80f # v7.10.0
env:
APPLY_FIXES: all
VALIDATE_ALL_CODEBASE: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: git diff
- uses: github/codeql-action/upload-sarif@8f596b4ae3cb3c588a5c46780b86dd53fef16c52 # v3.25.2
if: ${{ success() || failure() }}
with:
sarif_file: megalinter-reports/megalinter-report.sarif
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
if: ${{ success() || failure() }}
with:
name: linter
path: |
megalinter-reports
- uses: reviewdog/action-suggester@3d7fde6859623ad6174df5fd662677a0eb63310a # v1.11.0
with:
tool_name: MegaLinter