Skip to content

Commit 9e5467d

Browse files
authored
Improve Linter (#418)
create two separate linters, one for PRs, only checking the added and changed files in the PR, and one for checking the whole code base in the project.
1 parent 0ef9f83 commit 9e5467d

File tree

2 files changed

+36
-7
lines changed

2 files changed

+36
-7
lines changed

.github/workflows/linter.yml renamed to .github/workflows/linter-full.yml

+1-7
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ on:
44
workflow_dispatch:
55
push:
66
branches: main
7-
paths-ignore:
8-
- '**/*.md'
9-
pull_request:
10-
branches: main
11-
paths-ignore:
12-
- '**/*.md'
137

148
permissions: { }
159

@@ -32,7 +26,7 @@ jobs:
3226
uses: super-linter/[email protected]
3327
env:
3428
# only validate new or edited files
35-
VALIDATE_ALL_CODEBASE: false
29+
VALIDATE_ALL_CODEBASE: true
3630
VALIDATE_BASH_EXEC: false
3731
VALIDATE_CPP: false
3832
VALIDATE_CLANG_FORMAT: false

.github/workflows/linter-pr.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Lint Pull Request
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches: main
7+
8+
permissions: { }
9+
10+
jobs:
11+
build:
12+
name: Lint Pull Request
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: read
17+
# To report github actions status checks
18+
statuses: write
19+
steps:
20+
- name: Checkout Code
21+
uses: actions/checkout@v4
22+
with:
23+
# Full git history is needed to get a proper list of changed files within `super-linter`
24+
fetch-depth: 0
25+
- name: Lint Code Base
26+
uses: super-linter/super-linter@v6
27+
env:
28+
# only validate new or edited files
29+
VALIDATE_ALL_CODEBASE: false
30+
VALIDATE_BASH_EXEC: false
31+
VALIDATE_CPP: false
32+
VALIDATE_CLANG_FORMAT: false
33+
VALIDATE_SHELL_SHFMT: false
34+
VALIDATE_PYTHON_PYLINT: false
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)