-
Notifications
You must be signed in to change notification settings - Fork 513
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* linter for pr, which only lints new and edited files * linter for whole code base, representing the current linting state of the project * use the same base settings (enabled/disabled linters) for both jobs
- Loading branch information
Showing
3 changed files
with
39 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,18 @@ | ||
name: Lint Code Base | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: main | ||
paths-ignore: | ||
- '**/*.md' | ||
pull_request: | ||
branches: main | ||
paths-ignore: | ||
- '**/*.md' | ||
workflow_call: | ||
inputs: | ||
name: | ||
required: true | ||
type: string | ||
all: | ||
required: true | ||
type: boolean | ||
|
||
permissions: { } | ||
|
||
jobs: | ||
build: | ||
name: Lint Code Base | ||
lint_pr: | ||
name: ${{ inputs.name }} | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
|
@@ -32,7 +29,7 @@ jobs: | |
uses: super-linter/[email protected] | ||
env: | ||
# only validate new or edited files | ||
VALIDATE_ALL_CODEBASE: false | ||
VALIDATE_ALL_CODEBASE: ${{ inputs.all }} | ||
VALIDATE_BASH_EXEC: false | ||
VALIDATE_CPP: false | ||
VALIDATE_CLANG_FORMAT: false | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Lint Code Base | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: main | ||
|
||
jobs: | ||
call-workflow: | ||
linter.yml | ||
call-workflow-passing-data: | ||
with: | ||
name: Lint Code Base | ||
all: true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Lint Pull Request | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: main | ||
|
||
jobs: | ||
call-workflow: | ||
linter.yml | ||
call-workflow-passing-data: | ||
with: | ||
name: Lint Pull Request | ||
all: false |