mirror of
https://github.com/super-linter/super-linter.git
synced 2024-12-22 12:42:09 -05:00
Merge branch 'master' into master
This commit is contained in:
commit
84c79a186b
16 changed files with 498 additions and 282 deletions
19
.automation/test/kubeval/README.md
Normal file
19
.automation/test/kubeval/README.md
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# Kubeval Test Cases
|
||||||
|
|
||||||
|
This folder holds the test cases for **Kubeval**.
|
||||||
|
|
||||||
|
## Additional Docs
|
||||||
|
|
||||||
|
No Additional information is needed for this test case.
|
||||||
|
|
||||||
|
## Good Test Cases
|
||||||
|
|
||||||
|
The test cases denoted: `LANGUAGE_good_FILE.EXTENSION` are all valid, and should pass successfully when linted.
|
||||||
|
|
||||||
|
- **Note:** They are linted utilizing the default linter rules.
|
||||||
|
|
||||||
|
## Bad Test Cases
|
||||||
|
|
||||||
|
The test cases denoted: `LANGUAGE_bad_FILE.EXTENSION` are **NOT** valid, and should trigger errors when linted.
|
||||||
|
|
||||||
|
- **Note:** They are linted utilizing the default linter rules.
|
20
.automation/test/kubeval/kubeval_bad_1.yaml
Executable file
20
.automation/test/kubeval/kubeval_bad_1.yaml
Executable file
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: nginx-deployment
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: nginx
|
||||||
|
replicas: 4
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: nginx
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: nginx
|
||||||
|
image2: nginx:1.13.12
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
20
.automation/test/kubeval/kubeval_good_1.yaml
Executable file
20
.automation/test/kubeval/kubeval_good_1.yaml
Executable file
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: nginx-deployment
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: nginx
|
||||||
|
replicas: 4
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: nginx
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: nginx
|
||||||
|
image: nginx:1.13.12
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
2
.github/workflows/deploy-DEV.yml
vendored
2
.github/workflows/deploy-DEV.yml
vendored
|
@ -71,7 +71,7 @@ jobs:
|
||||||
run: docker run -e RUN_LOCAL=true -e TEST_CASE_RUN=true -e OUTPUT_FORMAT=tap -e OUTPUT_FOLDER=${GITHUB_SHA} -e OUTPUT_DETAILS=detailed -v ${GITHUB_WORKSPACE}:/tmp/lint github/super-linter:${GITHUB_SHA}
|
run: docker run -e RUN_LOCAL=true -e TEST_CASE_RUN=true -e OUTPUT_FORMAT=tap -e OUTPUT_FOLDER=${GITHUB_SHA} -e OUTPUT_DETAILS=detailed -v ${GITHUB_WORKSPACE}:/tmp/lint github/super-linter:${GITHUB_SHA}
|
||||||
|
|
||||||
#########################################
|
#########################################
|
||||||
# Clean code base to run agaisnt it all #
|
# Clean code base to run against it all #
|
||||||
#########################################
|
#########################################
|
||||||
- name: Clean Test code base for additional testing
|
- name: Clean Test code base for additional testing
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
2
.github/workflows/stale.yml
vendored
2
.github/workflows/stale.yml
vendored
|
@ -29,7 +29,7 @@ jobs:
|
||||||
if: "github.event_name == 'schedule'"
|
if: "github.event_name == 'schedule'"
|
||||||
steps:
|
steps:
|
||||||
- name: Mark issue stale
|
- name: Mark issue stale
|
||||||
uses: actions/stale@v3.0.10
|
uses: actions/stale@v3.0.11
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity.\nIt will be closed in 14 days if no further activity occurs.\nThank you for your contributions.\n\nIf you think this issue should stay open, please remove the `O: stale 🤖` label or comment on the issue."
|
stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity.\nIt will be closed in 14 days if no further activity occurs.\nThank you for your contributions.\n\nIf you think this issue should stay open, please remove the `O: stale 🤖` label or comment on the issue."
|
||||||
|
|
18
Dockerfile
18
Dockerfile
|
@ -7,17 +7,18 @@
|
||||||
#########################################
|
#########################################
|
||||||
# Get dependency images as build stages #
|
# Get dependency images as build stages #
|
||||||
#########################################
|
#########################################
|
||||||
FROM borkdude/clj-kondo:2020.07.29 as clj-kondo
|
FROM borkdude/clj-kondo:2020.09.09 as clj-kondo
|
||||||
FROM dotenvlinter/dotenv-linter:2.1.0 as dotenv-linter
|
FROM dotenvlinter/dotenv-linter:2.1.0 as dotenv-linter
|
||||||
FROM mstruebing/editorconfig-checker:2.1.0 as editorconfig-checker
|
FROM mstruebing/editorconfig-checker:2.1.0 as editorconfig-checker
|
||||||
FROM golangci/golangci-lint:v1.31.0 as golangci-lint
|
FROM golangci/golangci-lint:v1.31.0 as golangci-lint
|
||||||
FROM yoheimuta/protolint:v0.26.0 as protolint
|
FROM yoheimuta/protolint:v0.26.0 as protolint
|
||||||
FROM koalaman/shellcheck:v0.7.1 as shellcheck
|
FROM koalaman/shellcheck:v0.7.1 as shellcheck
|
||||||
FROM wata727/tflint:0.19.1 as tflint
|
FROM wata727/tflint:0.20.1 as tflint
|
||||||
FROM accurics/terrascan:latest as terrascan
|
FROM accurics/terrascan:d182f1c as terrascan
|
||||||
FROM hadolint/hadolint:latest-alpine as dockerfile-lint
|
FROM hadolint/hadolint:latest-alpine as dockerfile-lint
|
||||||
FROM assignuser/lintr-lib:v0.1.0 as lintr-lib
|
FROM ghcr.io/assignuser/lintr-lib:0.1.2 as lintr-lib
|
||||||
FROM assignuser/chktex-alpine:v0.1.0 as chktex
|
FROM ghcr.io/assignuser/chktex-alpine:0.1.1 as chktex
|
||||||
|
FROM garethr/kubeval:0.15.0 as kubeval
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# Get base image #
|
# Get base image #
|
||||||
|
@ -305,6 +306,11 @@ RUN R -e "install.packages(list.dirs('/home/r-library',recursive = FALSE), repos
|
||||||
COPY --from=chktex /usr/bin/chktex /usr/bin/
|
COPY --from=chktex /usr/bin/chktex /usr/bin/
|
||||||
RUN cd ~ && touch .chktexrc
|
RUN cd ~ && touch .chktexrc
|
||||||
|
|
||||||
|
###################
|
||||||
|
# Install kubeval #
|
||||||
|
###################
|
||||||
|
COPY --from=kubeval /kubeval /usr/bin/
|
||||||
|
|
||||||
#################
|
#################
|
||||||
# Install shfmt #
|
# Install shfmt #
|
||||||
#################
|
#################
|
||||||
|
@ -331,6 +337,7 @@ ENV ACTIONS_RUNNER_DEBUG=${ACTIONS_RUNNER_DEBUG} \
|
||||||
GITHUB_TOKEN=${GITHUB_TOKEN} \
|
GITHUB_TOKEN=${GITHUB_TOKEN} \
|
||||||
GITHUB_WORKSPACE=${GITHUB_WORKSPACE} \
|
GITHUB_WORKSPACE=${GITHUB_WORKSPACE} \
|
||||||
JAVASCRIPT_ES_CONFIG_FILE=${JAVASCRIPT_ES_CONFIG_FILE} \
|
JAVASCRIPT_ES_CONFIG_FILE=${JAVASCRIPT_ES_CONFIG_FILE} \
|
||||||
|
KUBERNETES_DIRECTORY=${KUBERNETES_DIRECTORY} \
|
||||||
LINTER_RULES_PATH=${LINTER_RULES_PATH} \
|
LINTER_RULES_PATH=${LINTER_RULES_PATH} \
|
||||||
LOG_FILE=${LOG_FILE} \
|
LOG_FILE=${LOG_FILE} \
|
||||||
LOG_LEVEL=${LOG_LEVEL} \
|
LOG_LEVEL=${LOG_LEVEL} \
|
||||||
|
@ -362,6 +369,7 @@ ENV ACTIONS_RUNNER_DEBUG=${ACTIONS_RUNNER_DEBUG} \
|
||||||
VALIDATE_JAVASCRIPT_ES=${VALIDATE_JAVASCRIPT_ES} \
|
VALIDATE_JAVASCRIPT_ES=${VALIDATE_JAVASCRIPT_ES} \
|
||||||
VALIDATE_JAVASCRIPT_STANDARD=${VALIDATE_JAVASCRIPT_STANDARD} \
|
VALIDATE_JAVASCRIPT_STANDARD=${VALIDATE_JAVASCRIPT_STANDARD} \
|
||||||
VALIDATE_JSON=${VALIDATE_JSON} \
|
VALIDATE_JSON=${VALIDATE_JSON} \
|
||||||
|
VALIDATE_KUBERNETES_KUBEVAL=${VALIDATE_KUBERNETES_KUBEVAL} \
|
||||||
VALIDATE_KOTLIN=${VALIDATE_KOTLIN} \
|
VALIDATE_KOTLIN=${VALIDATE_KOTLIN} \
|
||||||
VALIDATE_LATEX=${VALIDATE_LATEX} \
|
VALIDATE_LATEX=${VALIDATE_LATEX} \
|
||||||
VALIDATE_LUA=${VALIDATE_LUA} \
|
VALIDATE_LUA=${VALIDATE_LUA} \
|
||||||
|
|
37
README.md
37
README.md
|
@ -18,6 +18,7 @@ It is a simple combination of various linters, written in `bash`, to help valida
|
||||||
- [Supported Linters](#supported-linters)
|
- [Supported Linters](#supported-linters)
|
||||||
- [How to use](#how-to-use)
|
- [How to use](#how-to-use)
|
||||||
- [Example connecting GitHub Action Workflow](#example-connecting-github-action-workflow)
|
- [Example connecting GitHub Action Workflow](#example-connecting-github-action-workflow)
|
||||||
|
- [Add Super-Linter badge in your repository README](#add-super-linter-badge-in-your-repository-readme)
|
||||||
- [Environment variables](#environment-variables)
|
- [Environment variables](#environment-variables)
|
||||||
- [Template rules files](#template-rules-files)
|
- [Template rules files](#template-rules-files)
|
||||||
- [Disabling rules](#disabling-rules)
|
- [Disabling rules](#disabling-rules)
|
||||||
|
@ -61,6 +62,7 @@ Developers on **GitHub** can call the **GitHub Action** to lint their code base
|
||||||
| **Java** | [checkstyle](https://checkstyle.org) |
|
| **Java** | [checkstyle](https://checkstyle.org) |
|
||||||
| **JavaScript** | [eslint](https://eslint.org/) / [standard js](https://standardjs.com/) |
|
| **JavaScript** | [eslint](https://eslint.org/) / [standard js](https://standardjs.com/) |
|
||||||
| **JSON** | [jsonlint](https://github.com/zaach/jsonlint) |
|
| **JSON** | [jsonlint](https://github.com/zaach/jsonlint) |
|
||||||
|
| **Kubeval** | [kubeval](https://github.com/instrumenta/kubeval) |
|
||||||
| **Kotlin** | [ktlint](https://github.com/pinterest/ktlint) |
|
| **Kotlin** | [ktlint](https://github.com/pinterest/ktlint) |
|
||||||
| **LaTeX** | [ChkTex](https://www.nongnu.org/chktex/) |
|
| **LaTeX** | [ChkTex](https://www.nongnu.org/chktex/) |
|
||||||
| **Lua** | [luacheck](https://github.com/luarocks/luacheck) |
|
| **Lua** | [luacheck](https://github.com/luarocks/luacheck) |
|
||||||
|
@ -160,6 +162,26 @@ jobs:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Add Super-Linter badge in your repository README
|
||||||
|
|
||||||
|
You can show Super-Linter status with a badge in your repository README
|
||||||
|
|
||||||
|
[![GitHub Super-Linter](https://github.com/nvuillam/npm-groovy-lint/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter)
|
||||||
|
|
||||||
|
Format:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
[![GitHub Super-Linter](https://github.com/<OWNER>/<REPOSITORY>/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter)
|
||||||
|
```
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
[![GitHub Super-Linter](https://github.com/nvuillam/npm-groovy-lint/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter)
|
||||||
|
```
|
||||||
|
|
||||||
|
_Note:_ IF you did not use `Lint Code Base` as GitHub Action name, please read [GitHub Actions Badges documentation](https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#adding-a-workflow-status-badge-to-your-repository)
|
||||||
|
|
||||||
## Environment variables
|
## Environment variables
|
||||||
|
|
||||||
The super-linter allows you to pass the following `ENV` variables to be able to trigger different functionality.
|
The super-linter allows you to pass the following `ENV` variables to be able to trigger different functionality.
|
||||||
|
@ -177,15 +199,17 @@ But if you wish to select or exclude specific linters, we give you full control
|
||||||
| **ENV VAR** | **Default Value** | **Notes** |
|
| **ENV VAR** | **Default Value** | **Notes** |
|
||||||
| --------------------------------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| --------------------------------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| **ACTIONS_RUNNER_DEBUG** | `false` | Flag to enable additional information about the linter, versions, and additional output. |
|
| **ACTIONS_RUNNER_DEBUG** | `false` | Flag to enable additional information about the linter, versions, and additional output. |
|
||||||
| **ANSIBLE_DIRECTORY** | `/ansible` | Flag to set the root directory for Ansible file location(s). |
|
| **ANSIBLE_DIRECTORY** | `/ansible` | Flag to set the root directory for Ansible file location(s), relative to `DEFAULT_WORKSPACE`. |
|
||||||
| **CSS_FILE_NAME** | `.stylelintrc.json` | Filename for [Stylelint configuration](https://github.com/stylelint/stylelint) (ex: `.stylelintrc.yml`, `.stylelintrc.yaml`) |
|
| **CSS_FILE_NAME** | `.stylelintrc.json` | Filename for [Stylelint configuration](https://github.com/stylelint/stylelint) (ex: `.stylelintrc.yml`, `.stylelintrc.yaml`) |
|
||||||
| **DEFAULT_BRANCH** | `master` | The name of the repository default branch. |
|
| **DEFAULT_BRANCH** | `master` | The name of the repository default branch. |
|
||||||
| **DEFAULT_WORKSPACE** | `/tmp/lint` | The location containing files to lint if you are running locally. |
|
| **DEFAULT_WORKSPACE** | `/tmp/lint` | The location containing files to lint if you are running locally. |
|
||||||
| **DISABLE_ERRORS** | `false` | Flag to have the linter complete with exit code 0 even if errors were detected. |
|
| **DISABLE_ERRORS** | `false` | Flag to have the linter complete with exit code 0 even if errors were detected. |
|
||||||
| **DOCKERFILE_HADOLINT_FILE_NAME** | `.hadolint.yml` | Filename for [hadolint configuration](https://github.com/hadolint/hadolint) (ex: `.hadolintlintrc.yaml`) |
|
| **DOCKERFILE_HADOLINT_FILE_NAME** | `.hadolint.yml` | Filename for [hadolint configuration](https://github.com/hadolint/hadolint) (ex: `.hadolintlintrc.yaml`) |
|
||||||
|
| **ERROR_ON_MISSING_EXEC_BIT** | `false` | If set to `false`, the `bash-exec` linter will report a warning if a shell script is not executable. If set to `true`, the `bash-exec` linter will report an arror instead. |
|
||||||
| **FILTER_REGEX_EXCLUDE** | `none` | Regular expression defining which files will be excluded from linting (ex: `.*src/test.*`) |
|
| **FILTER_REGEX_EXCLUDE** | `none` | Regular expression defining which files will be excluded from linting (ex: `.*src/test.*`) |
|
||||||
| **FILTER_REGEX_INCLUDE** | `all` | Regular expression defining which files will be processed by linters (ex: `.*src/.*`) |
|
| **FILTER_REGEX_INCLUDE** | `all` | Regular expression defining which files will be processed by linters (ex: `.*src/.*`) |
|
||||||
| **JAVASCRIPT_ES_CONFIG_FILE** | `.eslintrc.yml` | Filename for [eslint configuration](https://eslint.org/docs/user-guide/configuring#configuration-file-formats) (ex: `.eslintrc.yml`, `.eslintrc.json`) |
|
| **JAVASCRIPT_ES_CONFIG_FILE** | `.eslintrc.yml` | Filename for [eslint configuration](https://eslint.org/docs/user-guide/configuring#configuration-file-formats) (ex: `.eslintrc.yml`, `.eslintrc.json`) |
|
||||||
|
| **KUBERNETES_DIRECTORY** | `/kubernetes` | The path to the root directory for Kubernetes descriptors, relative to `DEFAULT_WORKSPACE`. |
|
||||||
| **LINTER_RULES_PATH** | `.github/linters` | Directory for all linter configuration rules. |
|
| **LINTER_RULES_PATH** | `.github/linters` | Directory for all linter configuration rules. |
|
||||||
| **LOG_FILE** | `super-linter.log` | The file name for outputting logs. All output is sent to the log file regardless of `LOG_LEVEL`. |
|
| **LOG_FILE** | `super-linter.log` | The file name for outputting logs. All output is sent to the log file regardless of `LOG_LEVEL`. |
|
||||||
| **LOG_LEVEL** | `VERBOSE` | How much output the script will generate to the console. One of `VERBOSE`, `DEBUG` or `TRACE`. |
|
| **LOG_LEVEL** | `VERBOSE` | How much output the script will generate to the console. One of `VERBOSE`, `DEBUG` or `TRACE`. |
|
||||||
|
@ -194,7 +218,7 @@ But if you wish to select or exclude specific linters, we give you full control
|
||||||
| **OUTPUT_FORMAT** | `none` | The report format to be generated, besides the stdout one. Output format of tap is currently using v13 of the specification. Supported formats: tap |
|
| **OUTPUT_FORMAT** | `none` | The report format to be generated, besides the stdout one. Output format of tap is currently using v13 of the specification. Supported formats: tap |
|
||||||
| **OUTPUT_FOLDER** | `super-linter.report` | The location where the output reporting will be generated to. Output folder must not previously exist. |
|
| **OUTPUT_FOLDER** | `super-linter.report` | The location where the output reporting will be generated to. Output folder must not previously exist. |
|
||||||
| **OUTPUT_DETAILS** | `simpler` | What level of details to be reported. Supported formats: simpler or detailed. |
|
| **OUTPUT_DETAILS** | `simpler` | What level of details to be reported. Supported formats: simpler or detailed. |
|
||||||
| **PYTHON_PYLINT_CONFIG_FILE** | `.python-lint` | Filename for [pylint configuration](http://pylint.pycqa.org/en/latest/user_guide/run.html?highlight=rcfile#command-line-options) (ex: `.python-lint`, `.pylintrc`) |
|
| **PYTHON_PYLINT_CONFIG_FILE** | `.python-lint` | Filename for [pylint configuration](https://pylint.pycqa.org/en/latest/user_guide/run.html?highlight=rcfile#command-line-options) (ex: `.python-lint`, `.pylintrc`) |
|
||||||
| **PYTHON_FLAKE8_CONFIG_FILE** | `.flake8` | Filename for [flake8 configuration](https://flake8.pycqa.org/en/latest/user/configuration.html) (ex: `.flake8`, `tox.ini`) |
|
| **PYTHON_FLAKE8_CONFIG_FILE** | `.flake8` | Filename for [flake8 configuration](https://flake8.pycqa.org/en/latest/user/configuration.html) (ex: `.flake8`, `tox.ini`) |
|
||||||
| **PYTHON_BLACK_CONFIG_FILE** | `.python-black` | Filename for [black configuration](https://github.com/psf/black/blob/master/docs/compatible_configs.md) (ex: `.isort.cfg`, `pyproject.toml`) |
|
| **PYTHON_BLACK_CONFIG_FILE** | `.python-black` | Filename for [black configuration](https://github.com/psf/black/blob/master/docs/compatible_configs.md) (ex: `.isort.cfg`, `pyproject.toml`) |
|
||||||
| **RUBY_CONFIG_FILE** | `.ruby-lint.yml` | Filename for [rubocop configuration](https://docs.rubocop.org/rubocop/configuration.html) (ex: `.ruby-lint.yml`, `.rubocop.yml`) |
|
| **RUBY_CONFIG_FILE** | `.ruby-lint.yml` | Filename for [rubocop configuration](https://docs.rubocop.org/rubocop/configuration.html) (ex: `.ruby-lint.yml`, `.rubocop.yml`) |
|
||||||
|
@ -224,6 +248,7 @@ But if you wish to select or exclude specific linters, we give you full control
|
||||||
| **VALIDATE_JSON** | `true` | Flag to enable or disable the linting process of the JSON language. |
|
| **VALIDATE_JSON** | `true` | Flag to enable or disable the linting process of the JSON language. |
|
||||||
| **VALIDATE_JSX** | `true` | Flag to enable or disable the linting process for jsx files (Utilizing: eslint) |
|
| **VALIDATE_JSX** | `true` | Flag to enable or disable the linting process for jsx files (Utilizing: eslint) |
|
||||||
| **VALIDATE_KOTLIN** | `true` | Flag to enable or disable the linting process of the Kotlin language. |
|
| **VALIDATE_KOTLIN** | `true` | Flag to enable or disable the linting process of the Kotlin language. |
|
||||||
|
| **VALIDATE_KUBERNETES_KUBEVAL** | `true` | Flag to enable or disable the linting process of Kubernetes descriptors with Kubeval |
|
||||||
| **VALIDATE_LATEX** | `true` | Flag to enable or disable the linting process of the LaTeX language. |
|
| **VALIDATE_LATEX** | `true` | Flag to enable or disable the linting process of the LaTeX language. |
|
||||||
| **VALIDATE_LUA** | `true` | Flag to enable or disable the linting process of the language. |
|
| **VALIDATE_LUA** | `true` | Flag to enable or disable the linting process of the language. |
|
||||||
| **VALIDATE_MD** | `true` | Flag to enable or disable the linting process of the Markdown language. |
|
| **VALIDATE_MD** | `true` | Flag to enable or disable the linting process of the Markdown language. |
|
||||||
|
@ -274,9 +299,9 @@ If you need to lint only a folder or exclude some files from linting, you can us
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
- Lint only src folder: `FILTER_REGEX_INCLUDE=.*src/.*`
|
- Lint only src folder: `FILTER_REGEX_INCLUDE: .*src/.*`
|
||||||
- Do not lint files inside test folder: `FILTER_REGEX_EXCLUDE=.*test/.*`
|
- Do not lint files inside test folder: `FILTER_REGEX_EXCLUDE: .*test/.*`
|
||||||
- Do not lint javascript files inside test folder: `FILTER_REGEX_EXCLUDE=.*test/.*.js`
|
- Do not lint javascript files inside test folder: `FILTER_REGEX_EXCLUDE: .*test/.*.js`
|
||||||
|
|
||||||
## Docker Hub
|
## Docker Hub
|
||||||
|
|
||||||
|
@ -292,7 +317,7 @@ Check out the [note](#how-it-works) in **How it Works** to understand more about
|
||||||
|
|
||||||
### Azure
|
### Azure
|
||||||
|
|
||||||
Check out this [article](http://blog.tyang.org/2020/06/27/use-github-super-linter-in-azure-pipelines/)
|
Check out this [article](https://blog.tyang.org/2020/06/27/use-github-super-linter-in-azure-pipelines/)
|
||||||
|
|
||||||
### GitLab
|
### GitLab
|
||||||
|
|
||||||
|
|
8
dependencies/Pipfile.lock
generated
vendored
8
dependencies/Pipfile.lock
generated
vendored
|
@ -225,7 +225,7 @@
|
||||||
"sha256:b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9",
|
"sha256:b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9",
|
||||||
"sha256:cdf6525904cc597730141d61b36f2e4b8ecc257c420fa2f4549bac2c2d0cb72f"
|
"sha256:cdf6525904cc597730141d61b36f2e4b8ecc257c420fa2f4549bac2c2d0cb72f"
|
||||||
],
|
],
|
||||||
"markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'",
|
"markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'",
|
||||||
"version": "==0.10.0"
|
"version": "==0.10.0"
|
||||||
},
|
},
|
||||||
"jsonpatch": {
|
"jsonpatch": {
|
||||||
|
@ -375,7 +375,7 @@
|
||||||
"sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1",
|
"sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1",
|
||||||
"sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"
|
"sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"
|
||||||
],
|
],
|
||||||
"markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'",
|
"markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'",
|
||||||
"version": "==2.4.7"
|
"version": "==2.4.7"
|
||||||
},
|
},
|
||||||
"pyrsistent": {
|
"pyrsistent": {
|
||||||
|
@ -390,7 +390,7 @@
|
||||||
"sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c",
|
"sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c",
|
||||||
"sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"
|
"sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"
|
||||||
],
|
],
|
||||||
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
|
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'",
|
||||||
"version": "==2.8.1"
|
"version": "==2.8.1"
|
||||||
},
|
},
|
||||||
"pyyaml": {
|
"pyyaml": {
|
||||||
|
@ -463,7 +463,7 @@
|
||||||
"sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259",
|
"sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259",
|
||||||
"sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced"
|
"sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced"
|
||||||
],
|
],
|
||||||
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
|
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'",
|
||||||
"version": "==1.15.0"
|
"version": "==1.15.0"
|
||||||
},
|
},
|
||||||
"smmap": {
|
"smmap": {
|
||||||
|
|
237
dependencies/package-lock.json
generated
vendored
237
dependencies/package-lock.json
generated
vendored
|
@ -12,12 +12,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@babel/core": {
|
"@babel/core": {
|
||||||
"version": "7.11.5",
|
"version": "7.11.6",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.11.5.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.11.6.tgz",
|
||||||
"integrity": "sha512-fsEANVOcZHzrsV6dMVWqpSeXClq3lNbYrfFGme6DE25FQWe7pyeYpXyx9guqUnpy466JLzZ8z4uwSr2iv60V5Q==",
|
"integrity": "sha512-Wpcv03AGnmkgm6uS6k8iwhIwTrcP0m17TL1n1sy7qD0qelDu4XNeW0dN0mHfa+Gei211yDaLoEe/VlbXQzM4Bg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/code-frame": "^7.10.4",
|
"@babel/code-frame": "^7.10.4",
|
||||||
"@babel/generator": "^7.11.5",
|
"@babel/generator": "^7.11.6",
|
||||||
"@babel/helper-module-transforms": "^7.11.0",
|
"@babel/helper-module-transforms": "^7.11.0",
|
||||||
"@babel/helpers": "^7.10.4",
|
"@babel/helpers": "^7.10.4",
|
||||||
"@babel/parser": "^7.11.5",
|
"@babel/parser": "^7.11.5",
|
||||||
|
@ -31,17 +31,17 @@
|
||||||
"lodash": "^4.17.19",
|
"lodash": "^4.17.19",
|
||||||
"resolve": "^1.3.2",
|
"resolve": "^1.3.2",
|
||||||
"semver": "^5.4.1",
|
"semver": "^5.4.1",
|
||||||
"source-map": "^0.6.1"
|
"source-map": "^0.5.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/generator": {
|
"@babel/generator": {
|
||||||
"version": "7.11.5",
|
"version": "7.11.6",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.11.5.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.11.6.tgz",
|
||||||
"integrity": "sha512-9UqHWJ4IwRTy4l0o8gq2ef8ws8UPzvtMkVKjTLAiRmza9p9V6Z+OfuNd9fB1j5Q67F+dVJtPC2sZXI8NM9br4g==",
|
"integrity": "sha512-DWtQ1PV3r+cLbySoHrwn9RWEgKMBLLma4OBQloPRyDYvc5msJM9kvTLo1YnlJd1P/ZuKbdli3ijr5q3FvAF3uA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/types": "^7.11.5",
|
"@babel/types": "^7.11.5",
|
||||||
"jsesc": "^2.5.1",
|
"jsesc": "^2.5.1",
|
||||||
"source-map": "^0.6.1"
|
"source-map": "^0.5.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@babel/helper-split-export-declaration": {
|
"@babel/helper-split-export-declaration": {
|
||||||
|
@ -92,6 +92,11 @@
|
||||||
"version": "5.7.1",
|
"version": "5.7.1",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
|
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
|
||||||
|
},
|
||||||
|
"source-map": {
|
||||||
|
"version": "0.5.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
|
||||||
|
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -352,16 +357,16 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@coffeelint/cli": {
|
"@coffeelint/cli": {
|
||||||
"version": "3.2.10",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@coffeelint/cli/-/cli-3.2.10.tgz",
|
"resolved": "https://registry.npmjs.org/@coffeelint/cli/-/cli-4.0.0.tgz",
|
||||||
"integrity": "sha512-CLFBTPFLjwSsB4M2Vum6LwNDHePszjW2GDWU1mgpMl5vgYmhcjAhCfJqb1qAS2NpBcD31Iwn4zvy5enAztqZUw==",
|
"integrity": "sha512-/YmfX2pbN/4w3bxTuutLV0uhx1eV0GQGvwGSq1ROkx44u/Cy6/jXaQBKPRXc2zn1Bk93d2lMQvONtCHvLMaG3Q==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"coffeescript": "2.5.1",
|
"coffeescript": "2.5.1",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
"ignore": "^5.1.8",
|
"ignore": "^5.1.8",
|
||||||
"resolve": "^1.17.0",
|
"resolve": "^1.17.0",
|
||||||
"strip-json-comments": "^3.1.1",
|
"strip-json-comments": "^3.1.1",
|
||||||
"yargs": "^15.4.1"
|
"yargs": "^16.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@eslint/eslintrc": {
|
"@eslint/eslintrc": {
|
||||||
|
@ -382,9 +387,9 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ajv": {
|
"ajv": {
|
||||||
"version": "6.12.4",
|
"version": "6.12.5",
|
||||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz",
|
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.5.tgz",
|
||||||
"integrity": "sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==",
|
"integrity": "sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"fast-deep-equal": "^3.1.1",
|
"fast-deep-equal": "^3.1.1",
|
||||||
"fast-json-stable-stringify": "^2.0.0",
|
"fast-json-stable-stringify": "^2.0.0",
|
||||||
|
@ -996,9 +1001,9 @@
|
||||||
"integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0="
|
"integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0="
|
||||||
},
|
},
|
||||||
"asl-validator": {
|
"asl-validator": {
|
||||||
"version": "1.7.1",
|
"version": "1.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/asl-validator/-/asl-validator-1.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/asl-validator/-/asl-validator-1.8.0.tgz",
|
||||||
"integrity": "sha512-Ka/sWrM2wmB3OBN+o/8CqzudFeIcfhY+RycCReX4xvtvLwtuucV1n+frcFCippjB5xSHsXoYSHpP3m8CQiGMwQ==",
|
"integrity": "sha512-9pVM4YAjivu4WZNOQ0pey46DJYja90BJzN3hxINUXdwZLF/7hhpvcHllWzDYuQ1SdMSyUsNRiyoIuPRNL9RR+w==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"ajv": "^6.12.2",
|
"ajv": "^6.12.2",
|
||||||
"commander": "^5.1.0",
|
"commander": "^5.1.0",
|
||||||
|
@ -1149,14 +1154,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"browserslist": {
|
"browserslist": {
|
||||||
"version": "4.14.0",
|
"version": "4.14.2",
|
||||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.0.tgz",
|
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.2.tgz",
|
||||||
"integrity": "sha512-pUsXKAF2lVwhmtpeA3LJrZ76jXuusrNyhduuQs7CDFf9foT4Y38aQOserd2lMe5DSSrjf3fx34oHwryuvxAUgQ==",
|
"integrity": "sha512-HI4lPveGKUR0x2StIz+2FXfDk9SfVMrxn6PLh1JeGUwcuoDkdKZebWiyLRJ68iIPDpMI4JLVDf7S7XzslgWOhw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"caniuse-lite": "^1.0.30001111",
|
"caniuse-lite": "^1.0.30001125",
|
||||||
"electron-to-chromium": "^1.3.523",
|
"electron-to-chromium": "^1.3.564",
|
||||||
"escalade": "^3.0.2",
|
"escalade": "^3.0.2",
|
||||||
"node-releases": "^1.1.60"
|
"node-releases": "^1.1.61"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"buffer-crc32": {
|
"buffer-crc32": {
|
||||||
|
@ -1195,9 +1200,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"caniuse-lite": {
|
"caniuse-lite": {
|
||||||
"version": "1.0.30001121",
|
"version": "1.0.30001129",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001121.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001129.tgz",
|
||||||
"integrity": "sha512-s7C2DjrEbm4Z7Gk0iSG6q0tF+dqn51G3IILCWoIrF59EQomHpcJHCNo4ky1W6c/+dsEPAdqjErSmnw1YCY7ndA=="
|
"integrity": "sha512-9945fTVKS810DZITpsAbuhQG7Lam0tEfVbZlsBaCFZaszepbryrArS05PWmJSBQ6mta+v9iz0pUIAbW1eBILIg=="
|
||||||
},
|
},
|
||||||
"caseless": {
|
"caseless": {
|
||||||
"version": "0.12.0",
|
"version": "0.12.0",
|
||||||
|
@ -1806,9 +1811,9 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"domelementtype": {
|
"domelementtype": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.2.tgz",
|
||||||
"integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ=="
|
"integrity": "sha512-wFwTwCVebUrMgGeAwRL/NhZtHAUyT9n9yg4IMDwf10+6iCMxSkVq9MGCVEH+QZWo1nNidy8kNvwmv4zWHDTqvA=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1853,9 +1858,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"electron-to-chromium": {
|
"electron-to-chromium": {
|
||||||
"version": "1.3.556",
|
"version": "1.3.567",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.556.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.567.tgz",
|
||||||
"integrity": "sha512-g5cGpg6rOCXxyfaLCQIWz9Fx+raFfbZ6sc4QLfvvaiCERBzY6YD6rh5d12QN++bEF1Tm9osYnxP37lbN/92j4A=="
|
"integrity": "sha512-1aKkw0Hha1Bw9JA5K5PT5eFXC/TXbkJvUfNSNEciPUMgSIsRJZM1hF2GUEAGZpAbgvd8En21EA+Lv820KOhvqA=="
|
||||||
},
|
},
|
||||||
"emoji-regex": {
|
"emoji-regex": {
|
||||||
"version": "8.0.0",
|
"version": "8.0.0",
|
||||||
|
@ -1959,9 +1964,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint": {
|
"eslint": {
|
||||||
"version": "7.8.1",
|
"version": "7.9.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.8.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.9.0.tgz",
|
||||||
"integrity": "sha512-/2rX2pfhyUG0y+A123d0ccXtMm7DV7sH1m3lk9nk2DZ2LReq39FXHueR9xZwshE5MdfSf0xunSaMWRqyIA6M1w==",
|
"integrity": "sha512-V6QyhX21+uXp4T+3nrNfI3hQNBDa/P8ga7LoQOenwrlEFXrEnUEE+ok1dMtaS3b6rmLXhT1TkTIsG75HMLbknA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/code-frame": "^7.0.0",
|
"@babel/code-frame": "^7.0.0",
|
||||||
"@eslint/eslintrc": "^0.1.3",
|
"@eslint/eslintrc": "^0.1.3",
|
||||||
|
@ -2296,47 +2301,47 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-plugin-jest": {
|
"eslint-plugin-jest": {
|
||||||
"version": "24.0.0",
|
"version": "24.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-24.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-24.0.2.tgz",
|
||||||
"integrity": "sha512-a0G7hSDbuBCW4PNT6MVpAyfnGbUDOqxzOyhR6wT2BIBnR7MhvfAqd6KKfsTjX+Z3gxzIHiEsihzdClU4cSc6qQ==",
|
"integrity": "sha512-DSBLNpkKDOpUJQkTGSs5sVJWsu0nDyQ2rYxkr0Eh7nrkc5bMUr/dlDbtTj3l8y6UaCVsem6rryF1OZrKnz1S5g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/experimental-utils": "^4.0.1"
|
"@typescript-eslint/experimental-utils": "^4.0.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/experimental-utils": {
|
"@typescript-eslint/experimental-utils": {
|
||||||
"version": "4.0.1",
|
"version": "4.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.1.1.tgz",
|
||||||
"integrity": "sha512-gAqOjLiHoED79iYTt3F4uSHrYmg/GPz/zGezdB0jAdr6S6gwNiR/j7cTZ8nREKVzMVKLd9G3xbg1sV9GClW3sw==",
|
"integrity": "sha512-jzYsNciHoa4Z3c1URtmeT/bamYm8Dwfw6vuN3WHIE/BXb1iC4KveAnXDErTAZtPVxTYBaYn3n2gbt6F6D2rm1A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/json-schema": "^7.0.3",
|
"@types/json-schema": "^7.0.3",
|
||||||
"@typescript-eslint/scope-manager": "4.0.1",
|
"@typescript-eslint/scope-manager": "4.1.1",
|
||||||
"@typescript-eslint/types": "4.0.1",
|
"@typescript-eslint/types": "4.1.1",
|
||||||
"@typescript-eslint/typescript-estree": "4.0.1",
|
"@typescript-eslint/typescript-estree": "4.1.1",
|
||||||
"eslint-scope": "^5.0.0",
|
"eslint-scope": "^5.0.0",
|
||||||
"eslint-utils": "^2.0.0"
|
"eslint-utils": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/scope-manager": {
|
"@typescript-eslint/scope-manager": {
|
||||||
"version": "4.0.1",
|
"version": "4.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.1.1.tgz",
|
||||||
"integrity": "sha512-u3YEXVJ8jsj7QCJk3om0Y457fy2euEOkkzxIB/LKU3MdyI+FJ2gI0M4aKEaXzwCSfNDiZ13a3lDo5DVozc+XLQ==",
|
"integrity": "sha512-0W8TTobCvIIQ2FsrYTffyZGAAFUyIbEHq5EYJb1m7Rpd005jrnOvKOo8ywCLhs/Bm17C+KsrUboBvBAARQVvyA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/types": "4.0.1",
|
"@typescript-eslint/types": "4.1.1",
|
||||||
"@typescript-eslint/visitor-keys": "4.0.1"
|
"@typescript-eslint/visitor-keys": "4.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/types": {
|
"@typescript-eslint/types": {
|
||||||
"version": "4.0.1",
|
"version": "4.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.1.1.tgz",
|
||||||
"integrity": "sha512-S+gD3fgbkZYW2rnbjugNMqibm9HpEjqZBZkTiI3PwbbNGWmAcxolWIUwZ0SKeG4Dy2ktpKKaI/6+HGYVH8Qrlg=="
|
"integrity": "sha512-zrBiqOKYerMTllKcn+BP+i1b7LW/EbMMYytroXMxUTvFPn1smkCu0D7lSAx29fTUO4jnwV0ljSvYQtn2vNrNxA=="
|
||||||
},
|
},
|
||||||
"@typescript-eslint/typescript-estree": {
|
"@typescript-eslint/typescript-estree": {
|
||||||
"version": "4.0.1",
|
"version": "4.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.1.1.tgz",
|
||||||
"integrity": "sha512-zGzleORFXrRWRJAMLTB2iJD1IZbCPkg4hsI8mGdpYlKaqzvKYSEWVAYh14eauaR+qIoZVWrXgYSXqLtTlxotiw==",
|
"integrity": "sha512-2AUg5v0liVBsqbGxBphbJ0QbGqSRVaF5qPoTPWcxop+66vMdU1h4CCvHxTC47+Qb+Pr4l2RhXDd41JNpwcQEKw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/types": "4.0.1",
|
"@typescript-eslint/types": "4.1.1",
|
||||||
"@typescript-eslint/visitor-keys": "4.0.1",
|
"@typescript-eslint/visitor-keys": "4.1.1",
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.1.1",
|
||||||
"globby": "^11.0.1",
|
"globby": "^11.0.1",
|
||||||
"is-glob": "^4.0.1",
|
"is-glob": "^4.0.1",
|
||||||
|
@ -2346,11 +2351,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/visitor-keys": {
|
"@typescript-eslint/visitor-keys": {
|
||||||
"version": "4.0.1",
|
"version": "4.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.1.1.tgz",
|
||||||
"integrity": "sha512-yBSqd6FjnTzbg5RUy9J+9kJEyQjTI34JdGMJz+9ttlJzLCnGkBikxw+N5n2VDcc3CesbIEJ0MnZc5uRYnrEnCw==",
|
"integrity": "sha512-/EOOXbA2ferGLG6RmCHEQ0lTTLkOlXYDgblCmQk3tIU7mTPLm4gKhFMeeUSe+bcchTUsKeCk8xcpbop5Zr/8Rw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/types": "4.0.1",
|
"@typescript-eslint/types": "4.1.1",
|
||||||
"eslint-visitor-keys": "^2.0.0"
|
"eslint-visitor-keys": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -3407,9 +3412,9 @@
|
||||||
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
|
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
|
||||||
},
|
},
|
||||||
"java-caller": {
|
"java-caller": {
|
||||||
"version": "2.2.3",
|
"version": "2.2.4",
|
||||||
"resolved": "https://registry.npmjs.org/java-caller/-/java-caller-2.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/java-caller/-/java-caller-2.2.4.tgz",
|
||||||
"integrity": "sha512-NHOO3UVafHZaMK8QPgOM5Ge5VGa/7kNVv2OLJefXovcf3dNAo6eZLWa+Eu2lthp5TOYf+s2olzoK67qTgupmaA==",
|
"integrity": "sha512-c6pG483U+KKkP0Qz8BN6Lj+EPShFHHYHZhfnnTYG1JaSpMCguZd2xUSjOx552Z95JFrKZD9Q1ODul7OF4/W/RQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.1.1",
|
||||||
"fs-extra": "^9.0.1",
|
"fs-extra": "^9.0.1",
|
||||||
|
@ -3485,9 +3490,9 @@
|
||||||
"integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw=="
|
"integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw=="
|
||||||
},
|
},
|
||||||
"json-parse-even-better-errors": {
|
"json-parse-even-better-errors": {
|
||||||
"version": "2.3.0",
|
"version": "2.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
|
||||||
"integrity": "sha512-o3aP+RsWDJZayj1SbHNQAI8x0v3T3SKiGoZlNYfbUP1S3omJQ6i9CnqADqkSPaOAxwua4/1YWx5CM7oiChJt2Q=="
|
"integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w=="
|
||||||
},
|
},
|
||||||
"json-schema": {
|
"json-schema": {
|
||||||
"version": "0.2.3",
|
"version": "0.2.3",
|
||||||
|
@ -4016,9 +4021,9 @@
|
||||||
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
|
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
|
||||||
},
|
},
|
||||||
"node-releases": {
|
"node-releases": {
|
||||||
"version": "1.1.60",
|
"version": "1.1.61",
|
||||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.60.tgz",
|
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.61.tgz",
|
||||||
"integrity": "sha512-gsO4vjEdQaTusZAEebUWp2a5d7dF5DYoIpDG7WySnk7BuZDW+GPpHXoXXuYawRBr/9t5q54tirPz79kFIWg4dA=="
|
"integrity": "sha512-DD5vebQLg8jLCOzwupn954fbIiZht05DAZs0k2u8NStSe6h9XdsuIQL8hSRKYiU8WUQRznmSDrKGbv3ObOmC7g=="
|
||||||
},
|
},
|
||||||
"nomnom": {
|
"nomnom": {
|
||||||
"version": "1.8.1",
|
"version": "1.8.1",
|
||||||
|
@ -4085,9 +4090,9 @@
|
||||||
"integrity": "sha1-0LFF62kRicY6eNIB3E/bEpPvDAM="
|
"integrity": "sha1-0LFF62kRicY6eNIB3E/bEpPvDAM="
|
||||||
},
|
},
|
||||||
"npm-groovy-lint": {
|
"npm-groovy-lint": {
|
||||||
"version": "7.6.1",
|
"version": "7.6.3",
|
||||||
"resolved": "https://registry.npmjs.org/npm-groovy-lint/-/npm-groovy-lint-7.6.1.tgz",
|
"resolved": "https://registry.npmjs.org/npm-groovy-lint/-/npm-groovy-lint-7.6.3.tgz",
|
||||||
"integrity": "sha512-JPbBejvEjH08QlyLGOU+IMcUS8HuIAk8Z/6onL9u3ToTSWzZTlVPYrPpAxem2cpsh6MvwUwgK4QowB3icxkuew==",
|
"integrity": "sha512-01cRbwhAZ9TXEKVYAnUerhXpBBnZDsU75TjRkxqq+Li4roqvzgMxVKSHi9QDPUt3c87xBWysPtJbUhbMURLHuQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"amplitude": "^5.1.2",
|
"amplitude": "^5.1.2",
|
||||||
"ansi-colors": "^4.1.1",
|
"ansi-colors": "^4.1.1",
|
||||||
|
@ -4757,9 +4762,9 @@
|
||||||
"integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ="
|
"integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ="
|
||||||
},
|
},
|
||||||
"prettier": {
|
"prettier": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.2.tgz",
|
||||||
"integrity": "sha512-9bY+5ZWCfqj3ghYBLxApy2zf6m+NJo5GzmLTpr9FsApsfjriNnS2dahWReHMi7qNPhhHl9SYHJs2cHZLgexNIw=="
|
"integrity": "sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg=="
|
||||||
},
|
},
|
||||||
"prettier-linter-helpers": {
|
"prettier-linter-helpers": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
@ -5661,9 +5666,9 @@
|
||||||
"integrity": "sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI="
|
"integrity": "sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI="
|
||||||
},
|
},
|
||||||
"stylelint": {
|
"stylelint": {
|
||||||
"version": "13.7.0",
|
"version": "13.7.1",
|
||||||
"resolved": "https://registry.npmjs.org/stylelint/-/stylelint-13.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/stylelint/-/stylelint-13.7.1.tgz",
|
||||||
"integrity": "sha512-1wStd4zVetnlHO98VjcHQbjSDmvcA39smkZQMct2cf+hom40H0xlQNdzzbswoG/jGBh61/Ue9m7Lu99PY51O6A==",
|
"integrity": "sha512-qzqazcyRxrSRdmFuO0/SZOJ+LyCxYy0pwcvaOBBnl8/2VfHSMrtNIE+AnyJoyq6uKb+mt+hlgmVrvVi6G6XHfQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@stylelint/postcss-css-in-js": "^0.37.2",
|
"@stylelint/postcss-css-in-js": "^0.37.2",
|
||||||
"@stylelint/postcss-markdown": "^0.36.1",
|
"@stylelint/postcss-markdown": "^0.36.1",
|
||||||
|
@ -5716,9 +5721,9 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ajv": {
|
"ajv": {
|
||||||
"version": "6.12.4",
|
"version": "6.12.5",
|
||||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz",
|
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.5.tgz",
|
||||||
"integrity": "sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==",
|
"integrity": "sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"fast-deep-equal": "^3.1.1",
|
"fast-deep-equal": "^3.1.1",
|
||||||
"fast-json-stable-stringify": "^2.0.0",
|
"fast-json-stable-stringify": "^2.0.0",
|
||||||
|
@ -5792,9 +5797,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"table": {
|
"table": {
|
||||||
"version": "6.0.1",
|
"version": "6.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/table/-/table-6.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/table/-/table-6.0.3.tgz",
|
||||||
"integrity": "sha512-fmr6168splcy/3XIvhSm5w6hYYOqyr3plAsd7OqoerzyoMnIpoxYuwrpdO2Cm22dh6KCnvirvigPrFZp+tdWFA==",
|
"integrity": "sha512-8321ZMcf1B9HvVX/btKv8mMZahCjn2aYrDlpqHaBFCfnox64edeH9kEid0vTLTRR8gWR2A20aDgeuTTea4sVtw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"ajv": "^6.12.4",
|
"ajv": "^6.12.4",
|
||||||
"lodash": "^4.17.20",
|
"lodash": "^4.17.20",
|
||||||
|
@ -6016,9 +6021,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"typescript": {
|
"typescript": {
|
||||||
"version": "4.0.2",
|
"version": "4.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.3.tgz",
|
||||||
"integrity": "sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ=="
|
"integrity": "sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg=="
|
||||||
},
|
},
|
||||||
"uc.micro": {
|
"uc.micro": {
|
||||||
"version": "1.0.6",
|
"version": "1.0.6",
|
||||||
|
@ -6286,21 +6291,49 @@
|
||||||
"integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg=="
|
"integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg=="
|
||||||
},
|
},
|
||||||
"yargs": {
|
"yargs": {
|
||||||
"version": "15.4.1",
|
"version": "16.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/yargs/-/yargs-16.0.3.tgz",
|
||||||
"integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
|
"integrity": "sha512-6+nLw8xa9uK1BOEOykaiYAJVh6/CjxWXK/q9b5FpRgNslt8s22F2xMBqVIKgCRjNgGvGPBy8Vog7WN7yh4amtA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"cliui": "^6.0.0",
|
"cliui": "^7.0.0",
|
||||||
"decamelize": "^1.2.0",
|
"escalade": "^3.0.2",
|
||||||
"find-up": "^4.1.0",
|
"get-caller-file": "^2.0.5",
|
||||||
"get-caller-file": "^2.0.1",
|
|
||||||
"require-directory": "^2.1.1",
|
"require-directory": "^2.1.1",
|
||||||
"require-main-filename": "^2.0.0",
|
|
||||||
"set-blocking": "^2.0.0",
|
|
||||||
"string-width": "^4.2.0",
|
"string-width": "^4.2.0",
|
||||||
"which-module": "^2.0.0",
|
"y18n": "^5.0.1",
|
||||||
"y18n": "^4.0.0",
|
"yargs-parser": "^20.0.0"
|
||||||
"yargs-parser": "^18.1.2"
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"cliui": {
|
||||||
|
"version": "7.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.1.tgz",
|
||||||
|
"integrity": "sha512-rcvHOWyGyid6I1WjT/3NatKj2kDt9OdSHSXpyLXaMWFbKpGACNW8pRhhdPUq9MWUOdwn8Rz9AVETjF4105rZZQ==",
|
||||||
|
"requires": {
|
||||||
|
"string-width": "^4.2.0",
|
||||||
|
"strip-ansi": "^6.0.0",
|
||||||
|
"wrap-ansi": "^7.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"wrap-ansi": {
|
||||||
|
"version": "7.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
|
||||||
|
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
|
||||||
|
"requires": {
|
||||||
|
"ansi-styles": "^4.0.0",
|
||||||
|
"string-width": "^4.1.0",
|
||||||
|
"strip-ansi": "^6.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"y18n": {
|
||||||
|
"version": "5.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.1.tgz",
|
||||||
|
"integrity": "sha512-/jJ831jEs4vGDbYPQp4yGKDYPSCCEQ45uZWJHE1AoYBzqdZi8+LDWas0z4HrmJXmKdpFsTiowSHXdxyFhpmdMg=="
|
||||||
|
},
|
||||||
|
"yargs-parser": {
|
||||||
|
"version": "20.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.0.0.tgz",
|
||||||
|
"integrity": "sha512-8eblPHTL7ZWRkyjIZJjnGf+TijiKJSwA24svzLRVvtgoi/RZiKa9fFQTrlx0OKLnyHSdt/enrdadji6WFfESVA=="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"yargs-parser": {
|
"yargs-parser": {
|
||||||
|
|
16
dependencies/package.json
vendored
16
dependencies/package.json
vendored
|
@ -1,28 +1,28 @@
|
||||||
{
|
{
|
||||||
"name": "super-linter",
|
"name": "super-linter",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@coffeelint/cli": "^3.2.10",
|
"@coffeelint/cli": "^4.0.0",
|
||||||
"@stoplight/spectral": "^5.5.0",
|
"@stoplight/spectral": "^5.5.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.0.0",
|
"@typescript-eslint/eslint-plugin": "^4.0.0",
|
||||||
"@typescript-eslint/parser": "^3.10.1",
|
"@typescript-eslint/parser": "^3.10.1",
|
||||||
"asl-validator": "^1.7.1",
|
"asl-validator": "^1.8.0",
|
||||||
"babel-eslint": "^10.1.0",
|
"babel-eslint": "^10.1.0",
|
||||||
"dockerfilelint": "^1.8.0",
|
"dockerfilelint": "^1.8.0",
|
||||||
"eslint": "^7.8.1",
|
"eslint": "^7.9.0",
|
||||||
"eslint-config-airbnb": "^18.2.0",
|
"eslint-config-airbnb": "^18.2.0",
|
||||||
"eslint-config-prettier": "^6.11.0",
|
"eslint-config-prettier": "^6.11.0",
|
||||||
"eslint-plugin-jest": "^24.0.0",
|
"eslint-plugin-jest": "^24.0.2",
|
||||||
"eslint-plugin-prettier": "^3.1.4",
|
"eslint-plugin-prettier": "^3.1.4",
|
||||||
"htmlhint": "^0.14.1",
|
"htmlhint": "^0.14.1",
|
||||||
"jsonlint": "^1.6.3",
|
"jsonlint": "^1.6.3",
|
||||||
"markdownlint-cli": "^0.23.2",
|
"markdownlint-cli": "^0.23.2",
|
||||||
"npm-groovy-lint": "^7.6.1",
|
"npm-groovy-lint": "^7.6.3",
|
||||||
"prettier": "^2.1.1",
|
"prettier": "^2.1.2",
|
||||||
"prettyjson": "^1.2.1",
|
"prettyjson": "^1.2.1",
|
||||||
"sql-lint": "0.0.15",
|
"sql-lint": "0.0.15",
|
||||||
"standard": "^14.3.4",
|
"standard": "^14.3.4",
|
||||||
"stylelint": "^13.7.0",
|
"stylelint": "^13.7.1",
|
||||||
"stylelint-config-standard": "^20.0.0",
|
"stylelint-config-standard": "^20.0.0",
|
||||||
"typescript": "^4.0.2"
|
"typescript": "^4.0.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,9 +30,10 @@ For some linters it is also possible to override rules on a case by case level w
|
||||||
- [Groovy](#groovy)
|
- [Groovy](#groovy)
|
||||||
- [HTML](#html)
|
- [HTML](#html)
|
||||||
- [Java](#java)
|
- [Java](#java)
|
||||||
- [Javascript eslint](#javascript-eslint)
|
- [JavaScript eslint](#javascript-eslint)
|
||||||
- [Javascript standard](#javascript-standard)
|
- [JavaScript standard](#javascript-standard)
|
||||||
- [JSON](#json)
|
- [JSON](#json)
|
||||||
|
- [Kubeval](#kubeval)
|
||||||
- [Kotlin](#kotlin)
|
- [Kotlin](#kotlin)
|
||||||
- [LaTeX](#latex)
|
- [LaTeX](#latex)
|
||||||
- [Lua](#lua)
|
- [Lua](#lua)
|
||||||
|
@ -488,17 +489,17 @@ def variable = 1;
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Javascript eslint
|
## JavaScript eslint
|
||||||
|
|
||||||
- [eslint](https://eslint.org/)
|
- [eslint](https://eslint.org/)
|
||||||
|
|
||||||
### Javascript eslint Config file
|
### JavaScript eslint Config file
|
||||||
|
|
||||||
- `.github/linters/.eslintrc.yml`
|
- `.github/linters/.eslintrc.yml`
|
||||||
- You can pass multiple rules and overwrite default rules
|
- You can pass multiple rules and overwrite default rules
|
||||||
- File should be located at: `.github/linters/.eslintrc.yml`
|
- File should be located at: `.github/linters/.eslintrc.yml`
|
||||||
|
|
||||||
### Javascript eslint disable single line
|
### JavaScript eslint disable single line
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
var thing = new Thing(); // eslint-disable-line no-use-before-define
|
var thing = new Thing(); // eslint-disable-line no-use-before-define
|
||||||
|
@ -511,7 +512,7 @@ function Thing() {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Javascript eslint disable code block
|
### JavaScript eslint disable code block
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
/*eslint-disable */
|
/*eslint-disable */
|
||||||
|
@ -522,7 +523,7 @@ alert("foo");
|
||||||
/*eslint-enable */
|
/*eslint-enable */
|
||||||
```
|
```
|
||||||
|
|
||||||
### Javascript eslint disable entire file
|
### JavaScript eslint disable entire file
|
||||||
|
|
||||||
- Place at the top of the file:
|
- Place at the top of the file:
|
||||||
|
|
||||||
|
@ -532,23 +533,23 @@ alert("foo");
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Javascript standard
|
## JavaScript standard
|
||||||
|
|
||||||
- [standard js](https://standardjs.com/)
|
- [standard js](https://standardjs.com/)
|
||||||
|
|
||||||
### Javascript standard Config file
|
### JavaScript standard Config file
|
||||||
|
|
||||||
- There is no top level _configuration file_ available at this time
|
- There is no top level _configuration file_ available at this time
|
||||||
|
|
||||||
### Javascript standard disable single line
|
### JavaScript standard disable single line
|
||||||
|
|
||||||
- There is currently **No** way to disable rules inline of the file(s)
|
- There is currently **No** way to disable rules inline of the file(s)
|
||||||
|
|
||||||
### Javascript standard disable code block
|
### JavaScript standard disable code block
|
||||||
|
|
||||||
- There is currently **No** way to disable rules inline of the file(s)
|
- There is currently **No** way to disable rules inline of the file(s)
|
||||||
|
|
||||||
### Javascript standard disable entire file
|
### JavaScript standard disable entire file
|
||||||
|
|
||||||
- There is currently **No** way to disable rules inline of the file(s)
|
- There is currently **No** way to disable rules inline of the file(s)
|
||||||
|
|
||||||
|
@ -605,6 +606,16 @@ import package.b.*
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Kubernetes
|
||||||
|
|
||||||
|
- [kubeval](https://github.com/instrumenta/kubeval)
|
||||||
|
|
||||||
|
### Kubeval
|
||||||
|
|
||||||
|
- There is no top level _configuration file_ available at this time
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## LaTeX
|
## LaTeX
|
||||||
|
|
||||||
- [ChkTex](https://www.nongnu.org/chktex/)
|
- [ChkTex](https://www.nongnu.org/chktex/)
|
||||||
|
|
|
@ -591,6 +591,16 @@ function BuildFileList() {
|
||||||
READ_ONLY_CHANGE_FLAG=1
|
READ_ONLY_CHANGE_FLAG=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
############################################
|
||||||
|
# Check if the file is Kubernetes template #
|
||||||
|
############################################
|
||||||
|
if DetectKubernetesFile "${FILE}"; then
|
||||||
|
################################
|
||||||
|
# Append the file to the array #
|
||||||
|
################################
|
||||||
|
FILE_ARRAY_KUBERNETES+=("${FILE}")
|
||||||
|
fi
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# We have something that we need to try to check file type another way #
|
# We have something that we need to try to check file type another way #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
269
lib/linter.sh
269
lib/linter.sh
|
@ -59,7 +59,7 @@ GROOVY_FILE_NAME='.groovylintrc.json' # Name of th
|
||||||
GROOVY_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${GROOVY_FILE_NAME}" # Path to the Groovy lint rules
|
GROOVY_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${GROOVY_FILE_NAME}" # Path to the Groovy lint rules
|
||||||
# HTML Vars
|
# HTML Vars
|
||||||
HTML_FILE_NAME='.htmlhintrc' # Name of the file
|
HTML_FILE_NAME='.htmlhintrc' # Name of the file
|
||||||
HTML_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${HTML_FILE_NAME}" # Path to the CSS lint rules
|
HTML_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${HTML_FILE_NAME}" # Path to the HTML lint rules
|
||||||
# Java Vars
|
# Java Vars
|
||||||
JAVA_FILE_NAME="sun_checks.xml" # Name of the Java config file
|
JAVA_FILE_NAME="sun_checks.xml" # Name of the Java config file
|
||||||
JAVA_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${JAVA_FILE_NAME}" # Path to the Java lint rules
|
JAVA_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${JAVA_FILE_NAME}" # Path to the Java lint rules
|
||||||
|
@ -142,7 +142,7 @@ YAML_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${YAML_FILE_NAME}" # Path to the ya
|
||||||
#############################
|
#############################
|
||||||
LANGUAGE_ARRAY=('ANSIBLE' 'ARM' 'BASH' 'BASH_EXEC' 'CLOUDFORMATION' 'CLOJURE' 'COFFEESCRIPT' 'CSHARP' 'CSS'
|
LANGUAGE_ARRAY=('ANSIBLE' 'ARM' 'BASH' 'BASH_EXEC' 'CLOUDFORMATION' 'CLOJURE' 'COFFEESCRIPT' 'CSHARP' 'CSS'
|
||||||
'DART' 'DOCKERFILE' 'DOCKERFILE_HADOLINT' 'EDITORCONFIG' 'ENV' 'GO' 'GROOVY' 'HTML'
|
'DART' 'DOCKERFILE' 'DOCKERFILE_HADOLINT' 'EDITORCONFIG' 'ENV' 'GO' 'GROOVY' 'HTML'
|
||||||
'JAVA' 'JAVASCRIPT_ES' 'JAVASCRIPT_STANDARD' 'JSON' 'JSX' 'KOTLIN' 'LATEX' 'LUA' 'MARKDOWN'
|
'JAVA' 'JAVASCRIPT_ES' 'JAVASCRIPT_STANDARD' 'JSON' 'JSX' 'KUBERNETES_KUBEVAL' 'KOTLIN' 'LATEX' 'LUA' 'MARKDOWN'
|
||||||
'OPENAPI' 'PERL' 'PHP_BUILTIN' 'PHP_PHPCS' 'PHP_PHPSTAN' 'PHP_PSALM' 'POWERSHELL'
|
'OPENAPI' 'PERL' 'PHP_BUILTIN' 'PHP_PHPCS' 'PHP_PHPSTAN' 'PHP_PSALM' 'POWERSHELL'
|
||||||
'PROTOBUF' 'PYTHON_BLACK' 'PYTHON_PYLINT' 'PYTHON_FLAKE8' 'R' 'RAKU' 'RUBY' 'SHELL_SHFMT' 'SNAKEMAKE_LINT' 'SNAKEMAKE_SNAKEFMT' 'STATES' 'SQL' 'TERRAFORM'
|
'PROTOBUF' 'PYTHON_BLACK' 'PYTHON_PYLINT' 'PYTHON_FLAKE8' 'R' 'RAKU' 'RUBY' 'SHELL_SHFMT' 'SNAKEMAKE_LINT' 'SNAKEMAKE_SNAKEFMT' 'STATES' 'SQL' 'TERRAFORM'
|
||||||
'TERRAFORM_TERRASCAN' 'TSX' 'TYPESCRIPT_ES' 'TYPESCRIPT_STANDARD' 'XML' 'YAML')
|
'TERRAFORM_TERRASCAN' 'TSX' 'TYPESCRIPT_ES' 'TYPESCRIPT_STANDARD' 'XML' 'YAML')
|
||||||
|
@ -166,6 +166,7 @@ GITHUB_RUN_ID="${GITHUB_RUN_ID}" # GitHub RU
|
||||||
GITHUB_SHA="${GITHUB_SHA}" # GitHub sha from the commit
|
GITHUB_SHA="${GITHUB_SHA}" # GitHub sha from the commit
|
||||||
GITHUB_TOKEN="${GITHUB_TOKEN}" # GitHub Token passed from environment
|
GITHUB_TOKEN="${GITHUB_TOKEN}" # GitHub Token passed from environment
|
||||||
GITHUB_WORKSPACE="${GITHUB_WORKSPACE}" # Github Workspace
|
GITHUB_WORKSPACE="${GITHUB_WORKSPACE}" # Github Workspace
|
||||||
|
KUBERNETES_DIRECTORY="${KUBERNETES_DIRECTORY}" # Kubernetes directory
|
||||||
LOG_FILE="${LOG_FILE:-super-linter.log}" # Default log file name (located in GITHUB_WORKSPACE folder)
|
LOG_FILE="${LOG_FILE:-super-linter.log}" # Default log file name (located in GITHUB_WORKSPACE folder)
|
||||||
LOG_LEVEL="${LOG_LEVEL:-VERBOSE}" # Default log level (VERBOSE, DEBUG, TRACE)
|
LOG_LEVEL="${LOG_LEVEL:-VERBOSE}" # Default log level (VERBOSE, DEBUG, TRACE)
|
||||||
MULTI_STATUS="${MULTI_STATUS:-true}" # Multiple status are created for each check ran
|
MULTI_STATUS="${MULTI_STATUS:-true}" # Multiple status are created for each check ran
|
||||||
|
@ -193,6 +194,7 @@ VALIDATE_JAVASCRIPT_ES="${VALIDATE_JAVASCRIPT_ES}" # Boolean t
|
||||||
VALIDATE_JAVASCRIPT_STANDARD="${VALIDATE_JAVASCRIPT_STANDARD}" # Boolean to validate language
|
VALIDATE_JAVASCRIPT_STANDARD="${VALIDATE_JAVASCRIPT_STANDARD}" # Boolean to validate language
|
||||||
VALIDATE_JSON="${VALIDATE_JSON}" # Boolean to validate language
|
VALIDATE_JSON="${VALIDATE_JSON}" # Boolean to validate language
|
||||||
VALIDATE_JSX="${VALIDATE_JSX}" # Boolean to validate language
|
VALIDATE_JSX="${VALIDATE_JSX}" # Boolean to validate language
|
||||||
|
VALIDATE_KUBERNETES_KUBEVAL="${VALIDATE_KUBERNETES_KUBEVAL}" # Boolean to validate language
|
||||||
VALIDATE_KOTLIN="${VALIDATE_KOTLIN}" # Boolean to validate language
|
VALIDATE_KOTLIN="${VALIDATE_KOTLIN}" # Boolean to validate language
|
||||||
VALIDATE_LATEX="${VALIDATE_LATEX}" # Boolean to validate language
|
VALIDATE_LATEX="${VALIDATE_LATEX}" # Boolean to validate language
|
||||||
VALIDATE_LUA="${VALIDATE_LUA}" # Boolean to validate language
|
VALIDATE_LUA="${VALIDATE_LUA}" # Boolean to validate language
|
||||||
|
@ -257,14 +259,14 @@ DEFAULT_IFS="${IFS}" # Get the Default IFS for up
|
||||||
###############################################################
|
###############################################################
|
||||||
DEFAULT_DISABLE_ERRORS='false' # Default to enabling errors
|
DEFAULT_DISABLE_ERRORS='false' # Default to enabling errors
|
||||||
export DEFAULT_DISABLE_ERRORS # Workaround SC2034
|
export DEFAULT_DISABLE_ERRORS # Workaround SC2034
|
||||||
|
ERROR_ON_MISSING_EXEC_BIT="${ERROR_ON_MISSING_EXEC_BIT:-false}" # Default to report a warning if a shell script doesn't have the executable bit set to 1
|
||||||
|
export ERROR_ON_MISSING_EXEC_BIT
|
||||||
RAW_FILE_ARRAY=() # Array of all files that were changed
|
RAW_FILE_ARRAY=() # Array of all files that were changed
|
||||||
export RAW_FILE_ARRAY # Workaround SC2034
|
export RAW_FILE_ARRAY # Workaround SC2034
|
||||||
READ_ONLY_CHANGE_FLAG=0 # Flag set to 1 if files changed are not txt or md
|
READ_ONLY_CHANGE_FLAG=0 # Flag set to 1 if files changed are not txt or md
|
||||||
export READ_ONLY_CHANGE_FLAG # Workaround SC2034
|
export READ_ONLY_CHANGE_FLAG # Workaround SC2034
|
||||||
TEST_CASE_FOLDER='.automation/test' # Folder for test cases we should always ignore
|
TEST_CASE_FOLDER='.automation/test' # Folder for test cases we should always ignore
|
||||||
export TEST_CASE_FOLDER # Workaround SC2034
|
export TEST_CASE_FOLDER # Workaround SC2034
|
||||||
DEFAULT_ANSIBLE_DIRECTORY="${GITHUB_WORKSPACE}/ansible" # Default Ansible Directory
|
|
||||||
export DEFAULT_ANSIBLE_DIRECTORY # Workaround SC2034
|
|
||||||
WARNING_ARRAY_TEST=() # Array of warning linters that did not have an expected test result.
|
WARNING_ARRAY_TEST=() # Array of warning linters that did not have an expected test result.
|
||||||
export WARNING_ARRAY_TEST # Workaround SC2034
|
export WARNING_ARRAY_TEST # Workaround SC2034
|
||||||
|
|
||||||
|
@ -274,7 +276,6 @@ export WARNING_ARRAY_TEST # Workaround SC2034
|
||||||
OUTPUT_FORMAT="${OUTPUT_FORMAT}" # Output format to be generated. Default none
|
OUTPUT_FORMAT="${OUTPUT_FORMAT}" # Output format to be generated. Default none
|
||||||
OUTPUT_FOLDER="${OUTPUT_FOLDER:-super-linter.report}" # Folder where the reports are generated. Default super-linter.report
|
OUTPUT_FOLDER="${OUTPUT_FOLDER:-super-linter.report}" # Folder where the reports are generated. Default super-linter.report
|
||||||
OUTPUT_DETAILS="${OUTPUT_DETAILS:-simpler}" # What level of details. (simpler or detailed). Default simpler
|
OUTPUT_DETAILS="${OUTPUT_DETAILS:-simpler}" # What level of details. (simpler or detailed). Default simpler
|
||||||
REPORT_OUTPUT_FOLDER="${GITHUB_WORKSPACE}/${OUTPUT_FOLDER}" # Location for the report folder
|
|
||||||
|
|
||||||
##########################
|
##########################
|
||||||
# Array of changed files #
|
# Array of changed files #
|
||||||
|
@ -297,6 +298,7 @@ FILE_ARRAY_JAVASCRIPT_ES=() # Array of files to check
|
||||||
FILE_ARRAY_JAVASCRIPT_STANDARD=() # Array of files to check
|
FILE_ARRAY_JAVASCRIPT_STANDARD=() # Array of files to check
|
||||||
FILE_ARRAY_JSON=() # Array of files to check
|
FILE_ARRAY_JSON=() # Array of files to check
|
||||||
FILE_ARRAY_JSX=() # Array of files to check
|
FILE_ARRAY_JSX=() # Array of files to check
|
||||||
|
FILE_ARRAY_KUBERNETES=()
|
||||||
FILE_ARRAY_KOTLIN=() # Array of files to check
|
FILE_ARRAY_KOTLIN=() # Array of files to check
|
||||||
FILE_ARRAY_LATEX=() # Array of files to check
|
FILE_ARRAY_LATEX=() # Array of files to check
|
||||||
FILE_ARRAY_LUA=() # Array of files to check
|
FILE_ARRAY_LUA=() # Array of files to check
|
||||||
|
@ -372,6 +374,8 @@ ERRORS_FOUND_JSON=0 # Count of errors found
|
||||||
export ERRORS_FOUND_JSON # Workaround SC2034
|
export ERRORS_FOUND_JSON # Workaround SC2034
|
||||||
ERRORS_FOUND_JSX=0 # Count of errors found
|
ERRORS_FOUND_JSX=0 # Count of errors found
|
||||||
export ERRORS_FOUND_JSX # Workaround SC2034
|
export ERRORS_FOUND_JSX # Workaround SC2034
|
||||||
|
ERRORS_FOUND_KUBERNETES_KUBEVAL=0 # Count of errors found
|
||||||
|
export ERRORS_FOUND_KUBERNETES_KUBEVAL
|
||||||
ERRORS_FOUND_KOTLIN=0 # Count of errors found
|
ERRORS_FOUND_KOTLIN=0 # Count of errors found
|
||||||
export ERRORS_FOUND_KOTLIN # Workaround SC2034
|
export ERRORS_FOUND_KOTLIN # Workaround SC2034
|
||||||
ERRORS_FOUND_LATEX=0 # Count of errors found
|
ERRORS_FOUND_LATEX=0 # Count of errors found
|
||||||
|
@ -739,6 +743,24 @@ DetectCloudFormationFile() {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
################################################################################
|
################################################################################
|
||||||
|
#### Function DetectKubernetesFile #########################################
|
||||||
|
DetectKubernetesFile() {
|
||||||
|
################
|
||||||
|
# Pull in Vars #
|
||||||
|
################
|
||||||
|
FILE="${1}" # File that we need to validate
|
||||||
|
debug "Checking if ${FILE} is a Kubernetes descriptor..."
|
||||||
|
|
||||||
|
if grep -q -E '(apiVersion):' "${FILE}" >/dev/null; then
|
||||||
|
debug "${FILE} is a Kubernetes descriptor"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
debug "${FILE} is NOT a Kubernetes descriptor"
|
||||||
|
return 1
|
||||||
|
|
||||||
|
}
|
||||||
|
################################################################################
|
||||||
#### Function DetectAWSStatesFIle ##############################################
|
#### Function DetectAWSStatesFIle ##############################################
|
||||||
DetectAWSStatesFIle() {
|
DetectAWSStatesFIle() {
|
||||||
################
|
################
|
||||||
|
@ -1221,6 +1243,15 @@ fi
|
||||||
# needed to connect back and update checks
|
# needed to connect back and update checks
|
||||||
GetGitHubVars
|
GetGitHubVars
|
||||||
|
|
||||||
|
########################################################
|
||||||
|
# Initialize variables that depend on GitHub variables #
|
||||||
|
########################################################
|
||||||
|
DEFAULT_ANSIBLE_DIRECTORY="${GITHUB_WORKSPACE}/ansible" # Default Ansible Directory
|
||||||
|
export DEFAULT_ANSIBLE_DIRECTORY # Workaround SC2034
|
||||||
|
DEFAULT_KUBERNETES_DIRECTORY="${GITHUB_WORKSPACE}/kubernetes" # Default Kubernetes Directory
|
||||||
|
export DEFAULT_KUBERNETES_DIRECTORY # Workaround SC2034
|
||||||
|
REPORT_OUTPUT_FOLDER="${GITHUB_WORKSPACE}/${OUTPUT_FOLDER}" # Location for the report folder
|
||||||
|
|
||||||
#########################################
|
#########################################
|
||||||
# Get the languages we need to validate #
|
# Get the languages we need to validate #
|
||||||
#########################################
|
#########################################
|
||||||
|
@ -1269,6 +1300,8 @@ GetLinterRules "PHP_PHPSTAN"
|
||||||
GetLinterRules "PHP_PSALM"
|
GetLinterRules "PHP_PSALM"
|
||||||
# Get PowerShell rules
|
# Get PowerShell rules
|
||||||
GetLinterRules "POWERSHELL"
|
GetLinterRules "POWERSHELL"
|
||||||
|
# Get Protobuff linter rules
|
||||||
|
GetLinterRules "PROTOBUF"
|
||||||
# Get Python pylint rules
|
# Get Python pylint rules
|
||||||
GetLinterRules "PYTHON_PYLINT"
|
GetLinterRules "PYTHON_PYLINT"
|
||||||
# Get Python flake8 rules
|
# Get Python flake8 rules
|
||||||
|
@ -1360,8 +1393,8 @@ if [ "${VALIDATE_ARM}" == "true" ]; then
|
||||||
###############################
|
###############################
|
||||||
# Lint the ARM Template files #
|
# Lint the ARM Template files #
|
||||||
###############################
|
###############################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "ARM" "arm-ttk" "Import-Module ${ARM_TTK_PSD1} ; \${config} = \$(Import-PowerShellDataFile -Path ${ARM_LINTER_RULES}) ; Test-AzTemplate @config -TemplatePath" "disabledfileext" "${FILE_ARRAY_ARM[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "ARM" "arm-ttk" "Import-Module ${ARM_TTK_PSD1} ; \${config} = \$(Import-PowerShellDataFile -Path ${ARM_LINTER_RULES}) ; Test-AzTemplate @config -TemplatePath" "disabledfileext" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_ARM[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
################
|
################
|
||||||
|
@ -1371,8 +1404,8 @@ if [ "${VALIDATE_BASH}" == "true" ]; then
|
||||||
#######################
|
#######################
|
||||||
# Lint the bash files #
|
# Lint the bash files #
|
||||||
#######################
|
#######################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "BASH" "shellcheck" "shellcheck --color --external-sources" "disabledfileext" "${FILE_ARRAY_BASH[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "BASH" "shellcheck" "shellcheck --color --external-sources" "disabledfileext" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_BASH[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#####################
|
#####################
|
||||||
|
@ -1382,8 +1415,8 @@ if [ "${VALIDATE_BASH_EXEC}" == "true" ]; then
|
||||||
#######################
|
#######################
|
||||||
# Lint the bash files #
|
# Lint the bash files #
|
||||||
#######################
|
#######################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "BASH_EXEC" "bash-exec" "bash-exec" "disabledfileext" "${FILE_ARRAY_BASH[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "BASH_EXEC" "bash-exec" "bash-exec" "disabledfileext" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_BASH[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##########################
|
##########################
|
||||||
|
@ -1413,8 +1446,8 @@ if [ "${VALIDATE_CLOUDFORMATION}" == "true" ]; then
|
||||||
#################################
|
#################################
|
||||||
# Lint the CloudFormation files #
|
# Lint the CloudFormation files #
|
||||||
#################################
|
#################################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "CLOUDFORMATION" "cfn-lint" "cfn-lint --config-file ${CLOUDFORMATION_LINTER_RULES}" "disabledfileext" "${FILE_ARRAY_CLOUDFORMATION[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "CLOUDFORMATION" "cfn-lint" "cfn-lint --config-file ${CLOUDFORMATION_LINTER_RULES}" "disabledfileext" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_CLOUDFORMATION[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
###################
|
###################
|
||||||
|
@ -1428,7 +1461,7 @@ if [ "${VALIDATE_CLOJURE}" == "true" ]; then
|
||||||
#########################
|
#########################
|
||||||
# Lint the Clojure files #
|
# Lint the Clojure files #
|
||||||
#########################
|
#########################
|
||||||
LintCodebase "CLOJURE" "clj-kondo" "clj-kondo --config ${CLOJURE_LINTER_RULES} --lint" ".*\.\(clj\|cljs\|cljc\|edn\)\$" "${FILE_ARRAY_CLOJURE[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "CLOJURE" "clj-kondo" "clj-kondo --config ${CLOJURE_LINTER_RULES} --lint" ".*\.\(clj\|cljs\|cljc\|edn\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_CLOJURE[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
########################
|
########################
|
||||||
|
@ -1438,8 +1471,8 @@ if [ "${VALIDATE_COFFEE}" == "true" ]; then
|
||||||
#########################
|
#########################
|
||||||
# Lint the coffee files #
|
# Lint the coffee files #
|
||||||
#########################
|
#########################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "COFFEESCRIPT" "coffeelint" "coffeelint -f ${COFFEESCRIPT_LINTER_RULES}" ".*\.\(coffee\)\$" "${FILE_ARRAY_COFFEESCRIPT[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "COFFEESCRIPT" "coffeelint" "coffeelint -f ${COFFEESCRIPT_LINTER_RULES}" ".*\.\(coffee\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_COFFEESCRIPT[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##################
|
##################
|
||||||
|
@ -1449,8 +1482,8 @@ if [ "${VALIDATE_CSHARP}" == "true" ]; then
|
||||||
#########################
|
#########################
|
||||||
# Lint the C# files #
|
# Lint the C# files #
|
||||||
#########################
|
#########################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "CSHARP" "dotnet-format" "dotnet-format --folder --check --exclude / --include" ".*\.\(cs\)\$" "${FILE_ARRAY_CSHARP[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "CSHARP" "dotnet-format" "dotnet-format --folder --check --exclude / --include" ".*\.\(cs\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_CSHARP[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
###############
|
###############
|
||||||
|
@ -1464,7 +1497,7 @@ if [ "${VALIDATE_CSS}" == "true" ]; then
|
||||||
#############################
|
#############################
|
||||||
# Lint the CSS files #
|
# Lint the CSS files #
|
||||||
#############################
|
#############################
|
||||||
LintCodebase "CSS" "stylelint" "stylelint --config ${CSS_LINTER_RULES}" ".*\.\(css\|scss\|sass\)\$" "${FILE_ARRAY_CSS[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "CSS" "stylelint" "stylelint --config ${CSS_LINTER_RULES}" ".*\.\(css\|scss\|sass\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_CSS[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
################
|
################
|
||||||
|
@ -1474,8 +1507,8 @@ if [ "${VALIDATE_DART}" == "true" ]; then
|
||||||
#######################
|
#######################
|
||||||
# Lint the Dart files #
|
# Lint the Dart files #
|
||||||
#######################
|
#######################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "DART" "dart" "dartanalyzer --fatal-infos --fatal-warnings --options ${DART_LINTER_RULES}" ".*\.\(dart\)\$" "${FILE_ARRAY_DART[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "DART" "dart" "dartanalyzer --fatal-infos --fatal-warnings --options ${DART_LINTER_RULES}" ".*\.\(dart\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_DART[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##################
|
##################
|
||||||
|
@ -1485,9 +1518,9 @@ if [ "${VALIDATE_DOCKERFILE}" == "true" ]; then
|
||||||
#########################
|
#########################
|
||||||
# Lint the docker files #
|
# Lint the docker files #
|
||||||
#########################
|
#########################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
# NOTE: dockerfilelint's "-c" option expects the folder *containing* the DOCKER_LINTER_RULES file
|
# NOTE: dockerfilelint's "-c" option expects the folder *containing* the DOCKER_LINTER_RULES file
|
||||||
LintCodebase "DOCKERFILE" "dockerfilelint" "dockerfilelint -c $(dirname ${DOCKERFILE_LINTER_RULES})" ".*\(Dockerfile\)\$" "${FILE_ARRAY_DOCKERFILE[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "DOCKERFILE" "dockerfilelint" "dockerfilelint -c $(dirname ${DOCKERFILE_LINTER_RULES})" ".*\(Dockerfile\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_DOCKERFILE[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
|
@ -1497,8 +1530,8 @@ if [ "${VALIDATE_DOCKERFILE_HADOLINT}" == "true" ]; then
|
||||||
#########################
|
#########################
|
||||||
# Lint the docker files #
|
# Lint the docker files #
|
||||||
#########################
|
#########################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "DOCKERFILE_HADOLINT" "hadolint" "hadolint -c ${DOCKERFILE_HADOLINT_LINTER_RULES}" ".*\(Dockerfile\)\$" "${FILE_ARRAY_DOCKERFILE[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "DOCKERFILE_HADOLINT" "hadolint" "hadolint -c ${DOCKERFILE_HADOLINT_LINTER_RULES}" ".*\(Dockerfile\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_DOCKERFILE[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
########################
|
########################
|
||||||
|
@ -1508,8 +1541,8 @@ if [ "${VALIDATE_EDITORCONFIG}" == "true" ]; then
|
||||||
####################################
|
####################################
|
||||||
# Lint the files with editorconfig #
|
# Lint the files with editorconfig #
|
||||||
####################################
|
####################################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "EDITORCONFIG" "editorconfig-checker" "editorconfig-checker" "^.*$" "${FILE_ARRAY_ENV[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "EDITORCONFIG" "editorconfig-checker" "editorconfig-checker" "^.*$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_ENV[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
###############
|
###############
|
||||||
|
@ -1519,8 +1552,8 @@ if [ "${VALIDATE_ENV}" == "true" ]; then
|
||||||
#######################
|
#######################
|
||||||
# Lint the env files #
|
# Lint the env files #
|
||||||
#######################
|
#######################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "ENV" "dotenv-linter" "dotenv-linter" ".*\.\(env\).*\$" "${FILE_ARRAY_ENV[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "ENV" "dotenv-linter" "dotenv-linter" ".*\.\(env\).*\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_ENV[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##################
|
##################
|
||||||
|
@ -1530,8 +1563,8 @@ if [ "${VALIDATE_GO}" == "true" ]; then
|
||||||
#########################
|
#########################
|
||||||
# Lint the golang files #
|
# Lint the golang files #
|
||||||
#########################
|
#########################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "GO" "golangci-lint" "golangci-lint run -c ${GO_LINTER_RULES}" ".*\.\(go\)\$" "${FILE_ARRAY_GO[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "GO" "golangci-lint" "golangci-lint run -c ${GO_LINTER_RULES}" ".*\.\(go\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_GO[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##################
|
##################
|
||||||
|
@ -1541,8 +1574,8 @@ if [ "$VALIDATE_GROOVY" == "true" ]; then
|
||||||
#########################
|
#########################
|
||||||
# Lint the groovy files #
|
# Lint the groovy files #
|
||||||
#########################
|
#########################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "GROOVY" "npm-groovy-lint" "npm-groovy-lint -c $GROOVY_LINTER_RULES --failon error" ".*\.\(groovy\|jenkinsfile\|gradle\|nf\)\$" "${FILE_ARRAY_GROOVY[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "GROOVY" "npm-groovy-lint" "npm-groovy-lint -c $GROOVY_LINTER_RULES --failon warning" ".*\.\(groovy\|jenkinsfile\|gradle\|nf\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_GROOVY[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
################
|
################
|
||||||
|
@ -1556,7 +1589,7 @@ if [ "${VALIDATE_HTML}" == "true" ]; then
|
||||||
#######################
|
#######################
|
||||||
# Lint the HTML files #
|
# Lint the HTML files #
|
||||||
#######################
|
#######################
|
||||||
LintCodebase "HTML" "htmlhint" "htmlhint --config ${HTML_LINTER_RULES}" ".*\.\(html\)\$" "${FILE_ARRAY_HTML[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "HTML" "htmlhint" "htmlhint --config ${HTML_LINTER_RULES}" ".*\.\(html\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_HTML[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
################
|
################
|
||||||
|
@ -1566,8 +1599,8 @@ if [ "$VALIDATE_JAVA" == "true" ]; then
|
||||||
#######################
|
#######################
|
||||||
# Lint the JAVA files #
|
# Lint the JAVA files #
|
||||||
#######################
|
#######################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "JAVA" "checkstyle" "java -jar /usr/bin/checkstyle -c ${JAVA_LINTER_RULES}" ".*\.\(java\)\$" "${FILE_ARRAY_JAVA[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "JAVA" "checkstyle" "java -jar /usr/bin/checkstyle -c ${JAVA_LINTER_RULES}" ".*\.\(java\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_JAVA[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
######################
|
######################
|
||||||
|
@ -1577,8 +1610,8 @@ if [ "${VALIDATE_JAVASCRIPT_ES}" == "true" ]; then
|
||||||
#############################
|
#############################
|
||||||
# Lint the Javascript files #
|
# Lint the Javascript files #
|
||||||
#############################
|
#############################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "JAVASCRIPT_ES" "eslint" "eslint --no-eslintrc -c ${JAVASCRIPT_LINTER_RULES}" ".*\.\(js\)\$" "${FILE_ARRAY_JAVASCRIPT_ES[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "JAVASCRIPT_ES" "eslint" "eslint --no-eslintrc -c ${JAVASCRIPT_LINTER_RULES}" ".*\.\(js\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_JAVASCRIPT_ES[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
######################
|
######################
|
||||||
|
@ -1592,8 +1625,8 @@ if [ "${VALIDATE_JAVASCRIPT_STANDARD}" == "true" ]; then
|
||||||
#############################
|
#############################
|
||||||
# Lint the Javascript files #
|
# Lint the Javascript files #
|
||||||
#############################
|
#############################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "JAVASCRIPT_STANDARD" "standard" "standard ${JAVASCRIPT_STANDARD_LINTER_RULES}" ".*\.\(js\)\$" "${FILE_ARRAY_JAVASCRIPT_STANDARD[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "JAVASCRIPT_STANDARD" "standard" "standard ${JAVASCRIPT_STANDARD_LINTER_RULES}" ".*\.\(js\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_JAVASCRIPT_STANDARD[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
################
|
################
|
||||||
|
@ -1603,8 +1636,8 @@ if [ "${VALIDATE_JSON}" == "true" ]; then
|
||||||
#######################
|
#######################
|
||||||
# Lint the json files #
|
# Lint the json files #
|
||||||
#######################
|
#######################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "JSON" "jsonlint" "jsonlint" ".*\.\(json\)\$" "${FILE_ARRAY_JSON[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "JSON" "jsonlint" "jsonlint" ".*\.\(json\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_JSON[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
###############
|
###############
|
||||||
|
@ -1614,8 +1647,8 @@ if [ "${VALIDATE_JSX}" == "true" ]; then
|
||||||
######################
|
######################
|
||||||
# Lint the JSX files #
|
# Lint the JSX files #
|
||||||
######################
|
######################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "JSX" "eslint" "eslint --no-eslintrc -c ${JAVASCRIPT_LINTER_RULES}" ".*\.\(jsx\)\$" "${FILE_ARRAY_JSX[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "JSX" "eslint" "eslint --no-eslintrc -c ${JAVASCRIPT_LINTER_RULES}" ".*\.\(jsx\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_JSX[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##################
|
##################
|
||||||
|
@ -1625,8 +1658,39 @@ if [ "${VALIDATE_KOTLIN}" == "true" ]; then
|
||||||
#######################
|
#######################
|
||||||
# Lint the Kotlin files #
|
# Lint the Kotlin files #
|
||||||
#######################
|
#######################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "KOTLIN" "ktlint" "ktlint" ".*\.\(kt\|kts\)\$" "${FILE_ARRAY_KOTLIN[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "KOTLIN" "ktlint" "ktlint" ".*\.\(kt\|kts\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_KOTLIN[@]}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
##############################
|
||||||
|
# KUBERNETES Kubeval LINTING #
|
||||||
|
##############################
|
||||||
|
if [ "${VALIDATE_KUBERNETES_KUBEVAL}" == "true" ]; then
|
||||||
|
if [ -d "${KUBERNETES_DIRECTORY}" ]; then
|
||||||
|
if [ "${VALIDATE_ALL_CODEBASE}" == "true" ]; then
|
||||||
|
###############################################################################
|
||||||
|
# Set the file seperator to newline to allow for grabbing objects with spaces #
|
||||||
|
###############################################################################
|
||||||
|
IFS=$'\n'
|
||||||
|
|
||||||
|
mapfile -t LIST_FILES < <(find "${KUBERNETES_DIRECTORY}" -path "*/node_modules" -prune -o -type f -regex ".*\.\(yml\|yaml\|json\)\$" 2>&1)
|
||||||
|
for FILE in "${LIST_FILES[@]}"; do
|
||||||
|
if DetectKubernetesFile "${FILE}"; then
|
||||||
|
FILE_ARRAY_KUBERNETES+=("${FILE}")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
###########################
|
||||||
|
# Set IFS back to default #
|
||||||
|
###########################
|
||||||
|
IFS="${DEFAULT_IFS}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
LintCodebase "KUBERNETES_KUBEVAL" "kubeval" "kubeval --strict" ".*\.\(yml\|yaml\|json\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_KUBERNETES[@]}"
|
||||||
|
else
|
||||||
|
warn "No Kubernetes directory found at:[${KUBERNETES_DIRECTORY}]"
|
||||||
|
debug "skipping Kubeval lint"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#################
|
#################
|
||||||
|
@ -1636,8 +1700,8 @@ if [ "${VALIDATE_LATEX}" == "true" ]; then
|
||||||
########################
|
########################
|
||||||
# Lint the LATEX files #
|
# Lint the LATEX files #
|
||||||
########################
|
########################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "LATEX" "chktex" "chktex -q -l ${LATEX_LINTER_RULES}" ".*\.\(tex\)\$" "${FILE_ARRAY_LATEX[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "LATEX" "chktex" "chktex -q -l ${LATEX_LINTER_RULES}" ".*\.\(tex\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_LATEX[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
###############
|
###############
|
||||||
|
@ -1647,8 +1711,8 @@ if [ "${VALIDATE_LUA}" == "true" ]; then
|
||||||
######################
|
######################
|
||||||
# Lint the Lua files #
|
# Lint the Lua files #
|
||||||
######################
|
######################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "LUA" "lua" "luacheck --config ${LUA_LINTER_RULES}" ".*\.\(lua\)\$" "${FILE_ARRAY_LUA[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "LUA" "lua" "luacheck --config ${LUA_LINTER_RULES}" ".*\.\(lua\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_LUA[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
####################
|
####################
|
||||||
|
@ -1658,8 +1722,8 @@ if [ "${VALIDATE_MARKDOWN}" == "true" ]; then
|
||||||
###########################
|
###########################
|
||||||
# Lint the Markdown Files #
|
# Lint the Markdown Files #
|
||||||
###########################
|
###########################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "MARKDOWN" "markdownlint" "markdownlint -c ${MARKDOWN_LINTER_RULES}" ".*\.\(md\)\$" "${FILE_ARRAY_MARKDOWN[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "MARKDOWN" "markdownlint" "markdownlint -c ${MARKDOWN_LINTER_RULES}" ".*\.\(md\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_MARKDOWN[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
###################
|
###################
|
||||||
|
@ -1689,8 +1753,8 @@ if [ "${VALIDATE_OPENAPI}" == "true" ]; then
|
||||||
##########################
|
##########################
|
||||||
# Lint the OpenAPI files #
|
# Lint the OpenAPI files #
|
||||||
##########################
|
##########################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "OPENAPI" "spectral" "spectral lint -r ${OPENAPI_LINTER_RULES}" "disabledfileext" "${FILE_ARRAY_OPENAPI[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "OPENAPI" "spectral" "spectral lint -r ${OPENAPI_LINTER_RULES}" "disabledfileext" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_OPENAPI[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
################
|
################
|
||||||
|
@ -1700,8 +1764,8 @@ if [ "${VALIDATE_PERL}" == "true" ]; then
|
||||||
#######################
|
#######################
|
||||||
# Lint the perl files #
|
# Lint the perl files #
|
||||||
#######################
|
#######################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "PERL" "perl" "perlcritic" ".*\.\(pl\|pm\|t\)\$" "${FILE_ARRAY_PERL[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "PERL" "perl" "perlcritic" ".*\.\(pl\|pm\|t\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_PERL[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
################
|
################
|
||||||
|
@ -1711,32 +1775,32 @@ if [ "${VALIDATE_PHP_BUILTIN}" == "true" ]; then
|
||||||
################################################
|
################################################
|
||||||
# Lint the PHP files using built-in PHP linter #
|
# Lint the PHP files using built-in PHP linter #
|
||||||
################################################
|
################################################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "PHP_BUILTIN" "php" "php -l" ".*\.\(php\)\$" "${FILE_ARRAY_PHP_BUILTIN[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "PHP_BUILTIN" "php" "php -l" ".*\.\(php\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_PHP_BUILTIN[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${VALIDATE_PHP_PHPCS}" == "true" ]; then
|
if [ "${VALIDATE_PHP_PHPCS}" == "true" ]; then
|
||||||
############################################
|
############################################
|
||||||
# Lint the PHP files using PHP CodeSniffer #
|
# Lint the PHP files using PHP CodeSniffer #
|
||||||
############################################
|
############################################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "PHP_PHPCS" "phpcs" "phpcs --standard=${PHP_PHPCS_LINTER_RULES}" ".*\.\(php\)\$" "${FILE_ARRAY_PHP_PHPCS[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "PHP_PHPCS" "phpcs" "phpcs --standard=${PHP_PHPCS_LINTER_RULES}" ".*\.\(php\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_PHP_PHPCS[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${VALIDATE_PHP_PHPSTAN}" == "true" ]; then
|
if [ "${VALIDATE_PHP_PHPSTAN}" == "true" ]; then
|
||||||
#######################
|
#######################
|
||||||
# Lint the PHP files using PHPStan #
|
# Lint the PHP files using PHPStan #
|
||||||
#######################
|
#######################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "PHP_PHPSTAN" "phpstan" "phpstan analyse --no-progress --no-ansi -c ${PHP_PHPSTAN_LINTER_RULES}" ".*\.\(php\)\$" "${FILE_ARRAY_PHP_PHPSTAN[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "PHP_PHPSTAN" "phpstan" "phpstan analyse --no-progress --no-ansi -c ${PHP_PHPSTAN_LINTER_RULES}" ".*\.\(php\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_PHP_PHPSTAN[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${VALIDATE_PHP_PSALM}" == "true" ]; then
|
if [ "${VALIDATE_PHP_PSALM}" == "true" ]; then
|
||||||
##################################
|
##################################
|
||||||
# Lint the PHP files using Psalm #
|
# Lint the PHP files using Psalm #
|
||||||
##################################
|
##################################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "PHP_PSALM" "psalm" "psalm --config=${PHP_PSALM_LINTER_RULES}" ".*\.\(php\)\$" "${FILE_ARRAY_PHP_PSALM[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "PHP_PSALM" "psalm" "psalm --config=${PHP_PSALM_LINTER_RULES}" ".*\.\(php\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_PHP_PSALM[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
######################
|
######################
|
||||||
|
@ -1751,8 +1815,8 @@ if [ "${VALIDATE_POWERSHELL}" == "true" ]; then
|
||||||
#############################
|
#############################
|
||||||
# Lint the powershell files #
|
# Lint the powershell files #
|
||||||
#############################
|
#############################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "POWERSHELL" "pwsh" "Invoke-ScriptAnalyzer -EnableExit -Settings ${POWERSHELL_LINTER_RULES} -Path" ".*\.\(ps1\|psm1\|psd1\|ps1xml\|pssc\|psrc\|cdxml\)\$" "${FILE_ARRAY_POWERSHELL[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "POWERSHELL" "pwsh" "Invoke-ScriptAnalyzer -EnableExit -Settings ${POWERSHELL_LINTER_RULES} -Path" ".*\.\(ps1\|psm1\|psd1\|ps1xml\|pssc\|psrc\|cdxml\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_POWERSHELL[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
####################
|
####################
|
||||||
|
@ -1762,8 +1826,8 @@ if [ "${VALIDATE_PROTOBUF}" == "true" ]; then
|
||||||
#######################
|
#######################
|
||||||
# Lint the Protocol Buffers files #
|
# Lint the Protocol Buffers files #
|
||||||
#######################
|
#######################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "PROTOBUF" "protolint" "protolint lint --config_path ${PROTOBUF_LINTER_RULES}" ".*\.\(proto\)\$" "${FILE_ARRAY_PROTOBUF[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "PROTOBUF" "protolint" "protolint lint --config_path ${PROTOBUF_LINTER_RULES}" ".*\.\(proto\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_PROTOBUF[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
########################
|
########################
|
||||||
|
@ -1773,8 +1837,8 @@ if [ "${VALIDATE_PYTHON_BLACK}" == "true" ]; then
|
||||||
#########################
|
#########################
|
||||||
# Lint the python files #
|
# Lint the python files #
|
||||||
#########################
|
#########################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "PYTHON_BLACK" "black" "black --config ${PYTHON_BLACK_LINTER_RULES} --diff --check" ".*\.\(py\)\$" "${FILE_ARRAY_PYTHON_BLACK[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "PYTHON_BLACK" "black" "black --config ${PYTHON_BLACK_LINTER_RULES} --diff --check" ".*\.\(py\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_PYTHON_BLACK[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
|
@ -1784,8 +1848,8 @@ if [ "${VALIDATE_PYTHON_PYLINT}" == "true" ]; then
|
||||||
#########################
|
#########################
|
||||||
# Lint the python files #
|
# Lint the python files #
|
||||||
#########################
|
#########################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "PYTHON_PYLINT" "pylint" "pylint --rcfile ${PYTHON_PYLINT_LINTER_RULES}" ".*\.\(py\)\$" "${FILE_ARRAY_PYTHON_PYLINT[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "PYTHON_PYLINT" "pylint" "pylint --rcfile ${PYTHON_PYLINT_LINTER_RULES}" ".*\.\(py\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_PYTHON_PYLINT[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
|
@ -1795,8 +1859,8 @@ if [ "${VALIDATE_PYTHON_FLAKE8}" == "true" ]; then
|
||||||
#########################
|
#########################
|
||||||
# Lint the python files #
|
# Lint the python files #
|
||||||
#########################
|
#########################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "PYTHON_FLAKE8" "flake8" "flake8 --config=${PYTHON_FLAKE8_LINTER_RULES}" ".*\.\(py\)\$" "${FILE_ARRAY_PYTHON_FLAKE8[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "PYTHON_FLAKE8" "flake8" "flake8 --config=${PYTHON_FLAKE8_LINTER_RULES}" ".*\.\(py\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_PYTHON_FLAKE8[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#############
|
#############
|
||||||
|
@ -1814,7 +1878,7 @@ if [ "${VALIDATE_R}" == "true" ]; then
|
||||||
######################
|
######################
|
||||||
# Lint the R files #
|
# Lint the R files #
|
||||||
######################
|
######################
|
||||||
LintCodebase "R" "lintr" "lintr::lint(File)" ".*\.\(r\|R\|Rmd\|rmd\)\$" "${FILE_ARRAY_R[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "R" "lintr" "lintr::lint(File)" ".*\.\(r\|R\|Rmd\|rmd\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_R[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
################
|
################
|
||||||
|
@ -1827,8 +1891,8 @@ if [ "${VALIDATE_RAKU}" == "true" ]; then
|
||||||
if [ -e "${GITHUB_WORKSPACE}/META6.json" ]; then
|
if [ -e "${GITHUB_WORKSPACE}/META6.json" ]; then
|
||||||
cd "${GITHUB_WORKSPACE}" && zef install --deps-only --/test .
|
cd "${GITHUB_WORKSPACE}" && zef install --deps-only --/test .
|
||||||
fi
|
fi
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "RAKU" "raku" "raku -I ${GITHUB_WORKSPACE}/lib -c" ".*\.\(raku\|rakumod\|rakutest\|pm6\|pl6\|p6\)\$" "${FILE_ARRAY_RAKU[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "RAKU" "raku" "raku -I ${GITHUB_WORKSPACE}/lib -c" ".*\.\(raku\|rakumod\|rakutest\|pm6\|pl6\|p6\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_RAKU[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
################
|
################
|
||||||
|
@ -1838,8 +1902,8 @@ if [ "${VALIDATE_RUBY}" == "true" ]; then
|
||||||
#######################
|
#######################
|
||||||
# Lint the ruby files #
|
# Lint the ruby files #
|
||||||
#######################
|
#######################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "RUBY" "rubocop" "rubocop -c ${RUBY_LINTER_RULES} --force-exclusion" ".*\.\(rb\)\$" "${FILE_ARRAY_RUBY[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "RUBY" "rubocop" "rubocop -c ${RUBY_LINTER_RULES} --force-exclusion" ".*\.\(rb\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_RUBY[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#################
|
#################
|
||||||
|
@ -1851,8 +1915,8 @@ if [ "${VALIDATE_SHELL_SHFMT}" == "true" ]; then
|
||||||
####################################
|
####################################
|
||||||
EDITORCONFIG_FILE_PATH="${GITHUB_WORKSPACE}"/.editorconfig
|
EDITORCONFIG_FILE_PATH="${GITHUB_WORKSPACE}"/.editorconfig
|
||||||
if [ -e "$EDITORCONFIG_FILE_PATH" ]; then
|
if [ -e "$EDITORCONFIG_FILE_PATH" ]; then
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "SHELL_SHFMT" "shfmt" "shfmt -d" ".*\.\(sh\|bash\|dash\|ksh\)\$" "${FILE_ARRAY_BASH[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "SHELL_SHFMT" "shfmt" "shfmt -d" ".*\.\(sh\|bash\|dash\|ksh\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_BASH[@]}"
|
||||||
else
|
else
|
||||||
###############################
|
###############################
|
||||||
# No .editorconfig file found #
|
# No .editorconfig file found #
|
||||||
|
@ -1866,11 +1930,12 @@ fi
|
||||||
# SNAKEMAKE LINT #
|
# SNAKEMAKE LINT #
|
||||||
##################
|
##################
|
||||||
if [ "${VALIDATE_SNAKEMAKE_LINT}" == "true" ]; then
|
if [ "${VALIDATE_SNAKEMAKE_LINT}" == "true" ]; then
|
||||||
#################################
|
################################
|
||||||
# Lint the files with snakemake #
|
# Lint the files with snakefmt #
|
||||||
#################################
|
################################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "SNAKEMAKE_LINT" "snakemake" "snakemake --lint -s" ".*\(Snakefile\|\.smk\)\$" "${FILE_ARRAY_SNAKEMAKE[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "SNAKEMAKE_LINT" "snakemake" "snakemake --lint -s" "\(Snakefile|.*\.smk\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_SNAKEMAKE[@]}"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
######################
|
######################
|
||||||
|
@ -1880,8 +1945,8 @@ if [ "${VALIDATE_SNAKEMAKE_SNAKEFMT}" == "true" ]; then
|
||||||
################################
|
################################
|
||||||
# Lint the files with snakefmt #
|
# Lint the files with snakefmt #
|
||||||
################################
|
################################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "SNAKEMAKE_SNAKEFMT" "snakefmt" "snakefmt --config ${SNAKEMAKE_SNAKEFMT_LINTER_RULES} --check --compact-diff" ".*\(Snakefile\|\.smk\)\$" "${FILE_ARRAY_SNAKEMAKE[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "SNAKEMAKE_SNAKEFMT" "snakefmt" "snakefmt --config ${SNAKEMAKE_SNAKEFMT_LINTER_RULES} --check --compact-diff" "\(Snakefile|.*\.smk\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_SNAKEMAKE[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
######################
|
######################
|
||||||
|
@ -1911,7 +1976,7 @@ if [ "${VALIDATE_STATES}" == "true" ]; then
|
||||||
#########################
|
#########################
|
||||||
# Lint the STATES files #
|
# Lint the STATES files #
|
||||||
#########################
|
#########################
|
||||||
LintCodebase "STATES" "asl-validator" "asl-validator --json-path" "disabledfileext" "${FILE_ARRAY_STATES[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "STATES" "asl-validator" "asl-validator --json-path" "disabledfileext" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_STATES[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
###############
|
###############
|
||||||
|
@ -1921,8 +1986,8 @@ if [ "${VALIDATE_SQL}" == "true" ]; then
|
||||||
######################
|
######################
|
||||||
# Lint the SQL files #
|
# Lint the SQL files #
|
||||||
######################
|
######################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "SQL" "sql-lint" "sql-lint --config ${SQL_LINTER_RULES}" ".*\.\(sql\)\$" "${FILE_ARRAY_SQL[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "SQL" "sql-lint" "sql-lint --config ${SQL_LINTER_RULES}" ".*\.\(sql\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_SQL[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#####################
|
#####################
|
||||||
|
@ -1932,8 +1997,8 @@ if [ "${VALIDATE_TERRAFORM}" == "true" ]; then
|
||||||
############################
|
############################
|
||||||
# Lint the Terraform files #
|
# Lint the Terraform files #
|
||||||
############################
|
############################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "TERRAFORM" "tflint" "tflint -c ${TERRAFORM_LINTER_RULES}" ".*\.\(tf\)\$" "${FILE_ARRAY_TERRAFORM[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "TERRAFORM" "tflint" "tflint -c ${TERRAFORM_LINTER_RULES}" ".*\.\(tf\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_TERRAFORM[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
###############################
|
###############################
|
||||||
|
@ -1943,8 +2008,8 @@ if [ "${VALIDATE_TERRAFORM_TERRASCAN}" == "true" ]; then
|
||||||
############################
|
############################
|
||||||
# Lint the Terraform files #
|
# Lint the Terraform files #
|
||||||
############################
|
############################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "TERRAFORM_TERRASCAN" "terrascan" "terrascan scan -p /root/.terrascan/pkg/policies/opa/rego/ -t aws -f " ".*\.\(tf\)\$" "${FILE_ARRAY_TERRAFORM_TERRASCAN[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "TERRAFORM_TERRASCAN" "terrascan" "terrascan scan -p /root/.terrascan/pkg/policies/opa/rego/ -t aws -f " ".*\.\(tf\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_TERRAFORM_TERRASCAN[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
###############
|
###############
|
||||||
|
@ -1954,7 +2019,7 @@ if [ "${VALIDATE_TSX}" == "true" ]; then
|
||||||
######################
|
######################
|
||||||
# Lint the TSX files #
|
# Lint the TSX files #
|
||||||
######################
|
######################
|
||||||
LintCodebase "TSX" "eslint" "eslint --no-eslintrc -c ${TYPESCRIPT_LINTER_RULES}" ".*\.\(tsx\)\$" "${FILE_ARRAY_TSX[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "TSX" "eslint" "eslint --no-eslintrc -c ${TYPESCRIPT_LINTER_RULES}" ".*\.\(tsx\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_TSX[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
######################
|
######################
|
||||||
|
@ -1964,7 +2029,7 @@ if [ "${VALIDATE_TYPESCRIPT_ES}" == "true" ]; then
|
||||||
#############################
|
#############################
|
||||||
# Lint the Typescript files #
|
# Lint the Typescript files #
|
||||||
#############################
|
#############################
|
||||||
LintCodebase "TYPESCRIPT_ES" "eslint" "eslint --no-eslintrc -c ${TYPESCRIPT_LINTER_RULES}" ".*\.\(ts\)\$" "${FILE_ARRAY_TYPESCRIPT_ES[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "TYPESCRIPT_ES" "eslint" "eslint --no-eslintrc -c ${TYPESCRIPT_LINTER_RULES}" ".*\.\(ts\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_TYPESCRIPT_ES[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
######################
|
######################
|
||||||
|
@ -1978,7 +2043,7 @@ if [ "${VALIDATE_TYPESCRIPT_STANDARD}" == "true" ]; then
|
||||||
#############################
|
#############################
|
||||||
# Lint the Typescript files #
|
# Lint the Typescript files #
|
||||||
#############################
|
#############################
|
||||||
LintCodebase "TYPESCRIPT_STANDARD" "standard" "standard --parser @typescript-eslint/parser --plugin @typescript-eslint/eslint-plugin ${TYPESCRIPT_STANDARD_LINTER_RULES}" ".*\.\(ts\)\$" "${FILE_ARRAY_TYPESCRIPT_STANDARD[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "TYPESCRIPT_STANDARD" "standard" "standard --parser @typescript-eslint/parser --plugin @typescript-eslint/eslint-plugin ${TYPESCRIPT_STANDARD_LINTER_RULES}" ".*\.\(ts\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_TYPESCRIPT_STANDARD[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
###############
|
###############
|
||||||
|
@ -1988,8 +2053,8 @@ if [ "${VALIDATE_XML}" == "true" ]; then
|
||||||
######################
|
######################
|
||||||
# Lint the XML Files #
|
# Lint the XML Files #
|
||||||
######################
|
######################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "XML" "xmllint" "xmllint" ".*\.\(xml\)\$" "${FILE_ARRAY_XML[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "XML" "xmllint" "xmllint" ".*\.\(xml\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_XML[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
################
|
################
|
||||||
|
@ -1999,8 +2064,8 @@ if [ "${VALIDATE_YAML}" == "true" ]; then
|
||||||
######################
|
######################
|
||||||
# Lint the Yml Files #
|
# Lint the Yml Files #
|
||||||
######################
|
######################
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE" "FILE_ARRAY"
|
||||||
LintCodebase "YAML" "yamllint" "yamllint -c ${YAML_LINTER_RULES}" ".*\.\(yml\|yaml\)\$" "${FILE_ARRAY_YAML[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
LintCodebase "YAML" "yamllint" "yamllint -c ${YAML_LINTER_RULES}" ".*\.\(yml\|yaml\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_YAML[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
###########
|
###########
|
||||||
|
|
|
@ -23,7 +23,7 @@ ARM_TTK_PSD1='/usr/bin/arm-ttk' # Powershell var
|
||||||
#######################################
|
#######################################
|
||||||
LINTER_ARRAY=('ansible-lint' 'arm-ttk' 'asl-validator' 'bash-exec' 'black' 'cfn-lint' 'checkstyle' 'chktex' 'clj-kondo' 'coffeelint'
|
LINTER_ARRAY=('ansible-lint' 'arm-ttk' 'asl-validator' 'bash-exec' 'black' 'cfn-lint' 'checkstyle' 'chktex' 'clj-kondo' 'coffeelint'
|
||||||
'dotnet-format' 'dart' 'dockerfilelint' 'dotenv-linter' 'editorconfig-checker' 'eslint' 'flake8' 'golangci-lint'
|
'dotnet-format' 'dart' 'dockerfilelint' 'dotenv-linter' 'editorconfig-checker' 'eslint' 'flake8' 'golangci-lint'
|
||||||
'hadolint' 'htmlhint' 'jsonlint' 'ktlint' 'lintr' 'lua' 'markdownlint' 'npm-groovy-lint' 'perl' 'protolint'
|
'hadolint' 'htmlhint' 'jsonlint' 'kubeval' 'ktlint' 'lintr' 'lua' 'markdownlint' 'npm-groovy-lint' 'perl' 'protolint'
|
||||||
'pwsh' 'pylint' 'raku' 'rubocop' 'shellcheck' 'shfmt' 'spectral' 'standard' 'stylelint' 'sql-lint'
|
'pwsh' 'pylint' 'raku' 'rubocop' 'shellcheck' 'shfmt' 'spectral' 'standard' 'stylelint' 'sql-lint'
|
||||||
'terrascan' 'tflint' 'xmllint' 'yamllint')
|
'terrascan' 'tflint' 'xmllint' 'yamllint')
|
||||||
|
|
||||||
|
|
|
@ -123,6 +123,7 @@ function GetValidationInfo() {
|
||||||
if [ -z "${ANSIBLE_DIRECTORY}" ]; then
|
if [ -z "${ANSIBLE_DIRECTORY}" ]; then
|
||||||
# No Value, need to default
|
# No Value, need to default
|
||||||
ANSIBLE_DIRECTORY="${DEFAULT_ANSIBLE_DIRECTORY}"
|
ANSIBLE_DIRECTORY="${DEFAULT_ANSIBLE_DIRECTORY}"
|
||||||
|
debug "Setting Ansible directory to the default: ${DEFAULT_ANSIBLE_DIRECTORY}"
|
||||||
else
|
else
|
||||||
# Check if first char is '/'
|
# Check if first char is '/'
|
||||||
if [[ ${ANSIBLE_DIRECTORY:0:1} == "/" ]]; then
|
if [[ ${ANSIBLE_DIRECTORY:0:1} == "/" ]]; then
|
||||||
|
@ -133,6 +134,27 @@ function GetValidationInfo() {
|
||||||
TEMP_ANSIBLE_DIRECTORY="${GITHUB_WORKSPACE}/${ANSIBLE_DIRECTORY}"
|
TEMP_ANSIBLE_DIRECTORY="${GITHUB_WORKSPACE}/${ANSIBLE_DIRECTORY}"
|
||||||
# Set the value
|
# Set the value
|
||||||
ANSIBLE_DIRECTORY="${TEMP_ANSIBLE_DIRECTORY}"
|
ANSIBLE_DIRECTORY="${TEMP_ANSIBLE_DIRECTORY}"
|
||||||
|
debug "Setting Ansible directory to: ${ANSIBLE_DIRECTORY}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#################################
|
||||||
|
# Validate Kubernetes Directory #
|
||||||
|
#################################
|
||||||
|
if [ -z "${KUBERNETES_DIRECTORY}" ]; then
|
||||||
|
# No Value, need to default
|
||||||
|
KUBERNETES_DIRECTORY="${DEFAULT_KUBERNETES_DIRECTORY}"
|
||||||
|
debug "Setting Kubernetes directory to the default: ${DEFAULT_KUBERNETES_DIRECTORY}"
|
||||||
|
else
|
||||||
|
# Check if first char is '/'
|
||||||
|
if [[ ${KUBERNETES_DIRECTORY:0:1} == "/" ]]; then
|
||||||
|
# Remove first char
|
||||||
|
KUBERNETES_DIRECTORY="${KUBERNETES_DIRECTORY:1}"
|
||||||
|
fi
|
||||||
|
# Need to give it full path
|
||||||
|
TEMP_KUBERNETES_DIRECTORY="${GITHUB_WORKSPACE}/${KUBERNETES_DIRECTORY}"
|
||||||
|
# Set the value
|
||||||
|
KUBERNETES_DIRECTORY="${TEMP_KUBERNETES_DIRECTORY}"
|
||||||
|
debug "Setting Kubernetes directory to: ${KUBERNETES_DIRECTORY}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
###############################
|
###############################
|
||||||
|
|
|
@ -128,7 +128,7 @@ function LintCodebase() {
|
||||||
#################################################
|
#################################################
|
||||||
# Filter files if FILTER_REGEX_INCLUDE is set #
|
# Filter files if FILTER_REGEX_INCLUDE is set #
|
||||||
#################################################
|
#################################################
|
||||||
if [ "$FILTER_REGEX_INCLUDE" ]; then
|
if [[ -n "$FILTER_REGEX_INCLUDE" ]]; then
|
||||||
for index in "${!LIST_FILES[@]}"; do
|
for index in "${!LIST_FILES[@]}"; do
|
||||||
[[ ! (${LIST_FILES[$index]} =~ $FILTER_REGEX_INCLUDE) ]] && unset -v 'LIST_FILES[$index]'
|
[[ ! (${LIST_FILES[$index]} =~ $FILTER_REGEX_INCLUDE) ]] && unset -v 'LIST_FILES[$index]'
|
||||||
done
|
done
|
||||||
|
@ -137,7 +137,7 @@ function LintCodebase() {
|
||||||
#################################################
|
#################################################
|
||||||
# Filter files if FILTER_REGEX_EXCLUDE is set #
|
# Filter files if FILTER_REGEX_EXCLUDE is set #
|
||||||
#################################################
|
#################################################
|
||||||
if [ "$FILTER_REGEX_EXCLUDE" ]; then
|
if [[ -n "$FILTER_REGEX_EXCLUDE" ]]; then
|
||||||
for index in "${!LIST_FILES[@]}"; do
|
for index in "${!LIST_FILES[@]}"; do
|
||||||
[[ ${LIST_FILES[$index]} =~ $FILTER_REGEX_EXCLUDE ]] && unset -v 'LIST_FILES[$index]'
|
[[ ${LIST_FILES[$index]} =~ $FILTER_REGEX_EXCLUDE ]] && unset -v 'LIST_FILES[$index]'
|
||||||
done
|
done
|
||||||
|
@ -180,19 +180,19 @@ function LintCodebase() {
|
||||||
######################################################
|
######################################################
|
||||||
# Make sure we don't lint node modules or test cases #
|
# Make sure we don't lint node modules or test cases #
|
||||||
######################################################
|
######################################################
|
||||||
if [[ ${DIR_NAME} == *"node_modules"* ]]; then
|
if [[ ${FILE} == *"node_modules"* ]]; then
|
||||||
# This is a node modules file
|
# This is a node modules file
|
||||||
continue
|
continue
|
||||||
elif [[ ${DIR_NAME} == *"${TEST_CASE_FOLDER}"* ]]; then
|
elif [[ ${FILE} == *"${TEST_CASE_FOLDER}"* ]]; then
|
||||||
# This is the test cases, we should always skip
|
# This is the test cases, we should always skip
|
||||||
continue
|
continue
|
||||||
elif [[ ${DIR_NAME} == *".git" ]] || [[ ${FILE} == *".git" ]] || [[ ${FILE} == *".git/"* ]]; then
|
elif [[ ${FILE} == *".git" ]] || [[ ${FILE} == *".git/"* ]]; then
|
||||||
# This is likely the .git folder and shouldn't be parsed
|
# This is likely the .git folder and shouldn't be parsed
|
||||||
continue
|
continue
|
||||||
elif [[ ${DIR_NAME} == *".venv"* ]]; then
|
elif [[ ${FILE} == *".venv"* ]]; then
|
||||||
# This is likely the python virtual environment folder and shouldn't be parsed
|
# This is likely the python virtual environment folder and shouldn't be parsed
|
||||||
continue
|
continue
|
||||||
elif [[ ${DIR_NAME} == *".rbenv"* ]]; then
|
elif [[ ${FILE} == *".rbenv"* ]]; then
|
||||||
# This is likely the ruby environment folder and shouldn't be parsed
|
# This is likely the ruby environment folder and shouldn't be parsed
|
||||||
continue
|
continue
|
||||||
elif [[ ${FILE_TYPE} == "BASH" ]] && ! IsValidShellScript "${FILE}"; then
|
elif [[ ${FILE_TYPE} == "BASH" ]] && ! IsValidShellScript "${FILE}"; then
|
||||||
|
@ -297,7 +297,8 @@ function LintCodebase() {
|
||||||
# Check the shell for errors #
|
# Check the shell for errors #
|
||||||
##############################
|
##############################
|
||||||
if [ ${ERROR_CODE} -ne 0 ]; then
|
if [ ${ERROR_CODE} -ne 0 ]; then
|
||||||
if [[ ${FILE_TYPE} == "BASH_EXEC" ]]; then
|
debug "Found errors. Error code: ${ERROR_CODE}, File type: ${FILE_TYPE}, Error on missing exec bit: ${ERROR_ON_MISSING_EXEC_BIT}"
|
||||||
|
if [[ ${FILE_TYPE} == "BASH_EXEC" ]] && [[ "${ERROR_ON_MISSING_EXEC_BIT}" == "false" ]]; then
|
||||||
########
|
########
|
||||||
# WARN #
|
# WARN #
|
||||||
########
|
########
|
||||||
|
@ -699,12 +700,13 @@ function RunTestCases() {
|
||||||
TestCodebase "EDITORCONFIG" "editorconfig-checker" "editorconfig-checker" ".*\.ext$" "editorconfig-checker"
|
TestCodebase "EDITORCONFIG" "editorconfig-checker" "editorconfig-checker" ".*\.ext$" "editorconfig-checker"
|
||||||
TestCodebase "ENV" "dotenv-linter" "dotenv-linter" ".*\.\(env\)\$" "env"
|
TestCodebase "ENV" "dotenv-linter" "dotenv-linter" ".*\.\(env\)\$" "env"
|
||||||
TestCodebase "GO" "golangci-lint" "golangci-lint run -c ${GO_LINTER_RULES}" ".*\.\(go\)\$" "golang"
|
TestCodebase "GO" "golangci-lint" "golangci-lint run -c ${GO_LINTER_RULES}" ".*\.\(go\)\$" "golang"
|
||||||
TestCodebase "GROOVY" "npm-groovy-lint" "npm-groovy-lint -c $GROOVY_LINTER_RULES --failon error" ".*\.\(groovy\|jenkinsfile\|gradle\|nf\)\$" "groovy"
|
TestCodebase "GROOVY" "npm-groovy-lint" "npm-groovy-lint -c $GROOVY_LINTER_RULES --failon warning" ".*\.\(groovy\|jenkinsfile\|gradle\|nf\)\$" "groovy"
|
||||||
TestCodebase "HTML" "htmlhint" "htmlhint --config ${HTML_LINTER_RULES}" ".*\.\(html\)\$" "html"
|
TestCodebase "HTML" "htmlhint" "htmlhint --config ${HTML_LINTER_RULES}" ".*\.\(html\)\$" "html"
|
||||||
TestCodebase "JAVA" "checkstyle" "java -jar /usr/bin/checkstyle -c ${JAVA_LINTER_RULES}" ".*\.\(java\)\$" "java"
|
TestCodebase "JAVA" "checkstyle" "java -jar /usr/bin/checkstyle -c ${JAVA_LINTER_RULES}" ".*\.\(java\)\$" "java"
|
||||||
TestCodebase "JAVASCRIPT_ES" "eslint" "eslint --no-eslintrc -c ${JAVASCRIPT_LINTER_RULES}" ".*\.\(js\)\$" "javascript"
|
TestCodebase "JAVASCRIPT_ES" "eslint" "eslint --no-eslintrc -c ${JAVASCRIPT_LINTER_RULES}" ".*\.\(js\)\$" "javascript"
|
||||||
TestCodebase "JAVASCRIPT_STANDARD" "standard" "standard ${JAVASCRIPT_STANDARD_LINTER_RULES}" ".*\.\(js\)\$" "javascript"
|
TestCodebase "JAVASCRIPT_STANDARD" "standard" "standard ${JAVASCRIPT_STANDARD_LINTER_RULES}" ".*\.\(js\)\$" "javascript"
|
||||||
TestCodebase "JSON" "jsonlint" "jsonlint" ".*\.\(json\)\$" "json"
|
TestCodebase "JSON" "jsonlint" "jsonlint" ".*\.\(json\)\$" "json"
|
||||||
|
TestCodebase "KUBERNETES_KUBEVAL" "kubeval" "kubeval --strict" ".*\.\(yml\|yaml\)\$" "kubeval"
|
||||||
TestCodebase "KOTLIN" "ktlint" "ktlint" ".*\.\(kt\|kts\)\$" "kotlin"
|
TestCodebase "KOTLIN" "ktlint" "ktlint" ".*\.\(kt\|kts\)\$" "kotlin"
|
||||||
TestCodebase "LATEX" "chktex" "chktex -q -l ${LATEX_LINTER_RULES}" ".*\.\(tex\)\$" "latex"
|
TestCodebase "LATEX" "chktex" "chktex -q -l ${LATEX_LINTER_RULES}" ".*\.\(tex\)\$" "latex"
|
||||||
TestCodebase "LUA" "lua" "luacheck" ".*\.\(lua\)\$" "lua"
|
TestCodebase "LUA" "lua" "luacheck" ".*\.\(lua\)\$" "lua"
|
||||||
|
@ -806,26 +808,7 @@ function LintAnsibleFiles() {
|
||||||
#################################
|
#################################
|
||||||
# Get list of all files to lint #
|
# Get list of all files to lint #
|
||||||
#################################
|
#################################
|
||||||
mapfile -t LIST_FILES < <(ls "${ANSIBLE_DIRECTORY}"/*.{yaml,yml} 2>&1)
|
mapfile -t LIST_FILES < <(find "${ANSIBLE_DIRECTORY}" -path "*/node_modules" -prune -o -type f -regex ".*\.\(yml\|yaml\|json\)\$" 2>&1)
|
||||||
|
|
||||||
###############################################################
|
|
||||||
# Set the list to empty if only MD and TXT files were changed #
|
|
||||||
###############################################################
|
|
||||||
# No need to run the full ansible checks on read only file changes
|
|
||||||
if [ "${READ_ONLY_CHANGE_FLAG}" -eq 0 ]; then
|
|
||||||
##########################
|
|
||||||
# Set the array to empty #
|
|
||||||
##########################
|
|
||||||
LIST_FILES=()
|
|
||||||
###################################
|
|
||||||
# Send message that were skipping #
|
|
||||||
###################################
|
|
||||||
debug "- Skipping Ansible lint run as file(s) that were modified were read only..."
|
|
||||||
############################
|
|
||||||
# Create flag to skip loop #
|
|
||||||
############################
|
|
||||||
SKIP_FLAG=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
####################################
|
####################################
|
||||||
# Check if we have data to look at #
|
# Check if we have data to look at #
|
||||||
|
|
Loading…
Reference in a new issue