mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-22 08:41:02 -05:00
Merge remote-tracking branch 'origin/master' into log
This commit is contained in:
commit
fdfd6eb08e
18 changed files with 1198 additions and 998 deletions
4
.automation/test/php/php_bad_2.php
Normal file
4
.automation/test/php/php_bad_2.php
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?php
|
||||
|
||||
function f(int $i){}
|
||||
f("not int');
|
|
@ -1,7 +1,11 @@
|
|||
TAP version 13
|
||||
1..2
|
||||
1..3
|
||||
not ok 1 - php_bad_1.php
|
||||
---
|
||||
message: PHP Parse error syntax error, unexpected 'pe98y' (T_STRING) in /tmp/lint/.automation/test/php/php_bad_1.php on line 3\nErrors parsing /tmp/lint/.automation/test/php/php_bad_1.php\n
|
||||
...
|
||||
ok 2 - php_good_1.php
|
||||
not ok 2 - php_bad_2.php
|
||||
---
|
||||
message: PHP Parse error syntax error, unexpected end of file, expecting variable (T_VARIABLE) or ${ (T_DOLLAR_OPEN_CURLY_BRACES) or {$ (T_CURLY_OPEN) in /tmp/lint/.automation/test/php/php_bad_2.php on line 5\nErrors parsing /tmp/lint/.automation/test/php/php_bad_2.php\n
|
||||
...
|
||||
ok 3 - php_good_1.php
|
||||
|
|
11
.automation/test/php/reports/expected-PHP_PHPSTAN.tap
Normal file
11
.automation/test/php/reports/expected-PHP_PHPSTAN.tap
Normal file
|
@ -0,0 +1,11 @@
|
|||
TAP version 13
|
||||
1..3
|
||||
not ok 1 - php_bad_1.php
|
||||
---
|
||||
message: ------ ---------------------------------------------- \n Line php_bad_1.php \n ------ ---------------------------------------------- \n 3 Invalid numeric literal on line 3 \n 3 Invalid numeric literal on line 3 \n 3 Syntax error, unexpected '=' on line 3 \n 3 Syntax error, unexpected T_LNUMBER on line 3 \n 3 Syntax error, unexpected T_STRING on line 3 \n 3 Syntax error, unexpected T_STRING on line 3 \n ------ ---------------------------------------------- \n\n [ERROR] Found 6 errors \n
|
||||
...
|
||||
not ok 2 - php_bad_2.php
|
||||
---
|
||||
message: ------ ------------------------------------------------------- \n Line php_bad_2.php \n ------ ------------------------------------------------------- \n 5 Syntax error, unexpected EOF, expecting T_VARIABLE or \n T_DOLLAR_OPEN_CURLY_BRACES or T_CURLY_OPEN on line 5 \n ------ ------------------------------------------------------- \n\n [ERROR] Found 1 error \n
|
||||
...
|
||||
ok 3 - php_good_1.php
|
|
@ -23,6 +23,7 @@ headers = {
|
|||
'Content-Type': 'application/json'
|
||||
}
|
||||
|
||||
|
||||
def create_label(repo_id, label):
|
||||
"""
|
||||
Create label in the supplied repo.
|
||||
|
@ -52,6 +53,7 @@ def create_label(repo_id, label):
|
|||
|
||||
return response
|
||||
|
||||
|
||||
def get_labels(owner, repo):
|
||||
"""
|
||||
Gets a list of labels from the supplied repo.
|
||||
|
@ -83,6 +85,7 @@ def get_labels(owner, repo):
|
|||
'[ERROR] getting issue labels. Status Code: {status_code} - Message: {result}'.format(
|
||||
status_code=status_code, result=result["message"]))
|
||||
|
||||
|
||||
def delete_label(label_id):
|
||||
"""
|
||||
Delete the specified label
|
||||
|
@ -106,6 +109,7 @@ def delete_label(label_id):
|
|||
|
||||
return result
|
||||
|
||||
|
||||
@click.command()
|
||||
@click.option('--dry', is_flag=True)
|
||||
@click.argument('source_repo')
|
||||
|
@ -149,6 +153,7 @@ def copy_labels(source_repo, target_repo, dry):
|
|||
|
||||
print('Done')
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Pylint doesn't know that @click.command takes care of injecting the
|
||||
# function parameters. Disabling Pylint error.
|
||||
|
|
2
.github/linters/.flake8
vendored
Normal file
2
.github/linters/.flake8
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[flake8]
|
||||
max-line-length = 120
|
25
Dockerfile
25
Dockerfile
|
@ -7,7 +7,7 @@
|
|||
#########################################
|
||||
# Get dependency images as build stages #
|
||||
#########################################
|
||||
FROM borkdude/clj-kondo:2020.07.26 as clj-kondo
|
||||
FROM borkdude/clj-kondo:2020.07.29 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.29.0 as golangci-lint
|
||||
|
@ -59,17 +59,18 @@ RUN apk add --update --no-cache \
|
|||
go \
|
||||
icu-libs \
|
||||
jq \
|
||||
libc-dev \
|
||||
libxml2-utils \
|
||||
libc-dev libxml2-utils \
|
||||
make \
|
||||
musl-dev \
|
||||
npm nodejs-current \
|
||||
openjdk8-jre \
|
||||
perl \
|
||||
php7 \
|
||||
php7 php7-phar php7-json php7-mbstring \
|
||||
php7-tokenizer php7-ctype php7-curl php7-dom \
|
||||
py3-setuptools \
|
||||
readline-dev \
|
||||
ruby ruby-dev ruby-bundler ruby-rdoc
|
||||
ruby ruby-dev ruby-bundler ruby-rdoc \
|
||||
gnupg
|
||||
|
||||
########################################
|
||||
# Copy dependencies files to container #
|
||||
|
@ -204,6 +205,17 @@ RUN wget https://github.com/cvega/luarocks/archive/v3.3.1-super-linter.tar.gz -O
|
|||
|
||||
RUN luarocks install luacheck
|
||||
|
||||
#############################
|
||||
# Install Phive and PHPStan #
|
||||
#############################
|
||||
RUN wget -O phive.phar https://phar.io/releases/phive.phar \
|
||||
&& wget -O phive.phar.asc https://phar.io/releases/phive.phar.asc \
|
||||
&& gpg --keyserver pool.sks-keyservers.net --recv-keys 0x9D8A98B29B2D5D79 \
|
||||
&& gpg --verify phive.phar.asc phive.phar \
|
||||
&& chmod +x phive.phar \
|
||||
&& mv phive.phar /usr/local/bin/phive \
|
||||
&& yes | phive install -g phpstan
|
||||
|
||||
###########################################
|
||||
# Load GitHub Env Vars for GitHub Actions #
|
||||
###########################################
|
||||
|
@ -244,9 +256,12 @@ ENV ACTIONS_RUNNER_DEBUG=${ACTIONS_RUNNER_DEBUG} \
|
|||
VALIDATE_OPENAPI=${VALIDATE_OPENAPI} \
|
||||
VALIDATE_PERL=${VALIDATE_PERL} \
|
||||
VALIDATE_PHP=${VALIDATE_PHP} \
|
||||
VALIDATE_PHP_PHPSTAN=${VALIDATE_PHP_PHPSTAN} \
|
||||
VALIDATE_POWERSHELL=${VALIDATE_POWERSHELL} \
|
||||
VALIDATE_PROTOBUF=${VALIDATE_PROTOBUF} \
|
||||
VALIDATE_PYTHON=${VALIDATE_PYTHON} \
|
||||
VALIDATE_PYTHON_PYLINT=${VALIDATE_PYTHON_PYLINT} \
|
||||
VALIDATE_PYTHON_FLAKE8=${VALIDATE_PYTHON_FLAKE8} \
|
||||
VALIDATE_RAKU=${VALIDATE_RAKU} \
|
||||
VALIDATE_RUBY=${VALIDATE_RUBY} \
|
||||
VALIDATE_STATES=${VALIDATE_STATES} \
|
||||
|
|
|
@ -66,7 +66,7 @@ Developers on **GitHub** can call the **GitHub Action** to lint their code base
|
|||
| **PHP** | [PHP](https://www.php.net/) |
|
||||
| **PowerShell** | [PSScriptAnalyzer](https://github.com/PowerShell/Psscriptanalyzer) |
|
||||
| **Protocol Buffers** | [protolint](https://github.com/yoheimuta/protolint) |
|
||||
| **Python3** | [pylint](https://www.pylint.org/) |
|
||||
| **Python3** | [pylint](https://www.pylint.org/) [flake8](https://flake8.pycqa.org/en/latest/) |
|
||||
| **Raku** | [raku](https://raku.org) |
|
||||
| **Ruby** | [RuboCop](https://github.com/rubocop-hq/rubocop) |
|
||||
| **Shell** | [Shellcheck](https://github.com/koalaman/shellcheck) |
|
||||
|
@ -180,6 +180,8 @@ and won't run anything unexpected.
|
|||
| **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_FLAKE8_CONFIG_FILE** | `.flake8` | Filename for [flake8 configuration](https://flake8.pycqa.org/en/latest/user/configuration.html) (ex: `.flake8`, `tox.ini`) |
|
||||
| **RUBY_CONFIG_FILE** | `.ruby-lint.yml` | Filename for [rubocop configuration](https://docs.rubocop.org/rubocop/configuration.html) (ex: `.ruby-lint.yml`, `.rubocop.yml`) |
|
||||
| **TYPESCRIPT_ES_CONFIG_FILE** | `.eslintrc.yml` | Filename for [eslint configuration](https://eslint.org/docs/user-guide/configuring#configuration-file-formats) (ex: `.eslintrc.yml`, `.eslintrc.json`) |
|
||||
| **VALIDATE_ALL_CODEBASE** | `true` | Will parse the entire repository and find all files to validate across all types. **NOTE:** When set to `false`, only **new** or **edited** files will be parsed for validation. |
|
||||
|
@ -207,8 +209,11 @@ and won't run anything unexpected.
|
|||
| **VALIDATE_OPENAPI** | `true` | Flag to enable or disable the linting process of the OpenAPI language. |
|
||||
| **VALIDATE_PERL** | `true` | Flag to enable or disable the linting process of the Perl language. |
|
||||
| **VALIDATE_PHP** | `true` | Flag to enable or disable the linting process of the PHP language. |
|
||||
| **VALIDATE_PHP_PHPSTAN** | `true` | Flag to enable or disable the linting process of the PHP language (Utilizing: PHPStan). |
|
||||
| **VALIDATE_PROTOBUF** | `true` | Flag to enable or disable the linting process of the Protobuf language. |
|
||||
| **VALIDATE_PYTHON** | `true` | Flag to enable or disable the linting process of the Python language. |
|
||||
| **VALIDATE_PYTHON** | `true` | Flag to enable or disable the linting process of the Python language. (Utilizing: pylint) (keep for backward compatibility) |
|
||||
| **VALIDATE_PYTHON_PYLINT** | `true` | Flag to enable or disable the linting process of the Python language. (Utilizing: pylint) |
|
||||
| **VALIDATE_PYTHON_FLAKE8** | `true` | Flag to enable or disable the linting process of the Python language. (Utilizing: flake8) |
|
||||
| **VALIDATE_POWERSHELL** | `true` | Flag to enable or disable the linting process of the Powershell language. |
|
||||
| **VALIDATE_RAKU** | `true` | Flag to enable or disable the linting process of the Raku language. |
|
||||
| **VALIDATE_RUBY** | `true` | Flag to enable or disable the linting process of the Ruby language. |
|
||||
|
|
2
TEMPLATES/.flake8
Normal file
2
TEMPLATES/.flake8
Normal file
|
@ -0,0 +1,2 @@
|
|||
[flake8]
|
||||
max-line-length = 120
|
2
TEMPLATES/phpstan.neon
Normal file
2
TEMPLATES/phpstan.neon
Normal file
|
@ -0,0 +1,2 @@
|
|||
parameters:
|
||||
level: 5
|
1
dependencies/Pipfile
vendored
1
dependencies/Pipfile
vendored
|
@ -11,6 +11,7 @@ pylint = "*"
|
|||
yq = "*"
|
||||
cfn-lint = "*"
|
||||
terrascan = "*"
|
||||
flake8 = "*"
|
||||
|
||||
[requires]
|
||||
python_version = "3.8"
|
||||
|
|
35
dependencies/Pipfile.lock
generated
vendored
35
dependencies/Pipfile.lock
generated
vendored
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "c62b95247cb67b10711da0012966cc031d5a9ec08885a45736c0ee77bba3a844"
|
||||
"sha256": "f8ea3853c4bb4533103043533d08982436551678c827f59809c94bf0ee54a187"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {
|
||||
|
@ -28,6 +28,7 @@
|
|||
"sha256:2f4078c2a41bf377eea06d71c9d2ba4eb8f6b1af2135bec27bbbb7d8f12bb703",
|
||||
"sha256:bc58d83eb610252fd8de6363e39d4f1d0619c894b0ed24603b881c02e64c7386"
|
||||
],
|
||||
"markers": "python_version >= '3.5'",
|
||||
"version": "==2.4.2"
|
||||
},
|
||||
"attrs": {
|
||||
|
@ -35,6 +36,7 @@
|
|||
"sha256:08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c",
|
||||
"sha256:f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72"
|
||||
],
|
||||
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
|
||||
"version": "==19.3.0"
|
||||
},
|
||||
"aws-sam-translator": {
|
||||
|
@ -80,13 +82,23 @@
|
|||
"sha256:9e4d7ecfc600058e07ba661411a2b7de2fd0fafa17d1a7f7361cd47b1175c827",
|
||||
"sha256:a2aeea129088da402665e92e0b25b04b073c04b2dce4ab65caaa38b7ce2e1a99"
|
||||
],
|
||||
"markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'",
|
||||
"version": "==0.15.2"
|
||||
},
|
||||
"flake8": {
|
||||
"hashes": [
|
||||
"sha256:15e351d19611c887e482fb960eae4d44845013cc142d42896e9862f775d8cf5c",
|
||||
"sha256:f04b9fcbac03b0a3e58c0ab3a0ecc462e023a9faf046d57794184028123aa208"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==3.8.3"
|
||||
},
|
||||
"isort": {
|
||||
"hashes": [
|
||||
"sha256:54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c35a78b719dccab1",
|
||||
"sha256:6e811fcb295968434526407adb8796944f1988c5b65e8139058f2014cbe100fd"
|
||||
],
|
||||
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
|
||||
"version": "==4.3.21"
|
||||
},
|
||||
"jmespath": {
|
||||
|
@ -94,6 +106,7 @@
|
|||
"sha256:b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9",
|
||||
"sha256:cdf6525904cc597730141d61b36f2e4b8ecc257c420fa2f4549bac2c2d0cb72f"
|
||||
],
|
||||
"markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'",
|
||||
"version": "==0.10.0"
|
||||
},
|
||||
"jsonpatch": {
|
||||
|
@ -109,6 +122,7 @@
|
|||
"sha256:c192ba86648e05fdae4f08a17ec25180a9aef5008d973407b581798a83975362",
|
||||
"sha256:ff379fa021d1b81ab539f5ec467c7745beb1a5671463f9dcc2b2d458bd361c1e"
|
||||
],
|
||||
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
|
||||
"version": "==2.0"
|
||||
},
|
||||
"jsonschema": {
|
||||
|
@ -148,6 +162,7 @@
|
|||
"sha256:efa1909120ce98bbb3777e8b6f92237f5d5c8ea6758efea36a473e1d38f7d3e4",
|
||||
"sha256:f3900e8a5de27447acbf900b4750b0ddfd7ec1ea7fbaf11dfa911141bc522af0"
|
||||
],
|
||||
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
|
||||
"version": "==1.4.3"
|
||||
},
|
||||
"mccabe": {
|
||||
|
@ -172,6 +187,22 @@
|
|||
],
|
||||
"version": "==0.8.0"
|
||||
},
|
||||
"pycodestyle": {
|
||||
"hashes": [
|
||||
"sha256:2295e7b2f6b5bd100585ebcb1f616591b652db8a741695b3d8f5d28bdc934367",
|
||||
"sha256:c58a7d2815e0e8d7972bf1803331fb0152f867bd89adf8a01dfd55085434192e"
|
||||
],
|
||||
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
|
||||
"version": "==2.6.0"
|
||||
},
|
||||
"pyflakes": {
|
||||
"hashes": [
|
||||
"sha256:0d94e0e05a19e57a99444b6ddcf9a6eb2e5c68d3ca1e98e90707af8152c90a92",
|
||||
"sha256:35b2d75ee967ea93b55750aa9edbbf72813e06a66ba54438df2cfac9e3c27fc8"
|
||||
],
|
||||
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
|
||||
"version": "==2.2.0"
|
||||
},
|
||||
"pyhcl": {
|
||||
"hashes": [
|
||||
"sha256:2d9b9dcdf1023d812bfed561ba72c99104c5b3f52e558d595130a44ce081b003"
|
||||
|
@ -197,6 +228,7 @@
|
|||
"sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c",
|
||||
"sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"
|
||||
],
|
||||
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'",
|
||||
"version": "==2.8.1"
|
||||
},
|
||||
"pyyaml": {
|
||||
|
@ -228,6 +260,7 @@
|
|||
"sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259",
|
||||
"sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced"
|
||||
],
|
||||
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'",
|
||||
"version": "==1.15.0"
|
||||
},
|
||||
"terrascan": {
|
||||
|
|
100
dependencies/package-lock.json
generated
vendored
100
dependencies/package-lock.json
generated
vendored
|
@ -513,11 +513,11 @@
|
|||
"integrity": "sha512-/tiJyrc0GPcsReHzgC0SXwOmoPjLqYe01W7dLYB0yasQXMbcRee+ZIk+g8MIQhoBS8fPoBQO3Y93+aeBrI93Ug=="
|
||||
},
|
||||
"@typescript-eslint/eslint-plugin": {
|
||||
"version": "3.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.7.0.tgz",
|
||||
"integrity": "sha512-4OEcPON3QIx0ntsuiuFP/TkldmBGXf0uKxPQlGtS/W2F3ndYm8Vgdpj/woPJkzUc65gd3iR+qi3K8SDQP/obFg==",
|
||||
"version": "3.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.7.1.tgz",
|
||||
"integrity": "sha512-3DB9JDYkMrc8Au00rGFiJLK2Ja9CoMP6Ut0sHsXp3ZtSugjNxvSSHTnKLfo4o+QmjYBJqEznDqsG1zj4F2xnsg==",
|
||||
"requires": {
|
||||
"@typescript-eslint/experimental-utils": "3.7.0",
|
||||
"@typescript-eslint/experimental-utils": "3.7.1",
|
||||
"debug": "^4.1.1",
|
||||
"functional-red-black-tree": "^1.0.1",
|
||||
"regexpp": "^3.0.0",
|
||||
|
@ -526,41 +526,53 @@
|
|||
}
|
||||
},
|
||||
"@typescript-eslint/experimental-utils": {
|
||||
"version": "3.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.7.0.tgz",
|
||||
"integrity": "sha512-xpfXXAfZqhhqs5RPQBfAFrWDHoNxD5+sVB5A46TF58Bq1hRfVROrWHcQHHUM9aCBdy9+cwATcvCbRg8aIRbaHQ==",
|
||||
"version": "3.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.7.1.tgz",
|
||||
"integrity": "sha512-TqE97pv7HrqWcGJbLbZt1v59tcqsSVpWTOf1AqrWK7n8nok2sGgVtYRuGXeNeLw3wXlLEbY1MKP3saB2HsO/Ng==",
|
||||
"requires": {
|
||||
"@types/json-schema": "^7.0.3",
|
||||
"@typescript-eslint/types": "3.7.0",
|
||||
"@typescript-eslint/typescript-estree": "3.7.0",
|
||||
"@typescript-eslint/types": "3.7.1",
|
||||
"@typescript-eslint/typescript-estree": "3.7.1",
|
||||
"eslint-scope": "^5.0.0",
|
||||
"eslint-utils": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/parser": {
|
||||
"version": "3.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.7.0.tgz",
|
||||
"integrity": "sha512-2LZauVUt7jAWkcIW7djUc3kyW+fSarNEuM3RF2JdLHR9BfX/nDEnyA4/uWz0wseoWVZbDXDF7iF9Jc342flNqQ==",
|
||||
"version": "3.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.7.1.tgz",
|
||||
"integrity": "sha512-W4QV/gXvfIsccN8225784LNOorcm7ch68Fi3V4Wg7gmkWSQRKevO4RrRqWo6N/Z/myK1QAiGgeaXN57m+R/8iQ==",
|
||||
"requires": {
|
||||
"@types/eslint-visitor-keys": "^1.0.0",
|
||||
"@typescript-eslint/experimental-utils": "3.7.0",
|
||||
"@typescript-eslint/types": "3.7.0",
|
||||
"@typescript-eslint/typescript-estree": "3.7.0",
|
||||
"@typescript-eslint/experimental-utils": "3.7.1",
|
||||
"@typescript-eslint/types": "3.7.1",
|
||||
"@typescript-eslint/typescript-estree": "3.7.1",
|
||||
"eslint-visitor-keys": "^1.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@typescript-eslint/experimental-utils": {
|
||||
"version": "3.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.7.1.tgz",
|
||||
"integrity": "sha512-TqE97pv7HrqWcGJbLbZt1v59tcqsSVpWTOf1AqrWK7n8nok2sGgVtYRuGXeNeLw3wXlLEbY1MKP3saB2HsO/Ng==",
|
||||
"requires": {
|
||||
"@types/json-schema": "^7.0.3",
|
||||
"@typescript-eslint/types": "3.7.1",
|
||||
"@typescript-eslint/typescript-estree": "3.7.1",
|
||||
"eslint-scope": "^5.0.0",
|
||||
"eslint-utils": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/types": {
|
||||
"version": "3.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.7.0.tgz",
|
||||
"integrity": "sha512-reCaK+hyKkKF+itoylAnLzFeNYAEktB0XVfSQvf0gcVgpz1l49Lt6Vo9x4MVCCxiDydA0iLAjTF/ODH0pbfnpg=="
|
||||
"version": "3.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.7.1.tgz",
|
||||
"integrity": "sha512-PZe8twm5Z4b61jt7GAQDor6KiMhgPgf4XmUb9zdrwTbgtC/Sj29gXP1dws9yEn4+aJeyXrjsD9XN7AWFhmnUfg=="
|
||||
},
|
||||
"@typescript-eslint/typescript-estree": {
|
||||
"version": "3.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.7.0.tgz",
|
||||
"integrity": "sha512-xr5oobkYRebejlACGr1TJ0Z/r0a2/HUf0SXqPvlgUMwiMqOCu/J+/Dr9U3T0IxpE5oLFSkqMx1FE/dKaZ8KsOQ==",
|
||||
"version": "3.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.7.1.tgz",
|
||||
"integrity": "sha512-m97vNZkI08dunYOr2lVZOHoyfpqRs0KDpd6qkGaIcLGhQ2WPtgHOd/eVbsJZ0VYCQvupKrObAGTOvk3tfpybYA==",
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "3.7.0",
|
||||
"@typescript-eslint/visitor-keys": "3.7.0",
|
||||
"@typescript-eslint/types": "3.7.1",
|
||||
"@typescript-eslint/visitor-keys": "3.7.1",
|
||||
"debug": "^4.1.1",
|
||||
"glob": "^7.1.6",
|
||||
"is-glob": "^4.0.1",
|
||||
|
@ -570,9 +582,39 @@
|
|||
}
|
||||
},
|
||||
"@typescript-eslint/visitor-keys": {
|
||||
"version": "3.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.7.0.tgz",
|
||||
"integrity": "sha512-k5PiZdB4vklUpUX4NBncn5RBKty8G3ihTY+hqJsCdMuD0v4jofI5xuqwnVcWxfv6iTm2P/dfEa2wMUnsUY8ODw==",
|
||||
"version": "3.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.7.1.tgz",
|
||||
"integrity": "sha512-xn22sQbEya+Utj2IqJHGLA3i1jDzR43RzWupxojbSWnj3nnPLavaQmWe5utw03CwYao3r00qzXfgJMGNkrzrAA==",
|
||||
"requires": {
|
||||
"eslint-visitor-keys": "^1.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/types": {
|
||||
"version": "3.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.7.1.tgz",
|
||||
"integrity": "sha512-PZe8twm5Z4b61jt7GAQDor6KiMhgPgf4XmUb9zdrwTbgtC/Sj29gXP1dws9yEn4+aJeyXrjsD9XN7AWFhmnUfg=="
|
||||
},
|
||||
"@typescript-eslint/typescript-estree": {
|
||||
"version": "3.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.7.1.tgz",
|
||||
"integrity": "sha512-m97vNZkI08dunYOr2lVZOHoyfpqRs0KDpd6qkGaIcLGhQ2WPtgHOd/eVbsJZ0VYCQvupKrObAGTOvk3tfpybYA==",
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "3.7.1",
|
||||
"@typescript-eslint/visitor-keys": "3.7.1",
|
||||
"debug": "^4.1.1",
|
||||
"glob": "^7.1.6",
|
||||
"is-glob": "^4.0.1",
|
||||
"lodash": "^4.17.15",
|
||||
"semver": "^7.3.2",
|
||||
"tsutils": "^3.17.1"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/visitor-keys": {
|
||||
"version": "3.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.7.1.tgz",
|
||||
"integrity": "sha512-xn22sQbEya+Utj2IqJHGLA3i1jDzR43RzWupxojbSWnj3nnPLavaQmWe5utw03CwYao3r00qzXfgJMGNkrzrAA==",
|
||||
"requires": {
|
||||
"eslint-visitor-keys": "^1.1.0"
|
||||
}
|
||||
|
@ -1883,9 +1925,9 @@
|
|||
}
|
||||
},
|
||||
"eslint-plugin-jest": {
|
||||
"version": "23.18.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-23.18.2.tgz",
|
||||
"integrity": "sha512-afVOE47F0PENnRlnePUHgrDbv1tsDlTAVrjL051oUETB2ImzBwa5GfmUAUhDjAEuxH+xkE6DsmEpZ8obXzUMqQ==",
|
||||
"version": "23.19.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-23.19.0.tgz",
|
||||
"integrity": "sha512-l5PLflALqnODl8Yy0H5hDs18aKJS1KTf66VZGXRpIhmbLbPLaTuMB2P+65fBpkdseSpnTVcIlBYvTvJSBi/itg==",
|
||||
"requires": {
|
||||
"@typescript-eslint/experimental-utils": "^2.5.0"
|
||||
},
|
||||
|
|
6
dependencies/package.json
vendored
6
dependencies/package.json
vendored
|
@ -3,13 +3,13 @@
|
|||
"dependencies": {
|
||||
"@coffeelint/cli": "^3.2.10",
|
||||
"@stoplight/spectral": "^5.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "^3.7.0",
|
||||
"@typescript-eslint/parser": "^3.7.0",
|
||||
"@typescript-eslint/eslint-plugin": "^3.7.1",
|
||||
"@typescript-eslint/parser": "^3.7.1",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"dockerfilelint": "^1.5.0",
|
||||
"eslint": "^7.5.0",
|
||||
"eslint-config-prettier": "^6.11.0",
|
||||
"eslint-plugin-jest": "^23.18.2",
|
||||
"eslint-plugin-jest": "^23.19.0",
|
||||
"htmlhint": "^0.14.1",
|
||||
"jsonlint": "^1.6.3",
|
||||
"markdownlint-cli": "^0.23.2",
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -238,6 +238,7 @@ function BuildFileList() {
|
|||
# Append the file to the array #
|
||||
################################
|
||||
FILE_ARRAY_PHP+=("${FILE}")
|
||||
FILE_ARRAY_PHP_PHPSTAN+=("${FILE}")
|
||||
##########################################################
|
||||
# Set the READ_ONLY_CHANGE_FLAG since this could be exec #
|
||||
##########################################################
|
||||
|
@ -261,7 +262,8 @@ function BuildFileList() {
|
|||
################################
|
||||
# Append the file to the array #
|
||||
################################
|
||||
FILE_ARRAY_PYTHON+=("${FILE}")
|
||||
FILE_ARRAY_PYTHON_PYLINT+=("${FILE}")
|
||||
FILE_ARRAY_PYTHON_FLAKE8+=("${FILE}")
|
||||
##########################################################
|
||||
# Set the READ_ONLY_CHANGE_FLAG since this could be exec #
|
||||
##########################################################
|
||||
|
|
|
@ -71,6 +71,12 @@ MARKDOWN_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${MARKDOWN_FILE_NAME}"
|
|||
# OpenAPI Vars
|
||||
OPENAPI_FILE_NAME='.openapirc.yml' # Name of the file
|
||||
OPENAPI_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${OPENAPI_FILE_NAME}" # Path to the OpenAPI lint rules
|
||||
# PHP Vars
|
||||
PHPSTAN_FILE_NAME='phpstan.neon' # Name of the file
|
||||
PHPSTAN_LINTER_RULES="${GITHUB_WORKSPACE}/${PHPSTAN_FILE_NAME}" # Path to the PHPStan lint rules in the repository
|
||||
if [ ! -f "$PHPSTAN_LINTER_RULES" ]; then
|
||||
PHPSTAN_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${PHPSTAN_FILE_NAME}" # Path to the PHPStan lint rules
|
||||
fi
|
||||
# Powershell Vars
|
||||
POWERSHELL_FILE_NAME='.powershell-psscriptanalyzer.psd1' # Name of the file
|
||||
POWERSHELL_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${POWERSHELL_FILE_NAME}" # Path to the Powershell lint rules
|
||||
|
@ -78,8 +84,10 @@ POWERSHELL_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${POWERSHELL_FILE_NAME}"
|
|||
PROTOBUF_FILE_NAME='.protolintrc.yml' # Name of the file
|
||||
PROTOBUF_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${PROTOBUF_FILE_NAME}" # Path to the Protocol Buffers lint rules
|
||||
# Python Vars
|
||||
PYTHON_FILE_NAME='.python-lint' # Name of the file
|
||||
PYTHON_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${PYTHON_FILE_NAME}" # Path to the python lint rules
|
||||
PYTHON_PYLINT_FILE_NAME="${PYTHON_PYLINT_CONFIG_FILE:-.python-lint}" # Name of the file
|
||||
PYTHON_PYLINT_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${PYTHON_PYLINT_FILE_NAME}" # Path to the python lint rules
|
||||
PYTHON_FLAKE8_FILE_NAME="${PYTHON_FLAKE8_CONFIG_FILE:-.flake8}" # Name of the file
|
||||
PYTHON_FLAKE8_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${PYTHON_FLAKE8_FILE_NAME}" # Path to the python lint rules
|
||||
# Ruby Vars
|
||||
RUBY_FILE_NAME="${RUBY_CONFIG_FILE:-.ruby-lint.yml}" # Name of the file
|
||||
RUBY_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${RUBY_FILE_NAME}" # Path to the ruby lint rules
|
||||
|
@ -97,29 +105,26 @@ YAML_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${YAML_FILE_NAME}"
|
|||
#######################################
|
||||
# Linter array for information prints #
|
||||
#######################################
|
||||
LINTER_ARRAY=('ansible-lint' 'arm-ttk' 'asl-validator' 'cfn-lint' 'clj-kondo'
|
||||
'coffeelint' 'dart' 'dockerfilelint' 'dotenv-linter' 'eslint' 'golangci-lint'
|
||||
'htmlhint' 'jsonlint' 'ktlint' 'lua' 'markdownlint' 'npm-groovy-lint' 'perl'
|
||||
'protolint' 'pwsh' 'pylint' 'raku' 'rubocop' 'shellcheck' 'spectral'
|
||||
'standard' 'stylelint' 'terrascan' 'tflint' 'xmllint' 'yamllint')
|
||||
|
||||
LINTER_ARRAY=('ansible-lint' 'arm-ttk' 'asl-validator' 'cfn-lint' 'clj-kondo' 'coffeelint'
|
||||
'dart' 'dockerfilelint' 'dotenv-linter' 'eslint' 'flake8' 'golangci-lint' 'htmlhint'
|
||||
'jsonlint' 'ktlint' 'lua' 'markdownlint' 'npm-groovy-lint' 'perl' 'protolint' 'pwsh'
|
||||
'pylint' 'raku' 'rubocop' 'shellcheck' 'spectral' 'standard' 'stylelint' 'terrascan'
|
||||
'tflint' 'xmllint' 'yamllint')
|
||||
|
||||
#############################
|
||||
# Language array for prints #
|
||||
#############################
|
||||
LANGUAGE_ARRAY=('ANSIBLE' 'ARM' 'BASH' 'CLOUDFORMATION' 'CLOJURE' 'COFFEESCRIPT'
|
||||
'CSS' 'DART' 'DOCKER' 'ENV' 'GO' 'GROOVY' 'HTML' 'JAVASCRIPT_ES'
|
||||
'JAVASCRIPT_STANDARD' 'JSON' 'JSX' 'KOTLIN' 'LUA' 'MARKDOWN' 'OPENAPI'
|
||||
'PERL' 'PHP' 'POWERSHELL' 'PROTOBUF' 'PYTHON'
|
||||
'RAKU' 'RUBY' 'STATES' 'TERRAFORM' 'TERRAFORM_TERRASCAN' 'TSX' 'TYPESCRIPT_ES'
|
||||
'TYPESCRIPT_STANDARD' 'XML' 'YAML')
|
||||
LANGUAGE_ARRAY=('ANSIBLE' 'ARM' 'BASH' 'CLOUDFORMATION' 'CLOJURE' 'COFFEESCRIPT' 'CSS'
|
||||
'DART' 'DOCKER' 'ENV' 'GO' 'GROOVY' 'HTML' 'JAVASCRIPT_ES' 'JAVASCRIPT_STANDARD'
|
||||
'JSON' 'JSX' 'KOTLIN' 'LUA' 'MARKDOWN' 'OPENAPI' 'PERL' 'PHP' 'PHP_PHPSTAN' 'POWERSHELL'
|
||||
'PROTOBUF' 'PYTHON_PYLINT' 'PYTHON_FLAKE8' 'RAKU' 'RUBY' 'STATES' 'TERRAFORM'
|
||||
'TERRAFORM_TERRASCAN' 'TSX' 'TYPESCRIPT_ES' 'TYPESCRIPT_STANDARD' 'XML' 'YML')
|
||||
|
||||
############################################
|
||||
# Array for all languages that were linted #
|
||||
############################################
|
||||
LINTED_LANGUAGES_ARRAY=() # Will be filled at run time with all languages that were linted
|
||||
|
||||
|
||||
###################
|
||||
# GitHub ENV Vars #
|
||||
###################
|
||||
|
@ -159,8 +164,10 @@ VALIDATE_MARKDOWN="${VALIDATE_MD:-}" # Boolean to vali
|
|||
VALIDATE_OPENAPI="${VALIDATE_OPENAPI}" # Boolean to validate language
|
||||
VALIDATE_PERL="${VALIDATE_PERL}" # Boolean to validate language
|
||||
VALIDATE_PHP="${VALIDATE_PHP}" # Boolean to validate language
|
||||
VALIDATE_PHP_PHPSTAN="${VALIDATE_PHP_PHPSTAN}" # Boolean to validate language
|
||||
VALIDATE_POWERSHELL="${VALIDATE_POWERSHELL}" # Boolean to validate language
|
||||
VALIDATE_PYTHON="${VALIDATE_PYTHON}" # Boolean to validate language
|
||||
VALIDATE_PYTHON_PYLINT="${VALIDATE_PYTHON:-$VALIDATE_PYTHON_PYLINT}" # Boolean to validate language
|
||||
VALIDATE_PYTHON_FLAKE8="${VALIDATE_PYTHON_FLAKE8}" # Boolean to validate language
|
||||
VALIDATE_RAKU="${VALIDATE_RAKU}" # Boolean to validate language
|
||||
VALIDATE_RUBY="${VALIDATE_RUBY}" # Boolean to validate language
|
||||
VALIDATE_STATES="${VALIDATE_STATES}" # Boolean to validate language
|
||||
|
@ -236,9 +243,11 @@ FILE_ARRAY_MARKDOWN=() # Array of files to check
|
|||
FILE_ARRAY_OPENAPI=() # Array of files to check
|
||||
FILE_ARRAY_PERL=() # Array of files to check
|
||||
FILE_ARRAY_PHP=() # Array of files to check
|
||||
FILE_ARRAY_PHP_PHPSTAN=() # Array of files to check
|
||||
FILE_ARRAY_POWERSHELL=() # Array of files to check
|
||||
FILE_ARRAY_PROTOBUF=() # Array of files to check
|
||||
FILE_ARRAY_PYTHON=() # Array of files to check
|
||||
FILE_ARRAY_PYTHON_PYLINT=() # Array of files to check
|
||||
FILE_ARRAY_PYTHON_FLAKE8=() # Array of files to check
|
||||
FILE_ARRAY_RAKU=() # Array of files to check
|
||||
FILE_ARRAY_RUBY=() # Array of files to check
|
||||
FILE_ARRAY_STATES=() # Array of files to check
|
||||
|
@ -298,12 +307,16 @@ ERRORS_FOUND_PERL=0 # Count of errors found
|
|||
export ERRORS_FOUND_PERL # Workaround SC2034
|
||||
ERRORS_FOUND_PHP=0 # Count of errors found
|
||||
export ERRORS_FOUND_PHP # Workaround SC2034
|
||||
ERRORS_FOUND_PHP_PHPSTAN=0 # Count of errors found
|
||||
export ERRORS_FOUND_PHP_PHPSTAN # Workaround SC2034
|
||||
ERRORS_FOUND_POWERSHELL=0 # Count of errors found
|
||||
export ERRORS_FOUND_POWERSHELL # Workaround SC2034
|
||||
ERRORS_FOUND_PROTOBUF=0 # Count of errors found
|
||||
export ERRORS_FOUND_PROTOBUF # Workaround SC2034
|
||||
ERRORS_FOUND_PYTHON=0 # Count of errors found
|
||||
export ERRORS_FOUND_PYTHON # Workaround SC2034
|
||||
ERRORS_FOUND_PYTHON_PYLINT=0 # Count of errors found
|
||||
export ERRORS_FOUND_PYTHON_PYLINT # Workaround SC2034
|
||||
ERRORS_FOUND_PYTHON_FLAKE8=0 # Count of errors found
|
||||
export ERRORS_FOUND_PYTHON_FLAKE8 # Workaround SC2034
|
||||
ERRORS_FOUND_RAKU=0 # Count of errors found
|
||||
export ERRORS_FOUND_RAKU # Workaround SC2034
|
||||
ERRORS_FOUND_RUBY=0 # Count of errors found
|
||||
|
@ -964,7 +977,7 @@ Footer() {
|
|||
##################
|
||||
# Print if not 0 #
|
||||
##################
|
||||
if [ "${!ERROR_COUNTER}" -ne 0 ]; then
|
||||
if [[ "${!ERROR_COUNTER}" -ne 0 ]]; then
|
||||
# We found errors in the language
|
||||
###################
|
||||
# Print the goods #
|
||||
|
@ -978,7 +991,7 @@ Footer() {
|
|||
######################################
|
||||
# Check if we validated the langauge #
|
||||
######################################
|
||||
elif [ "${!ERROR_COUNTER}" -eq 0 ] && [[ "${UNIQUE_LINTED_ARRAY[*]}" =~ ${LANGUAGE} ]]; then
|
||||
elif [[ "${!ERROR_COUNTER}" -eq 0 ]] && [[ "${UNIQUE_LINTED_ARRAY[*]}" =~ ${LANGUAGE} ]]; then
|
||||
# No errors found when linting the language
|
||||
CallStatusAPI "${LANGUAGE}" "success"
|
||||
fi
|
||||
|
@ -1000,7 +1013,7 @@ Footer() {
|
|||
# build the variable
|
||||
ERRORS_FOUND_LANGUAGE="ERRORS_FOUND_${LANGUAGE}"
|
||||
# Check if error was found
|
||||
if [ "${!ERRORS_FOUND_LANGUAGE}" -ne 0 ]; then
|
||||
if [[ "${!ERRORS_FOUND_LANGUAGE}" -ne 0 ]]; then
|
||||
# Failed exit
|
||||
fatal "Exiting with errors found!"
|
||||
fi
|
||||
|
@ -1092,8 +1105,10 @@ GetLinterRules "LUA"
|
|||
GetLinterRules "MARKDOWN"
|
||||
# Get PowerShell rules
|
||||
GetLinterRules "POWERSHELL"
|
||||
# Get Python rules
|
||||
GetLinterRules "PYTHON"
|
||||
# Get Python pylint rules
|
||||
GetLinterRules "PYTHON_PYLINT"
|
||||
# Get Python flake8 rules
|
||||
GetLinterRules "PYTHON_FLAKE8"
|
||||
# Get Ruby rules
|
||||
GetLinterRules "RUBY"
|
||||
# Get Terraform rules
|
||||
|
@ -1480,6 +1495,17 @@ if [ "${VALIDATE_PHP}" == "true" ]; then
|
|||
LintCodebase "PHP" "php" "php -l" ".*\.\(php\)\$" "${FILE_ARRAY_PHP[@]}"
|
||||
fi
|
||||
|
||||
###################
|
||||
# PHPStan LINTING #
|
||||
###################
|
||||
if [ "${VALIDATE_PHP_PHPSTAN}" == "true" ]; then
|
||||
#######################
|
||||
# Lint the PHP files #
|
||||
#######################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY"
|
||||
LintCodebase "PHP_PHPSTAN" "phpstan" "phpstan analyse --no-progress --no-ansi -c ${PHPSTAN_LINTER_RULES}" ".*\.\(php\)\$" "${FILE_ARRAY_PHP_PHPSTAN[@]}"
|
||||
fi
|
||||
|
||||
######################
|
||||
# POWERSHELL LINTING #
|
||||
######################
|
||||
|
@ -1510,12 +1536,23 @@ fi
|
|||
##################
|
||||
# PYTHON LINTING #
|
||||
##################
|
||||
if [ "${VALIDATE_PYTHON}" == "true" ]; then
|
||||
if [ "${VALIDATE_PYTHON_PYLINT}" == "true" ]; then
|
||||
#########################
|
||||
# Lint the python files #
|
||||
#########################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY"
|
||||
LintCodebase "PYTHON" "pylint" "pylint --rcfile ${PYTHON_LINTER_RULES}" ".*\.\(py\)\$" "${FILE_ARRAY_PYTHON[@]}"
|
||||
LintCodebase "PYTHON_PYLINT" "pylint" "pylint --rcfile ${PYTHON_PYLINT_LINTER_RULES}" ".*\.\(py\)\$" "${FILE_ARRAY_PYTHON_PYLINT[@]}"
|
||||
fi
|
||||
|
||||
##################
|
||||
# PYTHON LINTING #
|
||||
##################
|
||||
if [ "${VALIDATE_PYTHON_FLAKE8}" == "true" ]; then
|
||||
#########################
|
||||
# Lint the python files #
|
||||
#########################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY"
|
||||
LintCodebase "PYTHON_FLAKE8" "flake8" "flake8 --config=${PYTHON_FLAKE8_LINTER_RULES}" ".*\.\(py\)\$" "${FILE_ARRAY_PYTHON_FLAKE8[@]}"
|
||||
fi
|
||||
|
||||
################
|
||||
|
|
|
@ -46,7 +46,6 @@ function GetValidationInfo() {
|
|||
################################
|
||||
# Convert strings to lowercase #
|
||||
################################
|
||||
|
||||
# Loop through all languages
|
||||
for LANGUAGE in "${LANGUAGE_ARRAY[@]}"; do
|
||||
# build the variable
|
||||
|
@ -55,7 +54,6 @@ function GetValidationInfo() {
|
|||
eval "${VALIDATE_LANGUAGE}=${!VALIDATE_LANGUAGE,,}"
|
||||
done
|
||||
|
||||
|
||||
################################################
|
||||
# Determine if any linters were explicitly set #
|
||||
################################################
|
||||
|
@ -71,7 +69,6 @@ function GetValidationInfo() {
|
|||
fi
|
||||
done
|
||||
|
||||
|
||||
###################################################
|
||||
# Validate if we should check individual lanuages #
|
||||
###################################################
|
||||
|
|
|
@ -596,10 +596,12 @@ function RunTestCases() {
|
|||
TestCodebase "MARKDOWN" "markdownlint" "markdownlint -c ${MARKDOWN_LINTER_RULES}" ".*\.\(md\)\$" "markdown"
|
||||
TestCodebase "PERL" "perl" "perl -Mstrict -cw" ".*\.\(pl\)\$" "perl"
|
||||
TestCodebase "PHP" "php" "php -l" ".*\.\(php\)\$" "php"
|
||||
TestCodebase "PHP_PHPSTAN" "phpstan" "phpstan analyse --no-progress --no-ansi -c ${PHPSTAN_LINTER_RULES}" ".*\.\(php\)\$" "php"
|
||||
TestCodebase "OPENAPI" "spectral" "spectral lint -r ${OPENAPI_LINTER_RULES}" ".*\.\(ymlopenapi\|jsonopenapi\)\$" "openapi"
|
||||
TestCodebase "POWERSHELL" "pwsh" "Invoke-ScriptAnalyzer -EnableExit -Settings ${POWERSHELL_LINTER_RULES} -Path" ".*\.\(ps1\|psm1\|psd1\|ps1xml\|pssc\|psrc\|cdxml\)\$" "powershell"
|
||||
TestCodebase "PROTOBUF" "protolint" "protolint lint --config_path ${PROTOBUF_LINTER_RULES}" ".*\.\(proto\)\$" "protobuf"
|
||||
TestCodebase "PYTHON" "pylint" "pylint --rcfile ${PYTHON_LINTER_RULES}" ".*\.\(py\)\$" "python"
|
||||
TestCodebase "PYTHON_PYLINT" "pylint" "pylint --rcfile ${PYTHON_PYLINT_LINTER_RULES}" ".*\.\(py\)\$" "python"
|
||||
TestCodebase "PYTHON_FLAKE8" "flake8" "flake8 --config ${PYTHON_FLAKE8_LINTER_RULES}" ".*\.\(py\)\$" "python"
|
||||
TestCodebase "RAKU" "raku" "raku -c" ".*\.\(raku\|rakumod\|rakutest\|pm6\|pl6\|p6\)\$" "raku"
|
||||
TestCodebase "RUBY" "rubocop" "rubocop -c ${RUBY_LINTER_RULES}" ".*\.\(rb\)\$" "ruby"
|
||||
TestCodebase "STATES" "asl-validator" "asl-validator --json-path" ".*\.\(json\)\$" "states"
|
||||
|
|
Loading…
Reference in a new issue