Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/docker/server/python-3.12-alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
nvuillam authored May 19, 2024
2 parents c1773ca + c84ddeb commit 28879fe
Show file tree
Hide file tree
Showing 387 changed files with 5,696 additions and 3,987 deletions.
30 changes: 25 additions & 5 deletions .automation/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,17 @@ def build_dockerfile(
# Add ruby apk packages if gem packages are here
if len(gem_packages) > 0:
apk_packages += ["ruby", "ruby-dev", "ruby-bundler", "ruby-rdoc"]
# Separate args used in FROM instructions from others
all_from_instructions = "\n".join(list(dict.fromkeys(docker_from)))
docker_arg_top = []
docker_arg_main = []
for docker_arg_item in docker_arg:
match = re.match(r"ARG\s+([a-zA-Z_][a-zA-Z0-9_]*)\s*=?\s*", docker_arg_item)
arg_name = match.group(1)
if arg_name in all_from_instructions:
docker_arg_top += [docker_arg_item]
else:
docker_arg_main += [docker_arg_item]
# Replace between tags in Dockerfile
# Commands
replace_in_file(
Expand All @@ -426,11 +437,17 @@ def build_dockerfile(
"#FROM__END",
"\n".join(list(dict.fromkeys(docker_from))),
)
replace_in_file(
dockerfile,
"#ARGTOP__START",
"#ARGTOP__END",
"\n".join(list(dict.fromkeys(docker_arg_top))),
)
replace_in_file(
dockerfile,
"#ARG__START",
"#ARG__END",
"\n".join(list(dict.fromkeys(docker_arg))),
"\n".join(list(dict.fromkeys(docker_arg_main))),
)
replace_in_file(
dockerfile,
Expand Down Expand Up @@ -1214,7 +1231,7 @@ def process_type(linters_by_type, type1, type_label, linters_tables_md):
else:
linter_doc_md += [f"# {linter.linter_name}\n{md_individual_extra}"]

# Indicate that a linter is disabled in this version
# Indicate that a linter is deprecated in this version
title_prefix = ""
if hasattr(linter, "deprecated") and linter.deprecated is True:
title_prefix = "(deprecated) "
Expand All @@ -1241,9 +1258,10 @@ def process_type(linters_by_type, type1, type_label, linters_tables_md):
# Indicate that a linter is disabled in this version
if hasattr(linter, "disabled") and linter.disabled is True:
linter_doc_md += [""]
linter_doc_md += [
"_This linter has been temporary disabled in this version_"
]
linter_doc_md += ["_This linter has been disabled in this version_"]
if hasattr(linter, "disabled_reason") and linter.disabled_reason is True:
linter_doc_md += [""]
linter_doc_md += [f"_Disabled reason: {linter.disabled_reason}_"]

# Linter text , if defined in YML descriptor
if hasattr(linter, "linter_text") and linter.linter_text:
Expand Down Expand Up @@ -3300,6 +3318,8 @@ def update_workflows_linters():

for descriptor in descriptors:
for linter in descriptor["linters"]:
if "disabled" in linter and linter["disabled"] is True:
continue
if "name" in linter:
name = linter["name"].lower()
else:
Expand Down
1,412 changes: 648 additions & 764 deletions .automation/generated/linter-helps.json

Large diffs are not rendered by default.

108 changes: 54 additions & 54 deletions .automation/generated/linter-versions.json
Original file line number Diff line number Diff line change
@@ -1,120 +1,120 @@
{
"actionlint": "1.6.27",
"ansible-lint": "24.2.2",
"actionlint": "1.7.0",
"ansible-lint": "24.5.0",
"arm-ttk": "0.0.0",
"bandit": "1.7.8",
"bash-exec": "5.2.21",
"bicep_linter": "0.26.170",
"black": "24.4.0",
"cfn-lint": "0.86.3",
"bicep_linter": "0.27.1",
"black": "24.4.2",
"cfn-lint": "0.87.3",
"checkmake": "0.2.0",
"checkov": "3.2.70",
"checkstyle": "10.15.0",
"checkov": "3.2.95",
"checkstyle": "10.16.0",
"chktex": "1.7.8",
"clang-format": "17.0.5",
"clippy": "0.1.77",
"clippy": "0.1.78",
"clj-kondo": "2024.03.13",
"cljstyle": "0.15.0",
"coffeelint": "5.2.11",
"cpplint": "1.6.1",
"csharpier": "0.28.1",
"cspell": "8.7.0",
"csharpier": "0.28.2",
"cspell": "8.8.1",
"dartanalyzer": "0.0.0",
"detekt": "1.23.5",
"devskim": "1.0.33",
"djlint": "1.34.1",
"dockerfilelint": "1.8.0",
"dotenv-linter": "3.3.0",
"dotnet-format": "8.0.104",
"dotnet-format": "8.0.105",
"dustilock": "1.2.0",
"editorconfig-checker": "2.7.2",
"editorconfig-checker": "3.0.1",
"eslint": "8.57.0",
"eslint-plugin-jsonc": "2.15.1",
"flake8": "7.0.0",
"gherkin-lint": "0.0.0",
"git_diff": "2.43.0",
"git_diff": "2.43.4",
"gitleaks": "8.18.2",
"golangci-lint": "1.57.2",
"golangci-lint": "1.58.1",
"goodcheck": "3.1.0",
"graphql-schema-linter": "3.0.1",
"grype": "0.76.0",
"grype": "0.77.4",
"hadolint": "2.12.0",
"helm": "3.14.2",
"htmlhint": "1.1.4",
"isort": "5.13.2",
"jscpd": "3.5.10",
"jsonlint": "14.0.3",
"kics": "1.7.13",
"kics": "2.0.1",
"ktlint": "1.2.1",
"kubeconform": "0.6.4",
"kubeconform": "0.6.6",
"kubescape": "2.9.0",
"kubeval": "0.16.1",
"lightning-flow-scanner": "2.22.0",
"lightning-flow-scanner": "2.25.0",
"lintr": "0.0.0",
"luacheck": "1.1.2",
"lychee": "0.14.3",
"lychee": "0.15.1",
"markdown-link-check": "3.12.1",
"markdown-table-formatter": "1.5.0",
"markdownlint": "0.39.0",
"markdown-table-formatter": "1.6.0",
"markdownlint": "0.40.0",
"misspell": "0.3.4",
"mypy": "1.9.0",
"npm-groovy-lint": "14.4.1",
"mypy": "1.10.0",
"npm-groovy-lint": "14.6.0",
"npm-package-json-lint": "7.1.0",
"perlcritic": "1.152",
"php": "7.4.26",
"phpcs": "3.9.1",
"phplint": "9.1.2",
"phpstan": "1.10.67",
"pmd": "6.55.0",
"powershell": "7.4.1",
"powershell_formatter": "7.4.1",
"phpcs": "3.9.2",
"phplint": "9.3.1",
"phpstan": "1.11.1",
"pmd": "7.1.0",
"powershell": "7.4.2",
"powershell_formatter": "7.4.2",
"prettier": "3.2.5",
"proselint": "0.13.0",
"protolint": "0.49.6",
"psalm": "Psalm.5.23.1@",
"protolint": "0.49.7",
"psalm": "Psalm.5.24.0@",
"puppet-lint": "4.2.4",
"pylint": "3.1.0",
"pyright": "1.1.359",
"pylint": "3.2.1",
"pyright": "1.1.363",
"raku": "2020.10",
"remark-lint": "14.0.2",
"revive": "1.3.7",
"roslynator": "0.8.6.0",
"roslynator": "0.8.8.0",
"rst-lint": "1.4.0",
"rstcheck": "6.2.1",
"rstfmt": "0.0.14",
"rubocop": "1.63.2",
"ruff": "0.3.7",
"scalafix": "0.12.0",
"rubocop": "1.63.5",
"ruff": "0.4.4",
"scalafix": "0.12.1",
"scss-lint": "0.60.0",
"secretlint": "8.2.3",
"secretlint": "8.2.4",
"semgrep": "3.12",
"sfdx-scanner": "2.8.0",
"sfdx-scanner-apex": "3.23.0",
"sfdx-scanner-aura": "3.23.0",
"sfdx-scanner-lwc": "3.23.0",
"sfdx-scanner-apex": "3.24.0",
"sfdx-scanner-aura": "3.24.0",
"sfdx-scanner-lwc": "3.24.0",
"shellcheck": "0.10.0",
"shfmt": "3.8.0",
"snakefmt": "0.10.1",
"snakemake": "8.10.7",
"snakefmt": "0.10.2",
"snakemake": "8.11.6",
"spectral": "6.11.1",
"sql-lint": "1.0.0",
"sqlfluff": "3.0.4",
"sqlfluff": "3.0.6",
"standard": "17.1.0",
"stylelint": "16.3.1",
"stylelint": "16.5.0",
"swiftlint": "0.54.0",
"syft": "1.2.0",
"syft": "1.4.1",
"tekton-lint": "1.0.2",
"terraform-fmt": "1.8.0",
"terragrunt": "0.57.0",
"terraform-fmt": "1.8.3",
"terragrunt": "0.58.5",
"terrascan": "1.18.11",
"tflint": "0.50.3",
"trivy": "0.50.1",
"trivy-sbom": "0.50.1",
"trufflehog": "3.73.0",
"tflint": "0.51.0",
"trivy": "0.51.1",
"trivy-sbom": "0.51.1",
"trufflehog": "3.76.3",
"ts-standard": "12.0.2",
"tsqllint": "1.15.3.0",
"v8r": "3.0.0",
"vale": "3.4.0",
"xmllint": "21107",
"vale": "3.4.2",
"xmllint": "21108",
"yamllint": "1.35.1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
steps:
- run: echo "Checking commit '${{ github.event.head_commit.message }}'"
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node_version: 16.x
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ matrix.platform }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
run: echo "Checking commit '$COMMIT_MESSAGE'"
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: 18.x
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ matrix.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down
1 change: 1 addition & 0 deletions .automation/test/api/api_bad_1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
openapi: '3.0.0'
3 changes: 3 additions & 0 deletions .automation/test/api/api_bad_2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"openapi": "3.0.0"
}
13 changes: 13 additions & 0 deletions .automation/test/api/api_good_1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
openapi: 3.0.0
info:
title: Example
version: "1.0"
contact:
name: Justin Kalland
email: [email protected]
description: Test for mega-linter
servers:
- url: "http://localhost:3000"
paths: {}
tags:
- name: example
23 changes: 23 additions & 0 deletions .automation/test/api/api_good_2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"openapi": "3.0.0",
"info": {
"title": "Example",
"version": "1.0",
"contact": {
"name": "Justin Kalland",
"email": "[email protected]"
},
"description": "Test for mega-linter"
},
"servers": [
{
"url": "http://localhost:3000"
}
],
"paths": {},
"tags": [
{
"name": "example"
}
]
}
28 changes: 28 additions & 0 deletions .automation/test/api/reports/ERROR-API_SPECTRAL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Results of spectral linter (version 5.6.0)
See documentation on https://megalinter.io/descriptors/openapi_spectral/
-----------------------------------------------

[ERROR] .automation/test/api/api_bad_1.yml
OpenAPI 3.x detected

.automation/test/api/api_bad_1.yml
1:1 warning info-contact Info object should contain `contact` object.
1:1 warning info-description OpenAPI object info `description` must be present and non-empty string.
1:1 warning oas3-api-servers OpenAPI `servers` must be present and non-empty array.
1:1 error oas3-schema Object should have required property `info`.
1:1 warning openapi-tags OpenAPI object should have non-empty `tags` array.

✖ 5 problems (1 error, 4 warnings, 0 infos, 0 hints)

[ERROR] .automation/test/api/api_bad_2.json
OpenAPI 3.x detected

.automation/test/api/api_bad_2.json
1:1 warning info-contact Info object should contain `contact` object.
1:1 warning info-description OpenAPI object info `description` must be present and non-empty string.
1:1 warning oas3-api-servers OpenAPI `servers` must be present and non-empty array.
1:1 error oas3-schema Object should have required property `info`.
1:1 warning openapi-tags OpenAPI object should have non-empty `tags` array.

✖ 5 problems (1 error, 4 warnings, 0 infos, 0 hints)

12 changes: 12 additions & 0 deletions .automation/test/api/reports/SUCCESS-API_SPECTRAL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Results of spectral linter (version 5.6.0)
See documentation on https://megalinter.io/descriptors/api_spectral/
-----------------------------------------------

[SUCCESS] .automation/test/api/api_good_1.yml
OpenAPI 3.x detected
No results with a severity of 'error' or higher found!

[SUCCESS] .automation/test/api/api_good_2.json
OpenAPI 3.x detected
No results with a severity of 'error' or higher found!

12 changes: 12 additions & 0 deletions .automation/test/api/reports/expected-API.tap
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
TAP version 13
1..4
not ok 1 - api_bad_1.yml
---
message: OpenAPI 3.x detected\n\n/tmp/lint/.automation/test/api/api_bad_1.ymlopenapi\n 1 1 warning info-contact Info object should contain `contact` object.\n 1 1 warning info-description OpenAPI object info `description` must be present and non-empty string.\n 1 1 warning oas3-api-servers OpenAPI `servers` must be present and non-empty array.\n 1 1 error oas3-schema Object should have required property `info`.\n 1 1 warning openapi-tags OpenAPI object should have non-empty `tags` array.\n\n✖ 5 problems (1 error, 4 warnings, 0 infos, 0 hints)\n
...
not ok 2 - api_bad_2.json
---
message: OpenAPI 3.x detected\n\n/tmp/lint/.automation/test/api/api_bad_2.jsonopenapi\n 1 1 warning info-contact Info object should contain `contact` object.\n 1 1 warning info-description OpenAPI object info `description` must be present and non-empty string.\n 1 1 warning oas3-api-servers OpenAPI `servers` must be present and non-empty array.\n 1 1 error oas3-schema Object should have required property `info`.\n 1 1 warning openapi-tags OpenAPI object should have non-empty `tags` array.\n\n✖ 5 problems (1 error, 4 warnings, 0 infos, 0 hints)\n
...
ok 3 - api_good_1.yml
ok 4 - api_good_2.json
4 changes: 2 additions & 2 deletions .automation/test/arm/arm_good_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{
"name": "[variables('Network.Name')]",
"type": "Microsoft.Network/virtualNetworks",
"apiVersion": "2022-05-01",
"apiVersion": "2023-04-01",
"location": "[variables('Network.Location')]",
"tags": "[variables('Network.Tags')]",
"properties": {
Expand All @@ -47,7 +47,7 @@
"outputs": {
"state": {
"type": "object",
"value": "[reference(resourceId('Microsoft.Network/virtualNetworks',variables('Network.Name')), '2022-05-01', 'Full')]"
"value": "[reference(resourceId('Microsoft.Network/virtualNetworks',variables('Network.Name')), '2023-04-01', 'Full')]"
}
}
}
3 changes: 3 additions & 0 deletions .automation/test/golang/bad/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module megalinter.io/test-bad

go 1.21
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions .automation/test/golang/fix/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module megalinter.io/test-fix

go 1.21
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions .automation/test/golang/good/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module megalinter.io/test-good

go 1.21
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 28879fe

Please sign in to comment.