Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Add GH Super Linter for a subset of secondary files (#752)
This runs GitHub Super Linter for JSON, XML, and YAML. It also runs a basic JavaScript check and PowerShell lint (for any future .ps1 files). Bash, CSS, Docker, a better JavaScript check, Markdown, and Perl are included as disabled to be enabled later. A readme with doc for running the checks locally is included.
- Loading branch information
1 parent
a8aa37c
commit c990654
Showing
2 changed files
with
46 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# GitHub Actions Workflows | ||
|
||
## GitHub Super Linter | ||
|
||
Run locally using Docker: | ||
|
||
``` | ||
docker run --rm -e RUN_LOCAL=true -e VALIDATE_PERL=true -v $PWD:/tmp/lint github/super-linter | ||
``` | ||
|
||
Note that you need to enable each validation separately or not specify | ||
any to enable all. |
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,34 @@ | ||
name: General linting | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
|
||
super-linter: | ||
|
||
name: GitHub Super Linter | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Lint code base | ||
uses: docker://github/super-linter:v2.2.2 | ||
env: | ||
# Listed but disabled linters would be nice to have. | ||
# Python (supported using Pylint) and C/C++ (not supported) are | ||
# handled separately due to the complexity of the settings. | ||
# (The rest is simply disabled automatically as of v2.) | ||
VALIDATE_BASH: false | ||
VALIDATE_CSS: false | ||
VALIDATE_DOCKER: false | ||
VALIDATE_JAVASCRIPT_ES: true | ||
VALIDATE_JAVASCRIPT_STANDARD: false | ||
VALIDATE_JSON: true | ||
VALIDATE_MD: false | ||
VALIDATE_PERL: false | ||
VALIDATE_POWERSHELL: true | ||
VALIDATE_XML: true | ||
VALIDATE_YAML: true |