mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-22 00:31:07 -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}
|
||||
|
||||
#########################################
|
||||
# Clean code base to run agaisnt it all #
|
||||
# Clean code base to run against it all #
|
||||
#########################################
|
||||
- name: Clean Test code base for additional testing
|
||||
shell: bash
|
||||
|
|
2
.github/workflows/stale.yml
vendored
2
.github/workflows/stale.yml
vendored
|
@ -29,7 +29,7 @@ jobs:
|
|||
if: "github.event_name == 'schedule'"
|
||||
steps:
|
||||
- name: Mark issue stale
|
||||
uses: actions/stale@v3.0.10
|
||||
uses: actions/stale@v3.0.11
|
||||
with:
|
||||
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."
|
||||
|
|
18
Dockerfile
18
Dockerfile
|
@ -7,17 +7,18 @@
|
|||
#########################################
|
||||
# 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 mstruebing/editorconfig-checker:2.1.0 as editorconfig-checker
|
||||
FROM golangci/golangci-lint:v1.31.0 as golangci-lint
|
||||
FROM yoheimuta/protolint:v0.26.0 as protolint
|
||||
FROM koalaman/shellcheck:v0.7.1 as shellcheck
|
||||
FROM wata727/tflint:0.19.1 as tflint
|
||||
FROM accurics/terrascan:latest as terrascan
|
||||
FROM wata727/tflint:0.20.1 as tflint
|
||||
FROM accurics/terrascan:d182f1c as terrascan
|
||||
FROM hadolint/hadolint:latest-alpine as dockerfile-lint
|
||||
FROM assignuser/lintr-lib:v0.1.0 as lintr-lib
|
||||
FROM assignuser/chktex-alpine:v0.1.0 as chktex
|
||||
FROM ghcr.io/assignuser/lintr-lib:0.1.2 as lintr-lib
|
||||
FROM ghcr.io/assignuser/chktex-alpine:0.1.1 as chktex
|
||||
FROM garethr/kubeval:0.15.0 as kubeval
|
||||
|
||||
##################
|
||||
# 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/
|
||||
RUN cd ~ && touch .chktexrc
|
||||
|
||||
###################
|
||||
# Install kubeval #
|
||||
###################
|
||||
COPY --from=kubeval /kubeval /usr/bin/
|
||||
|
||||
#################
|
||||
# Install shfmt #
|
||||
#################
|
||||
|
@ -331,6 +337,7 @@ ENV ACTIONS_RUNNER_DEBUG=${ACTIONS_RUNNER_DEBUG} \
|
|||
GITHUB_TOKEN=${GITHUB_TOKEN} \
|
||||
GITHUB_WORKSPACE=${GITHUB_WORKSPACE} \
|
||||
JAVASCRIPT_ES_CONFIG_FILE=${JAVASCRIPT_ES_CONFIG_FILE} \
|
||||
KUBERNETES_DIRECTORY=${KUBERNETES_DIRECTORY} \
|
||||
LINTER_RULES_PATH=${LINTER_RULES_PATH} \
|
||||
LOG_FILE=${LOG_FILE} \
|
||||
LOG_LEVEL=${LOG_LEVEL} \
|
||||
|
@ -362,6 +369,7 @@ ENV ACTIONS_RUNNER_DEBUG=${ACTIONS_RUNNER_DEBUG} \
|
|||
VALIDATE_JAVASCRIPT_ES=${VALIDATE_JAVASCRIPT_ES} \
|
||||
VALIDATE_JAVASCRIPT_STANDARD=${VALIDATE_JAVASCRIPT_STANDARD} \
|
||||
VALIDATE_JSON=${VALIDATE_JSON} \
|
||||
VALIDATE_KUBERNETES_KUBEVAL=${VALIDATE_KUBERNETES_KUBEVAL} \
|
||||
VALIDATE_KOTLIN=${VALIDATE_KOTLIN} \
|
||||
VALIDATE_LATEX=${VALIDATE_LATEX} \
|
||||
VALIDATE_LUA=${VALIDATE_LUA} \
|
||||
|
|
41
README.md
41
README.md
|
@ -18,6 +18,7 @@ It is a simple combination of various linters, written in `bash`, to help valida
|
|||
- [Supported Linters](#supported-linters)
|
||||
- [How to use](#how-to-use)
|
||||
- [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)
|
||||
- [Template rules files](#template-rules-files)
|
||||
- [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) |
|
||||
| **JavaScript** | [eslint](https://eslint.org/) / [standard js](https://standardjs.com/) |
|
||||
| **JSON** | [jsonlint](https://github.com/zaach/jsonlint) |
|
||||
| **Kubeval** | [kubeval](https://github.com/instrumenta/kubeval) |
|
||||
| **Kotlin** | [ktlint](https://github.com/pinterest/ktlint) |
|
||||
| **LaTeX** | [ChkTex](https://www.nongnu.org/chktex/) |
|
||||
| **Lua** | [luacheck](https://github.com/luarocks/luacheck) |
|
||||
|
@ -160,6 +162,26 @@ jobs:
|
|||
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
|
||||
|
||||
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** |
|
||||
| --------------------------------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **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`) |
|
||||
| **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. |
|
||||
| **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`) |
|
||||
| **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_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`) |
|
||||
| **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. |
|
||||
| **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`. |
|
||||
|
@ -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_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. |
|
||||
| **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_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`) |
|
||||
|
@ -207,7 +231,7 @@ But if you wish to select or exclude specific linters, we give you full control
|
|||
| **VALIDATE_BASH_EXEC** | `true` | Flag to enable or disable the linting process of the Bash language to validate if file is stored as executable. |
|
||||
| **VALIDATE_CLOJURE** | `true` | Flag to enable or disable the linting process of the Clojure language. |
|
||||
| **VALIDATE_CLOUDFORMATION** | `true` | Flag to enable or disable the linting process of the AWS Cloud Formation language. |
|
||||
| **VALIDATE_COFFEE** | `true` | Flag to enable or disable the linting process of the Coffeescript language . |
|
||||
| **VALIDATE_COFFEE** | `true` | Flag to enable or disable the linting process of the Coffeescript language. |
|
||||
| **VALIDATE_CSHARP** | `true` | Flag to enable or disable the linting process of the C# language. |
|
||||
| **VALIDATE_CSS** | `true` | Flag to enable or disable the linting process of the CSS language. |
|
||||
| **VALIDATE_DART** | `true` | Flag to enable or disable the linting process of the Dart language. |
|
||||
|
@ -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_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_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_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. |
|
||||
|
@ -272,11 +297,11 @@ If you need to disable certain _rules_ and _functionality_, you can view [Disabl
|
|||
|
||||
If you need to lint only a folder or exclude some files from linting, you can use optional environment parameters `FILTER_REGEX_INCLUDE` and `FILTER_REGEX_EXCLUDE`
|
||||
|
||||
Examples :
|
||||
Examples:
|
||||
|
||||
- Lint only src folder: `FILTER_REGEX_INCLUDE=.*src/.*`
|
||||
- Do not lint files inside test folder: `FILTER_REGEX_EXCLUDE=.*test/.*`
|
||||
- Do not lint javascript files inside test folder: `FILTER_REGEX_EXCLUDE=.*test/.*.js`
|
||||
- Lint only src folder: `FILTER_REGEX_INCLUDE: .*src/.*`
|
||||
- Do not lint files inside test folder: `FILTER_REGEX_EXCLUDE: .*test/.*`
|
||||
- Do not lint javascript files inside test folder: `FILTER_REGEX_EXCLUDE: .*test/.*.js`
|
||||
|
||||
## Docker Hub
|
||||
|
||||
|
@ -292,7 +317,7 @@ Check out the [note](#how-it-works) in **How it Works** to understand more about
|
|||
|
||||
### 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
|
||||
|
||||
|
|
8
dependencies/Pipfile.lock
generated
vendored
8
dependencies/Pipfile.lock
generated
vendored
|
@ -225,7 +225,7 @@
|
|||
"sha256:b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9",
|
||||
"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"
|
||||
},
|
||||
"jsonpatch": {
|
||||
|
@ -375,7 +375,7 @@
|
|||
"sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1",
|
||||
"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"
|
||||
},
|
||||
"pyrsistent": {
|
||||
|
@ -390,7 +390,7 @@
|
|||
"sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c",
|
||||
"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"
|
||||
},
|
||||
"pyyaml": {
|
||||
|
@ -463,7 +463,7 @@
|
|||
"sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259",
|
||||
"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"
|
||||
},
|
||||
"smmap": {
|
||||
|
|
237
dependencies/package-lock.json
generated
vendored
237
dependencies/package-lock.json
generated
vendored
|
@ -12,12 +12,12 @@
|
|||
}
|
||||
},
|
||||
"@babel/core": {
|
||||
"version": "7.11.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.11.5.tgz",
|
||||
"integrity": "sha512-fsEANVOcZHzrsV6dMVWqpSeXClq3lNbYrfFGme6DE25FQWe7pyeYpXyx9guqUnpy466JLzZ8z4uwSr2iv60V5Q==",
|
||||
"version": "7.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.11.6.tgz",
|
||||
"integrity": "sha512-Wpcv03AGnmkgm6uS6k8iwhIwTrcP0m17TL1n1sy7qD0qelDu4XNeW0dN0mHfa+Gei211yDaLoEe/VlbXQzM4Bg==",
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.10.4",
|
||||
"@babel/generator": "^7.11.5",
|
||||
"@babel/generator": "^7.11.6",
|
||||
"@babel/helper-module-transforms": "^7.11.0",
|
||||
"@babel/helpers": "^7.10.4",
|
||||
"@babel/parser": "^7.11.5",
|
||||
|
@ -31,17 +31,17 @@
|
|||
"lodash": "^4.17.19",
|
||||
"resolve": "^1.3.2",
|
||||
"semver": "^5.4.1",
|
||||
"source-map": "^0.6.1"
|
||||
"source-map": "^0.5.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/generator": {
|
||||
"version": "7.11.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.11.5.tgz",
|
||||
"integrity": "sha512-9UqHWJ4IwRTy4l0o8gq2ef8ws8UPzvtMkVKjTLAiRmza9p9V6Z+OfuNd9fB1j5Q67F+dVJtPC2sZXI8NM9br4g==",
|
||||
"version": "7.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.11.6.tgz",
|
||||
"integrity": "sha512-DWtQ1PV3r+cLbySoHrwn9RWEgKMBLLma4OBQloPRyDYvc5msJM9kvTLo1YnlJd1P/ZuKbdli3ijr5q3FvAF3uA==",
|
||||
"requires": {
|
||||
"@babel/types": "^7.11.5",
|
||||
"jsesc": "^2.5.1",
|
||||
"source-map": "^0.6.1"
|
||||
"source-map": "^0.5.0"
|
||||
}
|
||||
},
|
||||
"@babel/helper-split-export-declaration": {
|
||||
|
@ -92,6 +92,11 @@
|
|||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"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": {
|
||||
"version": "3.2.10",
|
||||
"resolved": "https://registry.npmjs.org/@coffeelint/cli/-/cli-3.2.10.tgz",
|
||||
"integrity": "sha512-CLFBTPFLjwSsB4M2Vum6LwNDHePszjW2GDWU1mgpMl5vgYmhcjAhCfJqb1qAS2NpBcD31Iwn4zvy5enAztqZUw==",
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@coffeelint/cli/-/cli-4.0.0.tgz",
|
||||
"integrity": "sha512-/YmfX2pbN/4w3bxTuutLV0uhx1eV0GQGvwGSq1ROkx44u/Cy6/jXaQBKPRXc2zn1Bk93d2lMQvONtCHvLMaG3Q==",
|
||||
"requires": {
|
||||
"coffeescript": "2.5.1",
|
||||
"glob": "^7.1.6",
|
||||
"ignore": "^5.1.8",
|
||||
"resolve": "^1.17.0",
|
||||
"strip-json-comments": "^3.1.1",
|
||||
"yargs": "^15.4.1"
|
||||
"yargs": "^16.0.2"
|
||||
}
|
||||
},
|
||||
"@eslint/eslintrc": {
|
||||
|
@ -382,9 +387,9 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"ajv": {
|
||||
"version": "6.12.4",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz",
|
||||
"integrity": "sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==",
|
||||
"version": "6.12.5",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.5.tgz",
|
||||
"integrity": "sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag==",
|
||||
"requires": {
|
||||
"fast-deep-equal": "^3.1.1",
|
||||
"fast-json-stable-stringify": "^2.0.0",
|
||||
|
@ -996,9 +1001,9 @@
|
|||
"integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0="
|
||||
},
|
||||
"asl-validator": {
|
||||
"version": "1.7.1",
|
||||
"resolved": "https://registry.npmjs.org/asl-validator/-/asl-validator-1.7.1.tgz",
|
||||
"integrity": "sha512-Ka/sWrM2wmB3OBN+o/8CqzudFeIcfhY+RycCReX4xvtvLwtuucV1n+frcFCippjB5xSHsXoYSHpP3m8CQiGMwQ==",
|
||||
"version": "1.8.0",
|
||||
"resolved": "https://registry.npmjs.org/asl-validator/-/asl-validator-1.8.0.tgz",
|
||||
"integrity": "sha512-9pVM4YAjivu4WZNOQ0pey46DJYja90BJzN3hxINUXdwZLF/7hhpvcHllWzDYuQ1SdMSyUsNRiyoIuPRNL9RR+w==",
|
||||
"requires": {
|
||||
"ajv": "^6.12.2",
|
||||
"commander": "^5.1.0",
|
||||
|
@ -1149,14 +1154,14 @@
|
|||
}
|
||||
},
|
||||
"browserslist": {
|
||||
"version": "4.14.0",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.0.tgz",
|
||||
"integrity": "sha512-pUsXKAF2lVwhmtpeA3LJrZ76jXuusrNyhduuQs7CDFf9foT4Y38aQOserd2lMe5DSSrjf3fx34oHwryuvxAUgQ==",
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.2.tgz",
|
||||
"integrity": "sha512-HI4lPveGKUR0x2StIz+2FXfDk9SfVMrxn6PLh1JeGUwcuoDkdKZebWiyLRJ68iIPDpMI4JLVDf7S7XzslgWOhw==",
|
||||
"requires": {
|
||||
"caniuse-lite": "^1.0.30001111",
|
||||
"electron-to-chromium": "^1.3.523",
|
||||
"caniuse-lite": "^1.0.30001125",
|
||||
"electron-to-chromium": "^1.3.564",
|
||||
"escalade": "^3.0.2",
|
||||
"node-releases": "^1.1.60"
|
||||
"node-releases": "^1.1.61"
|
||||
}
|
||||
},
|
||||
"buffer-crc32": {
|
||||
|
@ -1195,9 +1200,9 @@
|
|||
}
|
||||
},
|
||||
"caniuse-lite": {
|
||||
"version": "1.0.30001121",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001121.tgz",
|
||||
"integrity": "sha512-s7C2DjrEbm4Z7Gk0iSG6q0tF+dqn51G3IILCWoIrF59EQomHpcJHCNo4ky1W6c/+dsEPAdqjErSmnw1YCY7ndA=="
|
||||
"version": "1.0.30001129",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001129.tgz",
|
||||
"integrity": "sha512-9945fTVKS810DZITpsAbuhQG7Lam0tEfVbZlsBaCFZaszepbryrArS05PWmJSBQ6mta+v9iz0pUIAbW1eBILIg=="
|
||||
},
|
||||
"caseless": {
|
||||
"version": "0.12.0",
|
||||
|
@ -1806,9 +1811,9 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"domelementtype": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz",
|
||||
"integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ=="
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.2.tgz",
|
||||
"integrity": "sha512-wFwTwCVebUrMgGeAwRL/NhZtHAUyT9n9yg4IMDwf10+6iCMxSkVq9MGCVEH+QZWo1nNidy8kNvwmv4zWHDTqvA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1853,9 +1858,9 @@
|
|||
}
|
||||
},
|
||||
"electron-to-chromium": {
|
||||
"version": "1.3.556",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.556.tgz",
|
||||
"integrity": "sha512-g5cGpg6rOCXxyfaLCQIWz9Fx+raFfbZ6sc4QLfvvaiCERBzY6YD6rh5d12QN++bEF1Tm9osYnxP37lbN/92j4A=="
|
||||
"version": "1.3.567",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.567.tgz",
|
||||
"integrity": "sha512-1aKkw0Hha1Bw9JA5K5PT5eFXC/TXbkJvUfNSNEciPUMgSIsRJZM1hF2GUEAGZpAbgvd8En21EA+Lv820KOhvqA=="
|
||||
},
|
||||
"emoji-regex": {
|
||||
"version": "8.0.0",
|
||||
|
@ -1959,9 +1964,9 @@
|
|||
}
|
||||
},
|
||||
"eslint": {
|
||||
"version": "7.8.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.8.1.tgz",
|
||||
"integrity": "sha512-/2rX2pfhyUG0y+A123d0ccXtMm7DV7sH1m3lk9nk2DZ2LReq39FXHueR9xZwshE5MdfSf0xunSaMWRqyIA6M1w==",
|
||||
"version": "7.9.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.9.0.tgz",
|
||||
"integrity": "sha512-V6QyhX21+uXp4T+3nrNfI3hQNBDa/P8ga7LoQOenwrlEFXrEnUEE+ok1dMtaS3b6rmLXhT1TkTIsG75HMLbknA==",
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.0.0",
|
||||
"@eslint/eslintrc": "^0.1.3",
|
||||
|
@ -2296,47 +2301,47 @@
|
|||
}
|
||||
},
|
||||
"eslint-plugin-jest": {
|
||||
"version": "24.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-24.0.0.tgz",
|
||||
"integrity": "sha512-a0G7hSDbuBCW4PNT6MVpAyfnGbUDOqxzOyhR6wT2BIBnR7MhvfAqd6KKfsTjX+Z3gxzIHiEsihzdClU4cSc6qQ==",
|
||||
"version": "24.0.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-24.0.2.tgz",
|
||||
"integrity": "sha512-DSBLNpkKDOpUJQkTGSs5sVJWsu0nDyQ2rYxkr0Eh7nrkc5bMUr/dlDbtTj3l8y6UaCVsem6rryF1OZrKnz1S5g==",
|
||||
"requires": {
|
||||
"@typescript-eslint/experimental-utils": "^4.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@typescript-eslint/experimental-utils": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.0.1.tgz",
|
||||
"integrity": "sha512-gAqOjLiHoED79iYTt3F4uSHrYmg/GPz/zGezdB0jAdr6S6gwNiR/j7cTZ8nREKVzMVKLd9G3xbg1sV9GClW3sw==",
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.1.1.tgz",
|
||||
"integrity": "sha512-jzYsNciHoa4Z3c1URtmeT/bamYm8Dwfw6vuN3WHIE/BXb1iC4KveAnXDErTAZtPVxTYBaYn3n2gbt6F6D2rm1A==",
|
||||
"requires": {
|
||||
"@types/json-schema": "^7.0.3",
|
||||
"@typescript-eslint/scope-manager": "4.0.1",
|
||||
"@typescript-eslint/types": "4.0.1",
|
||||
"@typescript-eslint/typescript-estree": "4.0.1",
|
||||
"@typescript-eslint/scope-manager": "4.1.1",
|
||||
"@typescript-eslint/types": "4.1.1",
|
||||
"@typescript-eslint/typescript-estree": "4.1.1",
|
||||
"eslint-scope": "^5.0.0",
|
||||
"eslint-utils": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/scope-manager": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.0.1.tgz",
|
||||
"integrity": "sha512-u3YEXVJ8jsj7QCJk3om0Y457fy2euEOkkzxIB/LKU3MdyI+FJ2gI0M4aKEaXzwCSfNDiZ13a3lDo5DVozc+XLQ==",
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.1.1.tgz",
|
||||
"integrity": "sha512-0W8TTobCvIIQ2FsrYTffyZGAAFUyIbEHq5EYJb1m7Rpd005jrnOvKOo8ywCLhs/Bm17C+KsrUboBvBAARQVvyA==",
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "4.0.1",
|
||||
"@typescript-eslint/visitor-keys": "4.0.1"
|
||||
"@typescript-eslint/types": "4.1.1",
|
||||
"@typescript-eslint/visitor-keys": "4.1.1"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/types": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.0.1.tgz",
|
||||
"integrity": "sha512-S+gD3fgbkZYW2rnbjugNMqibm9HpEjqZBZkTiI3PwbbNGWmAcxolWIUwZ0SKeG4Dy2ktpKKaI/6+HGYVH8Qrlg=="
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.1.1.tgz",
|
||||
"integrity": "sha512-zrBiqOKYerMTllKcn+BP+i1b7LW/EbMMYytroXMxUTvFPn1smkCu0D7lSAx29fTUO4jnwV0ljSvYQtn2vNrNxA=="
|
||||
},
|
||||
"@typescript-eslint/typescript-estree": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.0.1.tgz",
|
||||
"integrity": "sha512-zGzleORFXrRWRJAMLTB2iJD1IZbCPkg4hsI8mGdpYlKaqzvKYSEWVAYh14eauaR+qIoZVWrXgYSXqLtTlxotiw==",
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.1.1.tgz",
|
||||
"integrity": "sha512-2AUg5v0liVBsqbGxBphbJ0QbGqSRVaF5qPoTPWcxop+66vMdU1h4CCvHxTC47+Qb+Pr4l2RhXDd41JNpwcQEKw==",
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "4.0.1",
|
||||
"@typescript-eslint/visitor-keys": "4.0.1",
|
||||
"@typescript-eslint/types": "4.1.1",
|
||||
"@typescript-eslint/visitor-keys": "4.1.1",
|
||||
"debug": "^4.1.1",
|
||||
"globby": "^11.0.1",
|
||||
"is-glob": "^4.0.1",
|
||||
|
@ -2346,11 +2351,11 @@
|
|||
}
|
||||
},
|
||||
"@typescript-eslint/visitor-keys": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.0.1.tgz",
|
||||
"integrity": "sha512-yBSqd6FjnTzbg5RUy9J+9kJEyQjTI34JdGMJz+9ttlJzLCnGkBikxw+N5n2VDcc3CesbIEJ0MnZc5uRYnrEnCw==",
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.1.1.tgz",
|
||||
"integrity": "sha512-/EOOXbA2ferGLG6RmCHEQ0lTTLkOlXYDgblCmQk3tIU7mTPLm4gKhFMeeUSe+bcchTUsKeCk8xcpbop5Zr/8Rw==",
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "4.0.1",
|
||||
"@typescript-eslint/types": "4.1.1",
|
||||
"eslint-visitor-keys": "^2.0.0"
|
||||
}
|
||||
},
|
||||
|
@ -3407,9 +3412,9 @@
|
|||
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
|
||||
},
|
||||
"java-caller": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/java-caller/-/java-caller-2.2.3.tgz",
|
||||
"integrity": "sha512-NHOO3UVafHZaMK8QPgOM5Ge5VGa/7kNVv2OLJefXovcf3dNAo6eZLWa+Eu2lthp5TOYf+s2olzoK67qTgupmaA==",
|
||||
"version": "2.2.4",
|
||||
"resolved": "https://registry.npmjs.org/java-caller/-/java-caller-2.2.4.tgz",
|
||||
"integrity": "sha512-c6pG483U+KKkP0Qz8BN6Lj+EPShFHHYHZhfnnTYG1JaSpMCguZd2xUSjOx552Z95JFrKZD9Q1ODul7OF4/W/RQ==",
|
||||
"requires": {
|
||||
"debug": "^4.1.1",
|
||||
"fs-extra": "^9.0.1",
|
||||
|
@ -3485,9 +3490,9 @@
|
|||
"integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw=="
|
||||
},
|
||||
"json-parse-even-better-errors": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.0.tgz",
|
||||
"integrity": "sha512-o3aP+RsWDJZayj1SbHNQAI8x0v3T3SKiGoZlNYfbUP1S3omJQ6i9CnqADqkSPaOAxwua4/1YWx5CM7oiChJt2Q=="
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
|
||||
"integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w=="
|
||||
},
|
||||
"json-schema": {
|
||||
"version": "0.2.3",
|
||||
|
@ -4016,9 +4021,9 @@
|
|||
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
|
||||
},
|
||||
"node-releases": {
|
||||
"version": "1.1.60",
|
||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.60.tgz",
|
||||
"integrity": "sha512-gsO4vjEdQaTusZAEebUWp2a5d7dF5DYoIpDG7WySnk7BuZDW+GPpHXoXXuYawRBr/9t5q54tirPz79kFIWg4dA=="
|
||||
"version": "1.1.61",
|
||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.61.tgz",
|
||||
"integrity": "sha512-DD5vebQLg8jLCOzwupn954fbIiZht05DAZs0k2u8NStSe6h9XdsuIQL8hSRKYiU8WUQRznmSDrKGbv3ObOmC7g=="
|
||||
},
|
||||
"nomnom": {
|
||||
"version": "1.8.1",
|
||||
|
@ -4085,9 +4090,9 @@
|
|||
"integrity": "sha1-0LFF62kRicY6eNIB3E/bEpPvDAM="
|
||||
},
|
||||
"npm-groovy-lint": {
|
||||
"version": "7.6.1",
|
||||
"resolved": "https://registry.npmjs.org/npm-groovy-lint/-/npm-groovy-lint-7.6.1.tgz",
|
||||
"integrity": "sha512-JPbBejvEjH08QlyLGOU+IMcUS8HuIAk8Z/6onL9u3ToTSWzZTlVPYrPpAxem2cpsh6MvwUwgK4QowB3icxkuew==",
|
||||
"version": "7.6.3",
|
||||
"resolved": "https://registry.npmjs.org/npm-groovy-lint/-/npm-groovy-lint-7.6.3.tgz",
|
||||
"integrity": "sha512-01cRbwhAZ9TXEKVYAnUerhXpBBnZDsU75TjRkxqq+Li4roqvzgMxVKSHi9QDPUt3c87xBWysPtJbUhbMURLHuQ==",
|
||||
"requires": {
|
||||
"amplitude": "^5.1.2",
|
||||
"ansi-colors": "^4.1.1",
|
||||
|
@ -4757,9 +4762,9 @@
|
|||
"integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ="
|
||||
},
|
||||
"prettier": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.1.tgz",
|
||||
"integrity": "sha512-9bY+5ZWCfqj3ghYBLxApy2zf6m+NJo5GzmLTpr9FsApsfjriNnS2dahWReHMi7qNPhhHl9SYHJs2cHZLgexNIw=="
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.2.tgz",
|
||||
"integrity": "sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg=="
|
||||
},
|
||||
"prettier-linter-helpers": {
|
||||
"version": "1.0.0",
|
||||
|
@ -5661,9 +5666,9 @@
|
|||
"integrity": "sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI="
|
||||
},
|
||||
"stylelint": {
|
||||
"version": "13.7.0",
|
||||
"resolved": "https://registry.npmjs.org/stylelint/-/stylelint-13.7.0.tgz",
|
||||
"integrity": "sha512-1wStd4zVetnlHO98VjcHQbjSDmvcA39smkZQMct2cf+hom40H0xlQNdzzbswoG/jGBh61/Ue9m7Lu99PY51O6A==",
|
||||
"version": "13.7.1",
|
||||
"resolved": "https://registry.npmjs.org/stylelint/-/stylelint-13.7.1.tgz",
|
||||
"integrity": "sha512-qzqazcyRxrSRdmFuO0/SZOJ+LyCxYy0pwcvaOBBnl8/2VfHSMrtNIE+AnyJoyq6uKb+mt+hlgmVrvVi6G6XHfQ==",
|
||||
"requires": {
|
||||
"@stylelint/postcss-css-in-js": "^0.37.2",
|
||||
"@stylelint/postcss-markdown": "^0.36.1",
|
||||
|
@ -5716,9 +5721,9 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"ajv": {
|
||||
"version": "6.12.4",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz",
|
||||
"integrity": "sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==",
|
||||
"version": "6.12.5",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.5.tgz",
|
||||
"integrity": "sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag==",
|
||||
"requires": {
|
||||
"fast-deep-equal": "^3.1.1",
|
||||
"fast-json-stable-stringify": "^2.0.0",
|
||||
|
@ -5792,9 +5797,9 @@
|
|||
}
|
||||
},
|
||||
"table": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/table/-/table-6.0.1.tgz",
|
||||
"integrity": "sha512-fmr6168splcy/3XIvhSm5w6hYYOqyr3plAsd7OqoerzyoMnIpoxYuwrpdO2Cm22dh6KCnvirvigPrFZp+tdWFA==",
|
||||
"version": "6.0.3",
|
||||
"resolved": "https://registry.npmjs.org/table/-/table-6.0.3.tgz",
|
||||
"integrity": "sha512-8321ZMcf1B9HvVX/btKv8mMZahCjn2aYrDlpqHaBFCfnox64edeH9kEid0vTLTRR8gWR2A20aDgeuTTea4sVtw==",
|
||||
"requires": {
|
||||
"ajv": "^6.12.4",
|
||||
"lodash": "^4.17.20",
|
||||
|
@ -6016,9 +6021,9 @@
|
|||
}
|
||||
},
|
||||
"typescript": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.2.tgz",
|
||||
"integrity": "sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ=="
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.3.tgz",
|
||||
"integrity": "sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg=="
|
||||
},
|
||||
"uc.micro": {
|
||||
"version": "1.0.6",
|
||||
|
@ -6286,21 +6291,49 @@
|
|||
"integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg=="
|
||||
},
|
||||
"yargs": {
|
||||
"version": "15.4.1",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
|
||||
"integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
|
||||
"version": "16.0.3",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-16.0.3.tgz",
|
||||
"integrity": "sha512-6+nLw8xa9uK1BOEOykaiYAJVh6/CjxWXK/q9b5FpRgNslt8s22F2xMBqVIKgCRjNgGvGPBy8Vog7WN7yh4amtA==",
|
||||
"requires": {
|
||||
"cliui": "^6.0.0",
|
||||
"decamelize": "^1.2.0",
|
||||
"find-up": "^4.1.0",
|
||||
"get-caller-file": "^2.0.1",
|
||||
"cliui": "^7.0.0",
|
||||
"escalade": "^3.0.2",
|
||||
"get-caller-file": "^2.0.5",
|
||||
"require-directory": "^2.1.1",
|
||||
"require-main-filename": "^2.0.0",
|
||||
"set-blocking": "^2.0.0",
|
||||
"string-width": "^4.2.0",
|
||||
"which-module": "^2.0.0",
|
||||
"y18n": "^4.0.0",
|
||||
"yargs-parser": "^18.1.2"
|
||||
"y18n": "^5.0.1",
|
||||
"yargs-parser": "^20.0.0"
|
||||
},
|
||||
"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": {
|
||||
|
|
16
dependencies/package.json
vendored
16
dependencies/package.json
vendored
|
@ -1,28 +1,28 @@
|
|||
{
|
||||
"name": "super-linter",
|
||||
"dependencies": {
|
||||
"@coffeelint/cli": "^3.2.10",
|
||||
"@coffeelint/cli": "^4.0.0",
|
||||
"@stoplight/spectral": "^5.5.0",
|
||||
"@typescript-eslint/eslint-plugin": "^4.0.0",
|
||||
"@typescript-eslint/parser": "^3.10.1",
|
||||
"asl-validator": "^1.7.1",
|
||||
"asl-validator": "^1.8.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"dockerfilelint": "^1.8.0",
|
||||
"eslint": "^7.8.1",
|
||||
"eslint": "^7.9.0",
|
||||
"eslint-config-airbnb": "^18.2.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",
|
||||
"htmlhint": "^0.14.1",
|
||||
"jsonlint": "^1.6.3",
|
||||
"markdownlint-cli": "^0.23.2",
|
||||
"npm-groovy-lint": "^7.6.1",
|
||||
"prettier": "^2.1.1",
|
||||
"npm-groovy-lint": "^7.6.3",
|
||||
"prettier": "^2.1.2",
|
||||
"prettyjson": "^1.2.1",
|
||||
"sql-lint": "0.0.15",
|
||||
"standard": "^14.3.4",
|
||||
"stylelint": "^13.7.0",
|
||||
"stylelint": "^13.7.1",
|
||||
"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)
|
||||
- [HTML](#html)
|
||||
- [Java](#java)
|
||||
- [Javascript eslint](#javascript-eslint)
|
||||
- [Javascript standard](#javascript-standard)
|
||||
- [JavaScript eslint](#javascript-eslint)
|
||||
- [JavaScript standard](#javascript-standard)
|
||||
- [JSON](#json)
|
||||
- [Kubeval](#kubeval)
|
||||
- [Kotlin](#kotlin)
|
||||
- [LaTeX](#latex)
|
||||
- [Lua](#lua)
|
||||
|
@ -488,17 +489,17 @@ def variable = 1;
|
|||
|
||||
---
|
||||
|
||||
## Javascript eslint
|
||||
## JavaScript eslint
|
||||
|
||||
- [eslint](https://eslint.org/)
|
||||
|
||||
### Javascript eslint Config file
|
||||
### JavaScript eslint Config file
|
||||
|
||||
- `.github/linters/.eslintrc.yml`
|
||||
- You can pass multiple rules and overwrite default rules
|
||||
- File should be located at: `.github/linters/.eslintrc.yml`
|
||||
|
||||
### Javascript eslint disable single line
|
||||
### JavaScript eslint disable single line
|
||||
|
||||
```javascript
|
||||
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
|
||||
/*eslint-disable */
|
||||
|
@ -522,7 +523,7 @@ alert("foo");
|
|||
/*eslint-enable */
|
||||
```
|
||||
|
||||
### Javascript eslint disable entire file
|
||||
### JavaScript eslint disable entire file
|
||||
|
||||
- Place at the top of the file:
|
||||
|
||||
|
@ -532,23 +533,23 @@ alert("foo");
|
|||
|
||||
---
|
||||
|
||||
## Javascript standard
|
||||
## JavaScript standard
|
||||
|
||||
- [standard js](https://standardjs.com/)
|
||||
|
||||
### Javascript standard Config file
|
||||
### JavaScript standard Config file
|
||||
|
||||
- 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)
|
||||
|
||||
### Javascript standard disable code block
|
||||
### JavaScript standard disable code block
|
||||
|
||||
- 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)
|
||||
|
||||
|
@ -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
|
||||
|
||||
- [ChkTex](https://www.nongnu.org/chktex/)
|
||||
|
|
|
@ -591,6 +591,16 @@ function BuildFileList() {
|
|||
READ_ONLY_CHANGE_FLAG=1
|
||||
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 #
|
||||
########################################################################
|
||||
|
@ -773,8 +783,8 @@ function PopulateShellScriptsList() {
|
|||
mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}" \
|
||||
-path "*/node_modules" -prune -o \
|
||||
-path "*/.git" -prune -o \
|
||||
-path "*/.venv"-prune -o \
|
||||
-path "*/.rbenv"-prune -o \
|
||||
-path "*/.venv" -prune -o \
|
||||
-path "*/.rbenv" -prune -o \
|
||||
-type f 2>&1)
|
||||
for FILE in "${LIST_FILES[@]}"; do
|
||||
if IsValidShellScript "${FILE}"; then
|
||||
|
|
279
lib/linter.sh
279
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
|
||||
# HTML Vars
|
||||
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_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
|
||||
|
@ -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'
|
||||
'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'
|
||||
'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')
|
||||
|
@ -166,6 +166,7 @@ GITHUB_RUN_ID="${GITHUB_RUN_ID}" # GitHub RU
|
|||
GITHUB_SHA="${GITHUB_SHA}" # GitHub sha from the commit
|
||||
GITHUB_TOKEN="${GITHUB_TOKEN}" # GitHub Token passed from environment
|
||||
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_LEVEL="${LOG_LEVEL:-VERBOSE}" # Default log level (VERBOSE, DEBUG, TRACE)
|
||||
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_JSON="${VALIDATE_JSON}" # 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_LATEX="${VALIDATE_LATEX}" # 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
|
||||
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
|
||||
export RAW_FILE_ARRAY # Workaround SC2034
|
||||
READ_ONLY_CHANGE_FLAG=0 # Flag set to 1 if files changed are not txt or md
|
||||
export READ_ONLY_CHANGE_FLAG # Workaround SC2034
|
||||
TEST_CASE_FOLDER='.automation/test' # Folder for test cases we should always ignore
|
||||
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.
|
||||
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_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
|
||||
REPORT_OUTPUT_FOLDER="${GITHUB_WORKSPACE}/${OUTPUT_FOLDER}" # Location for the report folder
|
||||
|
||||
##########################
|
||||
# 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_JSON=() # 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_LATEX=() # 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
|
||||
ERRORS_FOUND_JSX=0 # Count of errors found
|
||||
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
|
||||
export ERRORS_FOUND_KOTLIN # Workaround SC2034
|
||||
ERRORS_FOUND_LATEX=0 # Count of errors found
|
||||
|
@ -739,6 +743,24 @@ DetectCloudFormationFile() {
|
|||
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 ##############################################
|
||||
DetectAWSStatesFIle() {
|
||||
################
|
||||
|
@ -1022,11 +1044,11 @@ CallStatusAPI() {
|
|||
##############################################
|
||||
SEND_STATUS_CMD=$(
|
||||
curl -f -s -X POST \
|
||||
--url "${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/statuses/${GITHUB_SHA}" \
|
||||
-H 'accept: application/vnd.github.v3+json' \
|
||||
-H "authorization: Bearer ${GITHUB_TOKEN}" \
|
||||
-H 'content-type: application/json' \
|
||||
-d "{ \"state\": \"${STATUS}\",
|
||||
--url "${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/statuses/${GITHUB_SHA}" \
|
||||
-H 'accept: application/vnd.github.v3+json' \
|
||||
-H "authorization: Bearer ${GITHUB_TOKEN}" \
|
||||
-H 'content-type: application/json' \
|
||||
-d "{ \"state\": \"${STATUS}\",
|
||||
\"target_url\": \"https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}\",
|
||||
\"description\": \"${MESSAGE}\", \"context\": \"--> Linted: ${LANGUAGE}\"
|
||||
}" 2>&1
|
||||
|
@ -1221,6 +1243,15 @@ fi
|
|||
# needed to connect back and update checks
|
||||
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 #
|
||||
#########################################
|
||||
|
@ -1269,6 +1300,8 @@ GetLinterRules "PHP_PHPSTAN"
|
|||
GetLinterRules "PHP_PSALM"
|
||||
# Get PowerShell rules
|
||||
GetLinterRules "POWERSHELL"
|
||||
# Get Protobuff linter rules
|
||||
GetLinterRules "PROTOBUF"
|
||||
# Get Python pylint rules
|
||||
GetLinterRules "PYTHON_PYLINT"
|
||||
# Get Python flake8 rules
|
||||
|
@ -1360,8 +1393,8 @@ if [ "${VALIDATE_ARM}" == "true" ]; then
|
|||
###############################
|
||||
# Lint the ARM Template files #
|
||||
###############################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "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" "${FILE_ARRAY_ARM[@]}" "${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" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_ARM[@]}"
|
||||
fi
|
||||
|
||||
################
|
||||
|
@ -1371,8 +1404,8 @@ if [ "${VALIDATE_BASH}" == "true" ]; then
|
|||
#######################
|
||||
# Lint the bash files #
|
||||
#######################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "BASH" "shellcheck" "shellcheck --color --external-sources" "disabledfileext" "${FILE_ARRAY_BASH[@]}" "${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" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_BASH[@]}"
|
||||
fi
|
||||
|
||||
#####################
|
||||
|
@ -1382,8 +1415,8 @@ if [ "${VALIDATE_BASH_EXEC}" == "true" ]; then
|
|||
#######################
|
||||
# Lint the bash files #
|
||||
#######################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "BASH_EXEC" "bash-exec" "bash-exec" "disabledfileext" "${FILE_ARRAY_BASH[@]}" "${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" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_BASH[@]}"
|
||||
fi
|
||||
|
||||
##########################
|
||||
|
@ -1413,8 +1446,8 @@ if [ "${VALIDATE_CLOUDFORMATION}" == "true" ]; then
|
|||
#################################
|
||||
# Lint the CloudFormation files #
|
||||
#################################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "CLOUDFORMATION" "cfn-lint" "cfn-lint --config-file ${CLOUDFORMATION_LINTER_RULES}" "disabledfileext" "${FILE_ARRAY_CLOUDFORMATION[@]}" "${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" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_CLOUDFORMATION[@]}"
|
||||
fi
|
||||
|
||||
###################
|
||||
|
@ -1428,7 +1461,7 @@ if [ "${VALIDATE_CLOJURE}" == "true" ]; then
|
|||
#########################
|
||||
# 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
|
||||
|
||||
########################
|
||||
|
@ -1438,8 +1471,8 @@ if [ "${VALIDATE_COFFEE}" == "true" ]; then
|
|||
#########################
|
||||
# Lint the coffee files #
|
||||
#########################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "COFFEESCRIPT" "coffeelint" "coffeelint -f ${COFFEESCRIPT_LINTER_RULES}" ".*\.\(coffee\)\$" "${FILE_ARRAY_COFFEESCRIPT[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_COFFEESCRIPT[@]}"
|
||||
fi
|
||||
|
||||
##################
|
||||
|
@ -1449,8 +1482,8 @@ if [ "${VALIDATE_CSHARP}" == "true" ]; then
|
|||
#########################
|
||||
# Lint the C# files #
|
||||
#########################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "CSHARP" "dotnet-format" "dotnet-format --folder --check --exclude / --include" ".*\.\(cs\)\$" "${FILE_ARRAY_CSHARP[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_CSHARP[@]}"
|
||||
fi
|
||||
|
||||
###############
|
||||
|
@ -1464,7 +1497,7 @@ if [ "${VALIDATE_CSS}" == "true" ]; then
|
|||
#############################
|
||||
# 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
|
||||
|
||||
################
|
||||
|
@ -1474,8 +1507,8 @@ if [ "${VALIDATE_DART}" == "true" ]; then
|
|||
#######################
|
||||
# Lint the Dart files #
|
||||
#######################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "DART" "dart" "dartanalyzer --fatal-infos --fatal-warnings --options ${DART_LINTER_RULES}" ".*\.\(dart\)\$" "${FILE_ARRAY_DART[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_DART[@]}"
|
||||
fi
|
||||
|
||||
##################
|
||||
|
@ -1485,9 +1518,9 @@ if [ "${VALIDATE_DOCKERFILE}" == "true" ]; then
|
|||
#########################
|
||||
# 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
|
||||
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
|
||||
|
||||
###########################
|
||||
|
@ -1497,8 +1530,8 @@ if [ "${VALIDATE_DOCKERFILE_HADOLINT}" == "true" ]; then
|
|||
#########################
|
||||
# Lint the docker files #
|
||||
#########################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "DOCKERFILE_HADOLINT" "hadolint" "hadolint -c ${DOCKERFILE_HADOLINT_LINTER_RULES}" ".*\(Dockerfile\)\$" "${FILE_ARRAY_DOCKERFILE[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_DOCKERFILE[@]}"
|
||||
fi
|
||||
|
||||
########################
|
||||
|
@ -1508,8 +1541,8 @@ if [ "${VALIDATE_EDITORCONFIG}" == "true" ]; then
|
|||
####################################
|
||||
# Lint the files with editorconfig #
|
||||
####################################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "EDITORCONFIG" "editorconfig-checker" "editorconfig-checker" "^.*$" "${FILE_ARRAY_ENV[@]}" "${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" "^.*$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_ENV[@]}"
|
||||
fi
|
||||
|
||||
###############
|
||||
|
@ -1519,8 +1552,8 @@ if [ "${VALIDATE_ENV}" == "true" ]; then
|
|||
#######################
|
||||
# Lint the env files #
|
||||
#######################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "ENV" "dotenv-linter" "dotenv-linter" ".*\.\(env\).*\$" "${FILE_ARRAY_ENV[@]}" "${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\).*\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_ENV[@]}"
|
||||
fi
|
||||
|
||||
##################
|
||||
|
@ -1530,8 +1563,8 @@ if [ "${VALIDATE_GO}" == "true" ]; then
|
|||
#########################
|
||||
# Lint the golang files #
|
||||
#########################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "GO" "golangci-lint" "golangci-lint run -c ${GO_LINTER_RULES}" ".*\.\(go\)\$" "${FILE_ARRAY_GO[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_GO[@]}"
|
||||
fi
|
||||
|
||||
##################
|
||||
|
@ -1541,8 +1574,8 @@ if [ "$VALIDATE_GROOVY" == "true" ]; then
|
|||
#########################
|
||||
# Lint the groovy files #
|
||||
#########################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
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 "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 warning" ".*\.\(groovy\|jenkinsfile\|gradle\|nf\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_GROOVY[@]}"
|
||||
fi
|
||||
|
||||
################
|
||||
|
@ -1556,7 +1589,7 @@ if [ "${VALIDATE_HTML}" == "true" ]; then
|
|||
#######################
|
||||
# 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
|
||||
|
||||
################
|
||||
|
@ -1566,8 +1599,8 @@ if [ "$VALIDATE_JAVA" == "true" ]; then
|
|||
#######################
|
||||
# Lint the JAVA files #
|
||||
#######################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "JAVA" "checkstyle" "java -jar /usr/bin/checkstyle -c ${JAVA_LINTER_RULES}" ".*\.\(java\)\$" "${FILE_ARRAY_JAVA[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_JAVA[@]}"
|
||||
fi
|
||||
|
||||
######################
|
||||
|
@ -1577,8 +1610,8 @@ if [ "${VALIDATE_JAVASCRIPT_ES}" == "true" ]; then
|
|||
#############################
|
||||
# Lint the Javascript files #
|
||||
#############################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "JAVASCRIPT_ES" "eslint" "eslint --no-eslintrc -c ${JAVASCRIPT_LINTER_RULES}" ".*\.\(js\)\$" "${FILE_ARRAY_JAVASCRIPT_ES[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_JAVASCRIPT_ES[@]}"
|
||||
fi
|
||||
|
||||
######################
|
||||
|
@ -1592,8 +1625,8 @@ if [ "${VALIDATE_JAVASCRIPT_STANDARD}" == "true" ]; then
|
|||
#############################
|
||||
# Lint the Javascript files #
|
||||
#############################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "JAVASCRIPT_STANDARD" "standard" "standard ${JAVASCRIPT_STANDARD_LINTER_RULES}" ".*\.\(js\)\$" "${FILE_ARRAY_JAVASCRIPT_STANDARD[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_JAVASCRIPT_STANDARD[@]}"
|
||||
fi
|
||||
|
||||
################
|
||||
|
@ -1603,8 +1636,8 @@ if [ "${VALIDATE_JSON}" == "true" ]; then
|
|||
#######################
|
||||
# Lint the json files #
|
||||
#######################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "JSON" "jsonlint" "jsonlint" ".*\.\(json\)\$" "${FILE_ARRAY_JSON[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_JSON[@]}"
|
||||
fi
|
||||
|
||||
###############
|
||||
|
@ -1614,8 +1647,8 @@ if [ "${VALIDATE_JSX}" == "true" ]; then
|
|||
######################
|
||||
# Lint the JSX files #
|
||||
######################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "JSX" "eslint" "eslint --no-eslintrc -c ${JAVASCRIPT_LINTER_RULES}" ".*\.\(jsx\)\$" "${FILE_ARRAY_JSX[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_JSX[@]}"
|
||||
fi
|
||||
|
||||
##################
|
||||
|
@ -1625,8 +1658,39 @@ if [ "${VALIDATE_KOTLIN}" == "true" ]; then
|
|||
#######################
|
||||
# Lint the Kotlin files #
|
||||
#######################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "KOTLIN" "ktlint" "ktlint" ".*\.\(kt\|kts\)\$" "${FILE_ARRAY_KOTLIN[@]}" "${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\)\$" "${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
|
||||
|
||||
#################
|
||||
|
@ -1636,8 +1700,8 @@ if [ "${VALIDATE_LATEX}" == "true" ]; then
|
|||
########################
|
||||
# Lint the LATEX files #
|
||||
########################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "LATEX" "chktex" "chktex -q -l ${LATEX_LINTER_RULES}" ".*\.\(tex\)\$" "${FILE_ARRAY_LATEX[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_LATEX[@]}"
|
||||
fi
|
||||
|
||||
###############
|
||||
|
@ -1647,8 +1711,8 @@ if [ "${VALIDATE_LUA}" == "true" ]; then
|
|||
######################
|
||||
# Lint the Lua files #
|
||||
######################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "LUA" "lua" "luacheck --config ${LUA_LINTER_RULES}" ".*\.\(lua\)\$" "${FILE_ARRAY_LUA[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_LUA[@]}"
|
||||
fi
|
||||
|
||||
####################
|
||||
|
@ -1658,8 +1722,8 @@ if [ "${VALIDATE_MARKDOWN}" == "true" ]; then
|
|||
###########################
|
||||
# Lint the Markdown Files #
|
||||
###########################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "MARKDOWN" "markdownlint" "markdownlint -c ${MARKDOWN_LINTER_RULES}" ".*\.\(md\)\$" "${FILE_ARRAY_MARKDOWN[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_MARKDOWN[@]}"
|
||||
fi
|
||||
|
||||
###################
|
||||
|
@ -1689,8 +1753,8 @@ if [ "${VALIDATE_OPENAPI}" == "true" ]; then
|
|||
##########################
|
||||
# Lint the OpenAPI files #
|
||||
##########################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "OPENAPI" "spectral" "spectral lint -r ${OPENAPI_LINTER_RULES}" "disabledfileext" "${FILE_ARRAY_OPENAPI[@]}" "${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" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_OPENAPI[@]}"
|
||||
fi
|
||||
|
||||
################
|
||||
|
@ -1700,8 +1764,8 @@ if [ "${VALIDATE_PERL}" == "true" ]; then
|
|||
#######################
|
||||
# Lint the perl files #
|
||||
#######################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "PERL" "perl" "perlcritic" ".*\.\(pl\|pm\|t\)\$" "${FILE_ARRAY_PERL[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_PERL[@]}"
|
||||
fi
|
||||
|
||||
################
|
||||
|
@ -1711,32 +1775,32 @@ if [ "${VALIDATE_PHP_BUILTIN}" == "true" ]; then
|
|||
################################################
|
||||
# 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 "PHP_BUILTIN" "php" "php -l" ".*\.\(php\)\$" "${FILE_ARRAY_PHP_BUILTIN[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_PHP_BUILTIN[@]}"
|
||||
fi
|
||||
|
||||
if [ "${VALIDATE_PHP_PHPCS}" == "true" ]; then
|
||||
############################################
|
||||
# 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 "PHP_PHPCS" "phpcs" "phpcs --standard=${PHP_PHPCS_LINTER_RULES}" ".*\.\(php\)\$" "${FILE_ARRAY_PHP_PHPCS[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_PHP_PHPCS[@]}"
|
||||
fi
|
||||
|
||||
if [ "${VALIDATE_PHP_PHPSTAN}" == "true" ]; then
|
||||
#######################
|
||||
# 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 "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 "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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_PHP_PHPSTAN[@]}"
|
||||
fi
|
||||
|
||||
if [ "${VALIDATE_PHP_PSALM}" == "true" ]; then
|
||||
##################################
|
||||
# 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 "PHP_PSALM" "psalm" "psalm --config=${PHP_PSALM_LINTER_RULES}" ".*\.\(php\)\$" "${FILE_ARRAY_PHP_PSALM[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_PHP_PSALM[@]}"
|
||||
fi
|
||||
|
||||
######################
|
||||
|
@ -1751,8 +1815,8 @@ if [ "${VALIDATE_POWERSHELL}" == "true" ]; then
|
|||
#############################
|
||||
# Lint the powershell files #
|
||||
#############################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
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 "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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_POWERSHELL[@]}"
|
||||
fi
|
||||
|
||||
####################
|
||||
|
@ -1762,8 +1826,8 @@ if [ "${VALIDATE_PROTOBUF}" == "true" ]; then
|
|||
#######################
|
||||
# Lint the Protocol Buffers files #
|
||||
#######################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "PROTOBUF" "protolint" "protolint lint --config_path ${PROTOBUF_LINTER_RULES}" ".*\.\(proto\)\$" "${FILE_ARRAY_PROTOBUF[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_PROTOBUF[@]}"
|
||||
fi
|
||||
|
||||
########################
|
||||
|
@ -1773,8 +1837,8 @@ if [ "${VALIDATE_PYTHON_BLACK}" == "true" ]; then
|
|||
#########################
|
||||
# Lint the python files #
|
||||
#########################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "PYTHON_BLACK" "black" "black --config ${PYTHON_BLACK_LINTER_RULES} --diff --check" ".*\.\(py\)\$" "${FILE_ARRAY_PYTHON_BLACK[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_PYTHON_BLACK[@]}"
|
||||
fi
|
||||
|
||||
#########################
|
||||
|
@ -1784,8 +1848,8 @@ if [ "${VALIDATE_PYTHON_PYLINT}" == "true" ]; then
|
|||
#########################
|
||||
# Lint the python files #
|
||||
#########################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "PYTHON_PYLINT" "pylint" "pylint --rcfile ${PYTHON_PYLINT_LINTER_RULES}" ".*\.\(py\)\$" "${FILE_ARRAY_PYTHON_PYLINT[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_PYTHON_PYLINT[@]}"
|
||||
fi
|
||||
|
||||
#########################
|
||||
|
@ -1795,8 +1859,8 @@ if [ "${VALIDATE_PYTHON_FLAKE8}" == "true" ]; then
|
|||
#########################
|
||||
# Lint the python files #
|
||||
#########################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "PYTHON_FLAKE8" "flake8" "flake8 --config=${PYTHON_FLAKE8_LINTER_RULES}" ".*\.\(py\)\$" "${FILE_ARRAY_PYTHON_FLAKE8[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_PYTHON_FLAKE8[@]}"
|
||||
fi
|
||||
|
||||
#############
|
||||
|
@ -1814,7 +1878,7 @@ if [ "${VALIDATE_R}" == "true" ]; then
|
|||
######################
|
||||
# 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
|
||||
|
||||
################
|
||||
|
@ -1827,8 +1891,8 @@ if [ "${VALIDATE_RAKU}" == "true" ]; then
|
|||
if [ -e "${GITHUB_WORKSPACE}/META6.json" ]; then
|
||||
cd "${GITHUB_WORKSPACE}" && zef install --deps-only --/test .
|
||||
fi
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
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 "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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_RAKU[@]}"
|
||||
fi
|
||||
|
||||
################
|
||||
|
@ -1838,8 +1902,8 @@ if [ "${VALIDATE_RUBY}" == "true" ]; then
|
|||
#######################
|
||||
# Lint the ruby files #
|
||||
#######################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "RUBY" "rubocop" "rubocop -c ${RUBY_LINTER_RULES} --force-exclusion" ".*\.\(rb\)\$" "${FILE_ARRAY_RUBY[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_RUBY[@]}"
|
||||
fi
|
||||
|
||||
#################
|
||||
|
@ -1851,8 +1915,8 @@ if [ "${VALIDATE_SHELL_SHFMT}" == "true" ]; then
|
|||
####################################
|
||||
EDITORCONFIG_FILE_PATH="${GITHUB_WORKSPACE}"/.editorconfig
|
||||
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 "SHELL_SHFMT" "shfmt" "shfmt -d" ".*\.\(sh\|bash\|dash\|ksh\)\$" "${FILE_ARRAY_BASH[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_BASH[@]}"
|
||||
else
|
||||
###############################
|
||||
# No .editorconfig file found #
|
||||
|
@ -1866,11 +1930,12 @@ fi
|
|||
# SNAKEMAKE LINT #
|
||||
##################
|
||||
if [ "${VALIDATE_SNAKEMAKE_LINT}" == "true" ]; then
|
||||
#################################
|
||||
# Lint the files with snakemake #
|
||||
#################################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "SNAKEMAKE_LINT" "snakemake" "snakemake --lint -s" ".*\(Snakefile\|\.smk\)\$" "${FILE_ARRAY_SNAKEMAKE[@]}" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}"
|
||||
################################
|
||||
# Lint the files with snakefmt #
|
||||
################################
|
||||
# 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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_SNAKEMAKE[@]}"
|
||||
|
||||
fi
|
||||
|
||||
######################
|
||||
|
@ -1880,8 +1945,8 @@ if [ "${VALIDATE_SNAKEMAKE_SNAKEFMT}" == "true" ]; then
|
|||
################################
|
||||
# Lint the files with snakefmt #
|
||||
################################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
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 "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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_SNAKEMAKE[@]}"
|
||||
fi
|
||||
|
||||
######################
|
||||
|
@ -1911,7 +1976,7 @@ if [ "${VALIDATE_STATES}" == "true" ]; then
|
|||
#########################
|
||||
# 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
|
||||
|
||||
###############
|
||||
|
@ -1921,8 +1986,8 @@ if [ "${VALIDATE_SQL}" == "true" ]; then
|
|||
######################
|
||||
# Lint the SQL files #
|
||||
######################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "SQL" "sql-lint" "sql-lint --config ${SQL_LINTER_RULES}" ".*\.\(sql\)\$" "${FILE_ARRAY_SQL[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_SQL[@]}"
|
||||
fi
|
||||
|
||||
#####################
|
||||
|
@ -1932,8 +1997,8 @@ if [ "${VALIDATE_TERRAFORM}" == "true" ]; then
|
|||
############################
|
||||
# Lint the Terraform files #
|
||||
############################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "TERRAFORM" "tflint" "tflint -c ${TERRAFORM_LINTER_RULES}" ".*\.\(tf\)\$" "${FILE_ARRAY_TERRAFORM[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_TERRAFORM[@]}"
|
||||
fi
|
||||
|
||||
###############################
|
||||
|
@ -1943,8 +2008,8 @@ if [ "${VALIDATE_TERRAFORM_TERRASCAN}" == "true" ]; then
|
|||
############################
|
||||
# Lint the Terraform files #
|
||||
############################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
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 "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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_TERRAFORM_TERRASCAN[@]}"
|
||||
fi
|
||||
|
||||
###############
|
||||
|
@ -1954,7 +2019,7 @@ if [ "${VALIDATE_TSX}" == "true" ]; then
|
|||
######################
|
||||
# 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
|
||||
|
||||
######################
|
||||
|
@ -1964,7 +2029,7 @@ if [ "${VALIDATE_TYPESCRIPT_ES}" == "true" ]; then
|
|||
#############################
|
||||
# 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
|
||||
|
||||
######################
|
||||
|
@ -1978,7 +2043,7 @@ if [ "${VALIDATE_TYPESCRIPT_STANDARD}" == "true" ]; then
|
|||
#############################
|
||||
# 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
|
||||
|
||||
###############
|
||||
|
@ -1988,8 +2053,8 @@ if [ "${VALIDATE_XML}" == "true" ]; then
|
|||
######################
|
||||
# Lint the XML Files #
|
||||
######################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "XML" "xmllint" "xmllint" ".*\.\(xml\)\$" "${FILE_ARRAY_XML[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_XML[@]}"
|
||||
fi
|
||||
|
||||
################
|
||||
|
@ -1999,8 +2064,8 @@ if [ "${VALIDATE_YAML}" == "true" ]; then
|
|||
######################
|
||||
# Lint the Yml Files #
|
||||
######################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" "FILTER_REGEX_INCLUDE" "FILTER_REGEX_EXCLUDE"
|
||||
LintCodebase "YAML" "yamllint" "yamllint -c ${YAML_LINTER_RULES}" ".*\.\(yml\|yaml\)\$" "${FILE_ARRAY_YAML[@]}" "${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\)\$" "${FILTER_REGEX_INCLUDE}" "${FILTER_REGEX_EXCLUDE}" "${FILE_ARRAY_YAML[@]}"
|
||||
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'
|
||||
'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'
|
||||
'terrascan' 'tflint' 'xmllint' 'yamllint')
|
||||
|
||||
|
|
|
@ -123,6 +123,7 @@ function GetValidationInfo() {
|
|||
if [ -z "${ANSIBLE_DIRECTORY}" ]; then
|
||||
# No Value, need to default
|
||||
ANSIBLE_DIRECTORY="${DEFAULT_ANSIBLE_DIRECTORY}"
|
||||
debug "Setting Ansible directory to the default: ${DEFAULT_ANSIBLE_DIRECTORY}"
|
||||
else
|
||||
# Check if first char is '/'
|
||||
if [[ ${ANSIBLE_DIRECTORY:0:1} == "/" ]]; then
|
||||
|
@ -133,6 +134,27 @@ function GetValidationInfo() {
|
|||
TEMP_ANSIBLE_DIRECTORY="${GITHUB_WORKSPACE}/${ANSIBLE_DIRECTORY}"
|
||||
# Set the value
|
||||
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
|
||||
|
||||
###############################
|
||||
|
|
|
@ -100,8 +100,8 @@ function LintCodebase() {
|
|||
mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}" \
|
||||
-path "*/node_modules" -prune -o \
|
||||
-path "*/.git" -prune -o \
|
||||
-path "*/.venv"-prune -o \
|
||||
-path "*/.rbenv"-prune -o \
|
||||
-path "*/.venv" -prune -o \
|
||||
-path "*/.rbenv" -prune -o \
|
||||
-type f -regex "${FILE_EXTENSIONS}" 2>&1)
|
||||
|
||||
###########################
|
||||
|
@ -128,7 +128,7 @@ function LintCodebase() {
|
|||
#################################################
|
||||
# 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
|
||||
[[ ! (${LIST_FILES[$index]} =~ $FILTER_REGEX_INCLUDE) ]] && unset -v 'LIST_FILES[$index]'
|
||||
done
|
||||
|
@ -137,7 +137,7 @@ function LintCodebase() {
|
|||
#################################################
|
||||
# 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
|
||||
[[ ${LIST_FILES[$index]} =~ $FILTER_REGEX_EXCLUDE ]] && unset -v 'LIST_FILES[$index]'
|
||||
done
|
||||
|
@ -180,19 +180,19 @@ function LintCodebase() {
|
|||
######################################################
|
||||
# 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
|
||||
continue
|
||||
elif [[ ${DIR_NAME} == *"${TEST_CASE_FOLDER}"* ]]; then
|
||||
elif [[ ${FILE} == *"${TEST_CASE_FOLDER}"* ]]; then
|
||||
# This is the test cases, we should always skip
|
||||
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
|
||||
continue
|
||||
elif [[ ${DIR_NAME} == *".venv"* ]]; then
|
||||
elif [[ ${FILE} == *".venv"* ]]; then
|
||||
# This is likely the python virtual environment folder and shouldn't be parsed
|
||||
continue
|
||||
elif [[ ${DIR_NAME} == *".rbenv"* ]]; then
|
||||
elif [[ ${FILE} == *".rbenv"* ]]; then
|
||||
# This is likely the ruby environment folder and shouldn't be parsed
|
||||
continue
|
||||
elif [[ ${FILE_TYPE} == "BASH" ]] && ! IsValidShellScript "${FILE}"; then
|
||||
|
@ -297,7 +297,8 @@ function LintCodebase() {
|
|||
# Check the shell for errors #
|
||||
##############################
|
||||
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 #
|
||||
########
|
||||
|
@ -699,12 +700,13 @@ function RunTestCases() {
|
|||
TestCodebase "EDITORCONFIG" "editorconfig-checker" "editorconfig-checker" ".*\.ext$" "editorconfig-checker"
|
||||
TestCodebase "ENV" "dotenv-linter" "dotenv-linter" ".*\.\(env\)\$" "env"
|
||||
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 "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_STANDARD" "standard" "standard ${JAVASCRIPT_STANDARD_LINTER_RULES}" ".*\.\(js\)\$" "javascript"
|
||||
TestCodebase "JSON" "jsonlint" "jsonlint" ".*\.\(json\)\$" "json"
|
||||
TestCodebase "KUBERNETES_KUBEVAL" "kubeval" "kubeval --strict" ".*\.\(yml\|yaml\)\$" "kubeval"
|
||||
TestCodebase "KOTLIN" "ktlint" "ktlint" ".*\.\(kt\|kts\)\$" "kotlin"
|
||||
TestCodebase "LATEX" "chktex" "chktex -q -l ${LATEX_LINTER_RULES}" ".*\.\(tex\)\$" "latex"
|
||||
TestCodebase "LUA" "lua" "luacheck" ".*\.\(lua\)\$" "lua"
|
||||
|
@ -806,26 +808,7 @@ function LintAnsibleFiles() {
|
|||
#################################
|
||||
# Get list of all files to lint #
|
||||
#################################
|
||||
mapfile -t LIST_FILES < <(ls "${ANSIBLE_DIRECTORY}"/*.{yaml,yml} 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
|
||||
mapfile -t LIST_FILES < <(find "${ANSIBLE_DIRECTORY}" -path "*/node_modules" -prune -o -type f -regex ".*\.\(yml\|yaml\|json\)\$" 2>&1)
|
||||
|
||||
####################################
|
||||
# Check if we have data to look at #
|
||||
|
|
Loading…
Reference in a new issue