Skip to content

Commit

Permalink
Merge branch 'oxsecurity:main' into Args_Split_Improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyE123 authored Jun 2, 2024
2 parents f0524dd + 178d6a8 commit e3bf14e
Show file tree
Hide file tree
Showing 62 changed files with 115,736 additions and 64,588 deletions.
25 changes: 19 additions & 6 deletions .automation/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ def generate_flavor_documentation(flavor_id, flavor, linters_tables_md):
def dump_as_json(value: Any, empty_value: str) -> str:
if not value:
return empty_value
# Covert any value to string with JSON
# Convert any value to string with JSON
# Don't indent since markdown table supports single line only
result = json.dumps(value, indent=None, sort_keys=True)
return f"`{result}`"
Expand Down Expand Up @@ -2350,7 +2350,7 @@ def add_in_config_schema_file(variables):
json_schema["properties"] = json_schema_props
if updated is True:
with open(CONFIG_JSON_SCHEMA, "w", encoding="utf-8") as outfile:
json.dump(json_schema, outfile, indent=4, sort_keys=True)
json.dump(json_schema, outfile, indent=2, sort_keys=True)
outfile.write("\n")


Expand All @@ -2367,7 +2367,7 @@ def remove_in_config_schema_file(variables):
json_schema["properties"] = json_schema_props
if updated is True:
with open(CONFIG_JSON_SCHEMA, "w", encoding="utf-8") as outfile:
json.dump(json_schema, outfile, indent=4, sort_keys=True)
json.dump(json_schema, outfile, indent=2, sort_keys=True)
outfile.write("\n")


Expand Down Expand Up @@ -2707,7 +2707,7 @@ def generate_json_schema_enums():
with open(DESCRIPTOR_JSON_SCHEMA, "r", encoding="utf-8") as json_file:
json_schema = json.load(json_file)
json_schema["definitions"]["enum_flavors"]["enum"] = ["all_flavors"] + list(
flavors.keys()
sorted(set(list(flavors.keys())))
)
with open(DESCRIPTOR_JSON_SCHEMA, "w", encoding="utf-8") as outfile:
json.dump(json_schema, outfile, indent=2, sort_keys=True)
Expand All @@ -2724,6 +2724,14 @@ def generate_json_schema_enums():
json_schema["definitions"]["enum_linter_keys"]["enum"] = [x.name for x in linters]
# Deprecated linters
json_schema["definitions"]["enum_linter_keys"]["enum"] += DEPRECATED_LINTERS

# Sort:
json_schema["definitions"]["enum_descriptor_keys"]["enum"] = sorted(
set(json_schema["definitions"]["enum_descriptor_keys"]["enum"])
)
json_schema["definitions"]["enum_linter_keys"]["enum"] = sorted(
set(json_schema["definitions"]["enum_linter_keys"]["enum"])
)
with open(CONFIG_JSON_SCHEMA, "w", encoding="utf-8") as outfile:
json.dump(json_schema, outfile, indent=2, sort_keys=True)
outfile.write("\n")
Expand Down Expand Up @@ -3352,17 +3360,22 @@ def update_workflow_linters(file_path, linters):


