[KYUUBI #4295] Introduce super-linter action for linting JSON, XML, ENV files and bash_exec

### _Why are the changes needed?_

- introduce `action/super-linter` with multiple linters, (https://github.com/marketplace/actions/super-linter)
- using the smaller size version of image `github/super-linter/slim` for faster image pulling
- enable linting for `bash_exec` for checking executable of bash scripts, with fixed `tools/spark-block-cleaner/kubernetes/docker/entrypoint.sh`
- enable  integrity checks for JSON files in JSONC style
- enable integrity checks for XML files
- enable linting for ENV files

### _How was this patch tested?_
- [x] Pass CI jobs

Closes #4295 from bowenliang123/superlinter-action.

Closes #4295

321d24912 [liangbowen] update
497bf801c [liangbowen] use JSONC instead of JSON to support comments
43787e233 [liangbowen] use superlinter

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: liangbowen <liangbowen@gf.com.cn>
This commit is contained in:
liangbowen 2023-03-18 21:54:45 +08:00
parent 067c6010a6
commit 06e69ddb2b
2 changed files with 25 additions and 1 deletions

View File

@ -38,6 +38,8 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup JDK 8
uses: actions/setup-java@v3
with:
@ -104,10 +106,32 @@ jobs:
echo "---------------------------------------------------------------------------------"
shellcheck:
name: Shellcheck
name: Super Linter and Shellcheck
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Super Linter Checks
uses: github/super-linter/slim@v4
env:
CREATE_LOG_FILE: true
ERROR_ON_MISSING_EXEC_BIT: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IGNORE_GENERATED_FILES: true
IGNORE_GITIGNORED_FILES: true
LINTER_RULES_PATH: /
LOG_LEVEL: NOTICE
SUPPRESS_POSSUM: true
VALIDATE_BASH_EXEC: true
VALIDATE_ENV: true
VALIDATE_JSONC: true
VALIDATE_POWERSHELL: true
VALIDATE_XML: true
- name: Upload Super Linter logs
if: failure()
uses: actions/upload-artifact@v3
with:
name: super-linter-log
path: super-linter.log
- name: check bin directory
uses: ludeeus/action-shellcheck@1.1.0
with:

View File