if __name__ == "__main__":
logging_format = (
"[%(levelname)s] %(message)s"
if "CI" in os.environ
else "%(asctime)s [%(levelname)s] %(message)s"
)
try:
logging.basicConfig(
force=True,
level=logging.INFO,
format="%(asctime)s [%(levelname)s] %(message)s",
format=logging_format,
handlers=[logging.StreamHandler(sys.stdout)],
)
except ValueError:
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s [%(levelname)s] %(message)s",
format=logging_format,
handlers=[logging.StreamHandler(sys.stdout)],
)
config.init_config("build")
Expand Down
46 changes: 23 additions & 23 deletions .automation/generated/linter-helps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .automation/generated/linter-licenses.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"markdownlint": "MIT",
"misspell": "MIT",
"mypy": "Other",
"npm-groovy-lint": "GPL-3.0",
"npm-groovy-lint": "MIT",
"npm-package-json-lint": "MIT",
"perlcritic": "Other",
"php": "Other",
Expand Down
18 changes: 9 additions & 9 deletions .automation/generated/linter-versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"black": "24.4.2",
"cfn-lint": "0.87.4",
"checkmake": "0.2.0",
"checkov": "3.2.109",
"checkov": "3.2.122",
"checkstyle": "10.17.0",
"chktex": "1.7.8",
"clang-format": "17.0.5",
Expand All @@ -25,7 +25,7 @@
"djlint": "1.34.1",
"dockerfilelint": "1.8.0",
"dotenv-linter": "3.3.0",
"dotnet-format": "8.0.105",
"dotnet-format": "8.0.106",
"dustilock": "1.2.0",
"editorconfig-checker": "3.0.1",
"eslint": "8.57.0",
Expand Down Expand Up @@ -64,26 +64,26 @@
"php": "7.4.26",
"phpcs": "3.10.1",
"phplint": "9.3.1",
"phpstan": "1.11.2",
"phpstan": "1.11.3",
"pmd": "7.1.0",
"powershell": "7.4.2",
"powershell_formatter": "7.4.2",
"prettier": "3.2.5",
"prettier": "3.3.0",
"proselint": "0.14.0",
"protolint": "0.49.7",
"psalm": "Psalm.5.24.0@",
"puppet-lint": "4.2.4",
"pylint": "3.2.2",
"pyright": "1.1.364",
"pyright": "1.1.365",
"raku": "2020.10",
"remark-lint": "14.0.2",
"revive": "1.3.7",
"roslynator": "0.8.8.0",
"roslynator": "0.8.9.0",
"rst-lint": "1.4.0",
"rstcheck": "6.2.1",
"rstfmt": "0.0.14",
"rubocop": "1.64.0",
"ruff": "0.4.6",
"rubocop": "1.64.1",
"ruff": "0.4.7",
"scalafix": "0.12.1",
"scss-lint": "0.60.0",
"secretlint": "8.2.4",
Expand All @@ -105,7 +105,7 @@
"syft": "1.5.0",
"tekton-lint": "1.1.0",
"terraform-fmt": "1.8.4",
"terragrunt": "0.58.10",
"terragrunt": "0.58.12",
"terrascan": "1.18.11",
"tflint": "0.51.0",
"trivy": "0.51.4",
Expand Down
17 changes: 14 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,22 @@
"type": "node"
},
{
"name": "Python : CurrentFile",
"type": "python",
"name": "Python Debugger: Current File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
},
{
"name": "Python Debugger: Build MegaLinter files",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/.automation/build.py",
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"env": {
"PYTHONPATH": "${workspaceFolder}"
}
}
]
}
}
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l

- Doc
- Handle disabled_reason property in descriptors
- Sort enums in json schema, by @echoix in <https://github.com/oxsecurity/megalinter/pull/3595>

- Flavors

Expand Down Expand Up @@ -194,6 +195,16 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l
- [sfdx-scanner-apex](https://forcedotcom.github.io/sfdx-scanner/) from 3.24.0 to **3.25.0** on 2024-05-28
- [sfdx-scanner-aura](https://forcedotcom.github.io/sfdx-scanner/) from 3.24.0 to **3.25.0** on 2024-05-28
- [sfdx-scanner-lwc](https://forcedotcom.github.io/sfdx-scanner/) from 3.24.0 to **3.25.0** on 2024-05-28
- [phpstan](https://phpstan.org/) from 1.11.2 to **1.11.3** on 2024-05-31
- [pyright](https://github.com/Microsoft/pyright) from 1.1.364 to **1.1.365** on 2024-05-31
- [ruff](https://github.com/astral-sh/ruff) from 0.4.6 to **0.4.7** on 2024-05-31
- [checkov](https://www.checkov.io/) from 3.2.109 to **3.2.120** on 2024-05-31
- [rubocop](https://rubocop.org/) from 1.64.0 to **1.64.1** on 2024-05-31
- [terragrunt](https://terragrunt.gruntwork.io) from 0.58.10 to **0.58.12** on 2024-05-31
- [dotnet-format](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-format) from 8.0.105 to **8.0.106** on 2024-06-01
- [roslynator](https://github.com/dotnet/Roslynator) from 0.8.8.0 to **0.8.9.0** on 2024-06-01
- [prettier](https://prettier.io/) from 3.2.5 to **3.3.0** on 2024-06-01
- [checkov](https://www.checkov.io/) from 3.2.120 to **3.2.122** on 2024-06-01
<!-- linter-versions-end -->

## [v7.11.1] - 2024-04-23
Expand Down
Loading

0 comments on commit e3bf14e

Please sign in to comment.