diff --git a/.automation/build.py b/.automation/build.py index e35fe28fef6..a3e42b578d0 100644 --- a/.automation/build.py +++ b/.automation/build.py @@ -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}`" @@ -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") @@ -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") @@ -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) @@ -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") @@ -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") diff --git a/.automation/generated/linter-licenses.json b/.automation/generated/linter-licenses.json index 8aa7ffd170a..b655340960c 100644 --- a/.automation/generated/linter-licenses.json +++ b/.automation/generated/linter-licenses.json @@ -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", diff --git a/.vscode/launch.json b/.vscode/launch.json index f2bddac4a5c..10612c2d9d4 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -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}" + } } ] -} \ No newline at end of file +} diff --git a/CHANGELOG.md b/CHANGELOG.md index c2afe00fa1d..357ee296863 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,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 - Flavors diff --git a/docs/all_linters.md b/docs/all_linters.md index de91090a1e3..cd0402866e4 100644 --- a/docs/all_linters.md +++ b/docs/all_linters.md @@ -60,7 +60,7 @@ | [**markdown-table-formatter**](https://github.com/nvuillam/markdown-table-formatter){target=_blank} | 1.6.0 | [MIT](licenses/markdown-table-formatter.md) | [![GitHub stars](https://img.shields.io/github/stars/nvuillam/markdown-table-formatter?cacheSeconds=3600)](https://github.com/nvuillam/markdown-table-formatter){target=_blank} | [MARKDOWN](descriptors/markdown_markdown_table_formatter.md) | :white_circle: | [Repository](https://github.com/nvuillam/markdown-table-formatter){target=_blank} | | [**markdownlint**](https://github.com/DavidAnson/markdownlint){target=_blank} | 0.41.0 | [MIT](licenses/markdownlint.md) | [![GitHub stars](https://img.shields.io/github/stars/DavidAnson/markdownlint?cacheSeconds=3600)](https://github.com/DavidAnson/markdownlint){target=_blank} | [MARKDOWN](descriptors/markdown_markdownlint.md) | :white_circle: | [Repository](https://github.com/DavidAnson/markdownlint){target=_blank} | | [**mypy**](https://github.com/python/mypy){target=_blank} | 1.10.0 | [MIT](licenses/mypy.md) | [![GitHub stars](https://img.shields.io/github/stars/python/mypy?cacheSeconds=3600)](https://github.com/python/mypy){target=_blank} | [PYTHON](descriptors/python_mypy.md) | | [Repository](https://github.com/python/mypy){target=_blank} | -| [**npm-groovy-lint**](https://github.com/nvuillam/npm-groovy-lint){target=_blank} | 14.6.0 | [GPL-3.0](licenses/npm-groovy-lint.md) | [![GitHub stars](https://img.shields.io/github/stars/nvuillam/npm-groovy-lint?cacheSeconds=3600)](https://github.com/nvuillam/npm-groovy-lint){target=_blank} | [GROOVY](descriptors/groovy_npm_groovy_lint.md) | :heart: | [MegaLinter reference](https://nvuillam.github.io/npm-groovy-lint/#mega-linter){target=_blank} | +| [**npm-groovy-lint**](https://github.com/nvuillam/npm-groovy-lint){target=_blank} | 14.6.0 | [MIT](licenses/npm-groovy-lint.md) | [![GitHub stars](https://img.shields.io/github/stars/nvuillam/npm-groovy-lint?cacheSeconds=3600)](https://github.com/nvuillam/npm-groovy-lint){target=_blank} | [GROOVY](descriptors/groovy_npm_groovy_lint.md) | :heart: | [MegaLinter reference](https://nvuillam.github.io/npm-groovy-lint/#mega-linter){target=_blank} | | [**npm-package-json-lint**](https://github.com/tclindner/npm-package-json-lint){target=_blank} | 7.1.0 | [MIT](licenses/npm-package-json-lint.md) | [![GitHub stars](https://img.shields.io/github/stars/tclindner/npm-package-json-lint?cacheSeconds=3600)](https://github.com/tclindner/npm-package-json-lint){target=_blank} | [JSON](descriptors/json_npm_package_json_lint.md) | :heart: | [MegaLinter reference](https://npmpackagejsonlint.org/docs/integrations#megalinter){target=_blank} | | [**perlcritic**](https://github.com/Perl-Critic/Perl-Critic){target=_blank} | 1.152 | [Other](licenses/perlcritic.md) | [![GitHub stars](https://img.shields.io/github/stars/Perl-Critic/Perl-Critic?cacheSeconds=3600)](https://github.com/Perl-Critic/Perl-Critic){target=_blank} | [PERL](descriptors/perl_perlcritic.md) | :white_circle: | [Repository](https://github.com/Perl-Critic/Perl-Critic){target=_blank} | | [**phpcs**](https://github.com/PHPCSStandards/PHP_CodeSniffer){target=_blank} | 3.10.1 | [BSD-3-Clause](licenses/phpcs.md) | [![GitHub stars](https://img.shields.io/github/stars/PHPCSStandards/PHP_CodeSniffer?cacheSeconds=3600)](https://github.com/PHPCSStandards/PHP_CodeSniffer){target=_blank} | [PHP](descriptors/php_phpcs.md) | :white_circle: | [Repository](https://github.com/PHPCSStandards/PHP_CodeSniffer){target=_blank} | diff --git a/docs/json-schemas/configuration.html b/docs/json-schemas/configuration.html index 979388fc3e1..f43ad41a625 100644 --- a/docs/json-schemas/configuration.html +++ b/docs/json-schemas/configuration.html @@ -11,11 +11,13 @@ - Schema Docs + + + Command - Type: object
+

Command

Type: object

MegaLinter configuration file

No Additional Properties @@ -45,7 +47,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - ACTION_ACTIONLINT_ARGUMENTSType: array of string or string
+ ACTION_ACTIONLINT_ARGUMENTS

ACTION_ACTIONLINT: Custom arguments

Type: array of string or string

ACTION_ACTIONLINT: User custom arguments to add in linter CLI call

@@ -53,7 +55,7 @@

-

Each item of this array must be:

+ No Additional Items

Each item of this array must be:

@@ -80,6 +82,67 @@

Each item of this array must be:

+
+
+ + + + +
+
+
+

+ +

+
+ +
+
+ +

ACTION_ACTIONLINT: CLI Executable

Type: array of string Default: [["actionlint"]]
+ + + + + + + No Additional Items

Each item of this array must be:

+
+
+ + + Type: string
+ + + + + + +
@@ -107,7 +170,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - ACTION_ACTIONLINT_CLI_LINT_MODE

Type: enum (of string) Default: "list_of_files"
+ ACTION_ACTIONLINT_CLI_LINT_MODE

ACTION_ACTIONLINT: Override default cli lint mode

Type: enum (of string) Default: "list_of_files"

Must be one of:

  • "file"
  • "list_of_files"
  • "project"
@@ -118,6 +181,68 @@

Must be one of:

+
+
+ + +
+
+
+

+ +

+
+ +
+
+ +

ACTION_ACTIONLINT: Custom remove arguments

Type: array of string or string
+

ACTION_ACTIONLINT: User custom arguments to remove before calling linter

+
+ + + + + + No Additional Items

Each item of this array must be:

+
+ +
@@ -143,7 +268,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - ACTION_ACTIONLINT_CONFIG_FILE

Type: string Default: "actionlint.yml"
+ ACTION_ACTIONLINT_CONFIG_FILE

ACTION_ACTIONLINT: Custom config file name

Type: string Default: "actionlint.yml"

ACTION_ACTIONLINT: User custom config file name if different from default

@@ -177,8 +302,9 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - ACTION_ACTIONLINT_DIRECTORYType: string Default: ".github/workflows"
- + ACTION_ACTIONLINT_DIRECTORY

ACTION_ACTIONLINT: Directory containing ACTION files

Type: string Default: ".github/workflows"
+

Directory that must be found to activate linter. Use value "any" to always activate

+
@@ -210,7 +336,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - ACTION_ACTIONLINT_DISABLE_ERRORSType: boolean Default: false
+ ACTION_ACTIONLINT_DISABLE_ERRORS

ACTION_ACTIONLINT: Linter doesn't make MegaLinter fail even if errors are found

Type: boolean Default: false
@@ -243,7 +369,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - ACTION_ACTIONLINT_DISABLE_ERRORS_IF_LESS_THANType: number Default: 0
+ ACTION_ACTIONLINT_DISABLE_ERRORS_IF_LESS_THAN

ACTION_ACTIONLINT: Maximum number of errors allowed

Type: number Default: 0
@@ -276,14 +402,14 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - ACTION_ACTIONLINT_FILE_EXTENSIONSType: array of string
+ ACTION_ACTIONLINT_FILE_EXTENSIONS

ACTION_ACTIONLINT: Override descriptor/linter matching files extensions

Type: array of string
-

Each item of this array must be:

+ No Additional Items

Each item of this array must be:

@@ -337,14 +463,14 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - ACTION_ACTIONLINT_FILE_NAMES_REGEX

Type: array of string
+ ACTION_ACTIONLINT_FILE_NAMES_REGEX

ACTION_ACTIONLINT: Override descriptor/linter matching file name regex

Type: array of string
-

Each item of this array must be:

+ No Additional Items

Each item of this array must be:

@@ -404,7 +530,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - ACTION_ACTIONLINT_FILTER_REGEX_EXCLUDE

Type: string
+ ACTION_ACTIONLINT_FILTER_REGEX_EXCLUDE

ACTION_ACTIONLINT: Excluding Regex

Type: string
@@ -437,7 +563,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - ACTION_ACTIONLINT_FILTER_REGEX_INCLUDEType: string
+ ACTION_ACTIONLINT_FILTER_REGEX_INCLUDE

ACTION_ACTIONLINT: Including Regex

Type: string
@@ -470,14 +596,14 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - ACTION_ACTIONLINT_POST_COMMANDSType: array
+ ACTION_ACTIONLINT_POST_COMMANDS

ACTION_ACTIONLINT: Define or override a list of bash commands to run after the linter

Type: array
-

Each item of this array must be:

+ No Additional Items

Each item of this array must be:

@@ -542,7 +668,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - command

Type: string
+ command

Bash command to run

Type: string
@@ -595,7 +721,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - continue_if_failedType: boolean Default: true
+ continue_if_failed

Continue if failed

Type: boolean Default: true
@@ -642,7 +768,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - cwdType: enum (of string)
+ cwd

Folder where to run the command

Type: enum (of string)

Must be one of:

@@ -658,59 +784,6 @@

Must be one of:

"workspace"
 
-
- - - - -
-
-
-

- -

-
- -
-
- - Type: string
- - - - - - -
-
Examples:
-
"pylint"
-
-
"flake8"
-
@@ -753,14 +826,14 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - ACTION_ACTIONLINT_PRE_COMMANDS

Type: array
+ ACTION_ACTIONLINT_PRE_COMMANDS

ACTION_ACTIONLINT: Define or override a list of bash commands to run before the linter

Type: array
-

Each item of this array must be:

+ No Additional Items

Each item of this array must be:

@@ -825,7 +898,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - command

Type: string
+ command

Bash command to run

Type: string
@@ -878,7 +951,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - continue_if_failedType: boolean Default: true
+ continue_if_failed

Continue if failed

Type: boolean Default: true
@@ -925,7 +998,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - cwdType: enum (of string)
+ cwd

Folder where to run the command

Type: enum (of string)

Must be one of:

@@ -946,18 +1019,34 @@

Must be one of:

-
+
+
+
Example:
+
[
+    {
+        "command": "tflint --init",
+        "continue_if_failed": false,
+        "cwd": "workspace"
+    }
+]
+
+
+ + + + +
-
+

- +

-
+

ACTION_ACTIONLINT: Custom config file path

Type: string
+

ACTION_ACTIONLINT: Path where to find linter configuration file

+
+ + + + + + +
+
+
+
+
+
+
+

+ +

+
+ +
+
+ +

ACTION_ACTIONLINT: Unsecured env variables

Type: array of string Default: []
+

List of env variables explicitly not filtered before calling ACTION_ACTIONLINT and its pre/post commands

+
+ + + + + + No Additional Items

Each item of this array must be:

+
+ +
+
+
+
+
+
+
+
+

+ +

+
+ +
+
+ +

Excluding regex filter for ACTION descriptor

Type: string
+ + + + + + + +
+
+
+
+
+
+
+

+ +

+
+ +
+
+ +

Including regex filter for ACTION descriptor

Type: string
+ + + + + + + +
+
+
+
+
+
+
+

+ +

+
+ +
+
+ +

Post commands for ACTION descriptor

Type: array
+ + + + + + + No Additional Items

Each item of this array must be:

+
+
+ + + Type: object
+

Command information

+
+ + + + + + + + +
+
+
+

+ +

+
+ +
+
+ + Type: string
+ Command + + + + command

Bash command to run

Type: string
@@ -990,9 +1299,112 @@


Examples:
-
"pylint"
+
"npm run test"
 
-
"flake8"
+
"echo \"This is a custom command\""
+
+
+
+
+
+

+
+
+
+

+ +

+
+ +
+
+ +

Continue if failed

Type: boolean Default: true
+ + + + + + + +
+
+
+
+
+
+
+

+ +

+
+ +
+
+ +

Folder where to run the command

Type: enum (of string)
+
+

Must be one of:

+
  • "root"
  • "workspace"
+
+ + + + + +
+
Examples:
+
"root"
+
+
"workspace"
 
@@ -1002,9 +1414,9 @@


Example:
-
[
+
[
     {
-        "command": "tflint --init",
+        "command": "npm run test",
         "continue_if_failed": false,
         "cwd": "workspace"
     }
@@ -1015,18 +1427,18 @@ 

-
+
-
+

- +

-
+
Type: string
-

ACTION_ACTIONLINT: Path where to find linter configuration file

+ ACTION_PRE_COMMANDS

Pre commands for ACTION descriptor

Type: array
+ + + + + + + No Additional Items

Each item of this array must be:

+
+
+ + + Type: object
+

Command information

+ + + + + +
+
+
+

+ +

+
+ +
+
+ +

Bash command to run

Type: string
+ + + +
+
Examples:
+
"npm run test"
+
+
"echo \"This is a custom command\""
+
+
-
+
-
+

- +

-
+
Type: string
+ ACTION_PRE_COMMANDS + + + + Command + + + + continue_if_failed

Continue if failed

Type: boolean Default: true
@@ -1082,18 +1585,18 @@

-
+
-
+

- +

-
+
Type: string
- + ACTION_PRE_COMMANDS + + + + Command + + + + cwd

Folder where to run the command

Type: enum (of string)
+
+

Must be one of:

+
  • "root"
  • "workspace"
+
- +
+
Examples:
+
"root"
+
+
"workspace"
+
+
+
+
+
+
+
+

+
Example:
+
[
+    {
+        "command": "composer install",
+        "continue_if_failed": false,
+        "cwd": "workspace"
+    }
+]
+
+
@@ -1136,7 +1678,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - ADDITIONAL_EXCLUDED_DIRECTORIES

Type: array of string
+ ADDITIONAL_EXCLUDED_DIRECTORIES

Additional excluded directories

Type: array of string

List of additional excluded directory basenames to add to MegaLinter default excluded directories. They are excluded at any nested level.

@@ -1144,7 +1686,7 @@

-

Each item of this array must be:

+ No Additional Items

Each item of this array must be:

@@ -1204,7 +1746,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - ANSIBLE_ANSIBLE_LINT_ARGUMENTS

Type: array of string or string
+ ANSIBLE_ANSIBLE_LINT_ARGUMENTS

ANSIBLE_ANSIBLE_LINT: Custom arguments

Type: array of string or string

ANSIBLEANSIBLELINT: User custom arguments to add in linter CLI call

@@ -1212,7 +1754,7 @@

-

Each item of this array must be:

+ No Additional Items

Each item of this array must be:

@@ -1239,6 +1781,129 @@

Each item of this array must be:

+
+
+
+
+
+
+
+
+
+

+ +

+
+ +
+
+ +

ANSIBLE_ANSIBLE_LINT: CLI Executable

Type: array of string Default: [["ansible-lint"]]
+ + + + + + + No Additional Items

Each item of this array must be:

+
+
+ + + Type: string
+ + + + + + + +
+
+
+
+
+
+
+
+
+

+ +

+
+ +
+
+ +

ANSIBLE_ANSIBLE_LINT: Custom remove arguments

Type: array of string or string
+

ANSIBLEANSIBLELINT: User custom arguments to remove before calling linter

+
+ + + + + + No Additional Items

Each item of this array must be:

+
@@ -1266,7 +1931,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - ANSIBLE_ANSIBLE_LINT_CONFIG_FILE

Type: string Default: ".ansible-lint"
+ ANSIBLE_ANSIBLE_LINT_CONFIG_FILE

ANSIBLE_ANSIBLE_LINT: Custom config file name

Type: string Default: ".ansible-lint"

ANSIBLEANSIBLELINT: User custom config file name if different from default

@@ -1300,8 +1965,9 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - ANSIBLE_ANSIBLE_LINT_DIRECTORY

Type: string Default: "ansible"
- + ANSIBLE_ANSIBLE_LINT_DIRECTORY

ANSIBLE_ANSIBLE_LINT: Directory containing ANSIBLE files

Type: string Default: "ansible"
+

Directory that must be found to activate linter. Use value "any" to always activate

+
@@ -1333,7 +1999,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - ANSIBLE_ANSIBLE_LINT_DISABLE_ERRORS

Type: boolean Default: false
+ ANSIBLE_ANSIBLE_LINT_DISABLE_ERRORS

ANSIBLE_ANSIBLE_LINT: Linter doesn't make MegaLinter fail even if errors are found

Type: boolean Default: false
@@ -1366,7 +2032,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - ANSIBLE_ANSIBLE_LINT_DISABLE_ERRORS_IF_LESS_THAN

Type: number Default: 0
+ ANSIBLE_ANSIBLE_LINT_DISABLE_ERRORS_IF_LESS_THAN

ANSIBLE_ANSIBLE_LINT: Maximum number of errors allowed

Type: number Default: 0
@@ -1399,14 +2065,14 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - ANSIBLE_ANSIBLE_LINT_FILE_EXTENSIONS

Type: array of string
+ ANSIBLE_ANSIBLE_LINT_FILE_EXTENSIONS

ANSIBLE_ANSIBLE_LINT: Override descriptor/linter matching files extensions

Type: array of string
-

Each item of this array must be:

+ No Additional Items

Each item of this array must be:

@@ -1460,7 +2126,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - ANSIBLE_ANSIBLE_LINT_FILE_NAME

Type: string Default: ".ansible-lint.yml"
+ ANSIBLE_ANSIBLE_LINT_FILE_NAME

ANSIBLE_ANSIBLE_LINT: Custom config file name

Type: string Default: ".ansible-lint.yml"

ANSIBLEANSIBLELINT: User custom config file name if different from default

@@ -1494,14 +2160,14 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - ANSIBLE_ANSIBLE_LINT_FILE_NAMES_REGEX

Type: array of string
+ ANSIBLE_ANSIBLE_LINT_FILE_NAMES_REGEX

ANSIBLE_ANSIBLE_LINT: Override descriptor/linter matching file name regex

Type: array of string
-

Each item of this array must be:

+ No Additional Items

Each item of this array must be:

@@ -1561,14 +2227,14 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - ANSIBLE_ANSIBLE_LINT_POST_COMMANDS

Type: array
+ ANSIBLE_ANSIBLE_LINT_POST_COMMANDS

ANSIBLE_ANSIBLE_LINT: Define or override a list of bash commands to run after the linter

Type: array
-

Each item of this array must be:

+ No Additional Items

Each item of this array must be:

@@ -1633,7 +2299,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - command

Type: string
+ command

Bash command to run

Type: string
@@ -1686,7 +2352,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - continue_if_failed

Type: boolean Default: true
+ continue_if_failed

Continue if failed

Type: boolean Default: true
@@ -1733,7 +2399,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - cwd

Type: enum (of string)
+ cwd

Folder where to run the command

Type: enum (of string)

Must be one of:

  • "root"
  • "workspace"
@@ -1749,59 +2415,6 @@

Must be one of:

"workspace"
 
-
- - - - -
-
-
-

- -

-
- -
-
- - Type: string
- - - - - - -
-
Examples:
-
"pylint"
-
-
"flake8"
-
@@ -1844,14 +2457,14 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - ANSIBLE_ANSIBLE_LINT_PRE_COMMANDS

Type: array
+ ANSIBLE_ANSIBLE_LINT_PRE_COMMANDS

ANSIBLE_ANSIBLE_LINT: Define or override a list of bash commands to run before the linter

Type: array
-

Each item of this array must be:

+ No Additional Items

Each item of this array must be:

@@ -1916,7 +2529,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - command

Type: string
+ command

Bash command to run

Type: string
@@ -1969,7 +2582,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - continue_if_failedType: boolean Default: true
+ continue_if_failed

Continue if failed

Type: boolean Default: true
@@ -2016,7 +2629,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - cwdType: enum (of string)
+ cwd

Folder where to run the command

Type: enum (of string)

Must be one of:

@@ -2032,59 +2645,6 @@

Must be one of:

"workspace"
 
-
- - - - -
-
-
-

- -

-
- -
-
- - Type: string
- - - - - - -
-
Examples:
-
"pylint"
-
-
"flake8"
-
@@ -2127,7 +2687,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - ANSIBLE_ANSIBLE_LINT_RULES_PATH

Type: string
+ ANSIBLE_ANSIBLE_LINT_RULES_PATH

ANSIBLE_ANSIBLE_LINT: Custom config file path

Type: string

ANSIBLEANSIBLELINT: Path where to find linter configuration file

@@ -2140,18 +2700,18 @@

-
+
-
+

- +

-
+
Type: string Default: "ansible"
+ ANSIBLE_ANSIBLE_LINT_UNSECURED_ENV_VARIABLES

ANSIBLE_ANSIBLE_LINT: Unsecured env variables

Type: array of string Default: []
+

List of env variables explicitly not filtered before calling ANSIBLEANSIBLELINT and its pre/post commands

+
+ + + + + + No Additional Items

Each item of this array must be:

+
+
+ + + Type: string
@@ -2169,22 +2756,24 @@

+

+
-
+
-
+

- +

-
+
Type: string
+ ANSIBLE_DIRECTORY

ANSIBLE_DIRECTORY: Directory containing ANSIBLE files

Type: string Default: "ansible"
@@ -2206,18 +2795,18 @@

-
+
-
+

- +

-
+
Type: string
+ ANSIBLE_FILTER_REGEX_EXCLUDE

Excluding regex filter for ANSIBLE descriptor

Type: string
@@ -2239,18 +2828,18 @@

-
+
-
+

- +

-
+
Type: array or string Default: "none"
-

'all' to apply formatting and auto-fixes of all linters, or a list of linter keys

-
+ ANSIBLE_FILTER_REGEX_INCLUDE

Including regex filter for ANSIBLE descriptor

Type: string
+ -
-
Examples:
-
"all"
-
-
"none"
-
-
[
-    "JAVASCRIPT_ES",
-    "MARKDOWN_MARKDOWNLINT"
-]
-
-
+
-
+
-
+

- +

-
+
Type: array of string or string
-

ARMARMTTK: User custom arguments to add in linter CLI call

-
+ ANSIBLE_POST_COMMANDS

Post commands for ANSIBLE descriptor

Type: array
+ -

Each item of this array must be:

+ No Additional Items

Each item of this array must be:

-
+
Type: string
+ command_info
Type: object
+

Command information

+
+ -
-
-
-
-
-
-
+
-
+

- +

-
+
Type: enum (of string) Default: "file"
-
-

Must be one of:

-
  • "file"
  • "project"
-
- - - - - - -
-
-
-
-
-
-
-

- -

-
- -
-
- - Type: string Default: ".arm-ttk.psd1"
-

ARMARMTTK: User custom config file name if different from default

-
- - - - - - -
-
-
-
-
-
-
-

- -

-
- -
-
- - Type: boolean Default: false
+ command

Bash command to run

Type: string
- +
+
Examples:
+
"npm run test"
+
+
"echo \"This is a custom command\""
+
+
-
+
-
+

- +

-
+
Type: number Default: 0
+ ANSIBLE_POST_COMMANDS + + + + Command + + + + continue_if_failed

Continue if failed

Type: boolean Default: true
@@ -2482,18 +3019,18 @@

-
+
-
+

- +

-
+
Type: array of string
- - - - - - -

Each item of this array must be:

-
-

Folder where to run the command

Type: enum (of string)
+
+

Must be one of:

+
  • "root"
  • "workspace"
+
- -
-
+
+
Examples:
+
"root"
+
+
"workspace"
+
+
-
-
-
-

- -

- -
-
- - Type: string Default: ".arm-ttk.psd1"
-

ARMARMTTK: User custom config file name if different from default

-
- - - - - - +

+
Example:
+
[
+    {
+        "command": "npm run test",
+        "continue_if_failed": false,
+        "cwd": "workspace"
+    }
+]
+
+
-
+
-
+

- +

-
+
Type: array of string
+ ANSIBLE_PRE_COMMANDS

Pre commands for ANSIBLE descriptor

Type: array
-

Each item of this array must be:

+ No Additional Items

Each item of this array must be:

-
+
Type: string
+ command_info
Type: object
+

Command information

+
+ -
-

-
Examples:
-
"Dockerfile(-.+)?"
-
-
"Jenkinsfile"
-
-
-
-
-
-
-
+
-
+

- +

-
+
Type: string
- - - - - - - -
-
-
-
-
-
-
-

- -

-
- -
-

Bash command to run

Type: string
- +
+
Examples:
+
"npm run test"
+
+
"echo \"This is a custom command\""
+
+
-
+
-
+

- +

-
+
Type: array
- - - - - - -

Each item of this array must be:

-
-
- - - Type: object
-

Command information

-
+ continue_if_failed

Continue if failed

Type: boolean Default: true
- -
+
+
+
+
+
-
+

- +

-
+
Type: string
- + cwd

Folder where to run the command

Type: enum (of string)
+
+

Must be one of:

+
  • "root"
  • "workspace"
+
@@ -2812,27 +3296,43 @@


Examples:
-
"npm run test"
+
"root"
 
-
"echo \"This is a custom command\""
+
"workspace"
 

-
+
+

+
Example:
+
[
+    {
+        "command": "composer install",
+        "continue_if_failed": false,
+        "cwd": "workspace"
+    }
+]
+
+
+
+
+
+
+
-
+

- +

-
+

Excluding regex filter for API descriptor

Type: string
+ + + + + + + +
+
+
+
+
+
+
+

+ +

+
+ +
+
+ + Type: boolean Default: true
+ API_FILTER_REGEX_INCLUDE

Including regex filter for API descriptor

Type: string
@@ -2868,18 +3387,18 @@

-
+
-
+

- +

-
+

Post commands for API descriptor

Type: array
+ + + + + + + No Additional Items

Each item of this array must be:

+
+
+ + + Type: enum (of string)
-
-

Must be one of:

-
  • "root"
  • "workspace"
-
+ command_info
Type: object
+

Command information

+
+ + -
-
Examples:
-
"root"
-
-
"workspace"
-
-
-
-
-
-
-
+ +
-
+

- +

-
+
Type: string
+ command

Bash command to run

Type: string
@@ -2968,43 +3489,27 @@


Examples:
-
"pylint"
+
"npm run test"
 
-
"flake8"
+
"echo \"This is a custom command\""
 

-
-

-
Example:
-
[
-    {
-        "command": "npm run test",
-        "continue_if_failed": false,
-        "cwd": "workspace"
-    }
-]
-
-
-
-
-
-
-
+
-
+

- +

-
+
Type: array
- - - - - - -

Each item of this array must be:

-
-
- - - Type: object
-

Command information

-
+ continue_if_failed

Continue if failed

Type: boolean Default: true
- -
+
+
+
+
+
-
+

- +

-
+
Type: string
- + cwd

Folder where to run the command

Type: enum (of string)
+
+

Must be one of:

+
  • "root"
  • "workspace"
+
@@ -3095,27 +3592,43 @@


Examples:
-
"npm run test"
+
"root"
 
-
"echo \"This is a custom command\""
+
"workspace"
 

-
+
+

+
Example:
+
[
+    {
+        "command": "npm run test",
+        "continue_if_failed": false,
+        "cwd": "workspace"
+    }
+]
+
+
+
+
+
+
+
-
+

- +

-
+

Pre commands for API descriptor

Type: array
+ + + + + + + No Additional Items

Each item of this array must be:

+
+
+ + + Type: boolean Default: true
+ command_info
Type: object
+

Command information

+
+ -
-
-
-
-
+
-
+

- +

-
+
Type: enum (of string)
-
-

Must be one of:

-
  • "root"
  • "workspace"
-
+ command

Bash command to run

Type: string
+ @@ -3198,27 +3719,27 @@

Must be one of:


Examples:
-
"root"
+
"npm run test"
 
-
"workspace"
+
"echo \"This is a custom command\""
 
-
+
-
+

- +

-
+
Type: string
+ continue_if_failed

Continue if failed

Type: boolean Default: true
+ + + + + + + +
+
+
+
+
+
+
+

+ +

+
+
+
+ +

Folder where to run the command

Type: enum (of string)
+
+

Must be one of:

+
  • "root"
  • "workspace"
+
@@ -3251,9 +3822,9 @@


Examples:
-
"pylint"
+
"root"
 
-
"flake8"
+
"workspace"
 
@@ -3263,9 +3834,9 @@


Example:
-
[
+
[
     {
-        "command": "tflint --init",
+        "command": "composer install",
         "continue_if_failed": false,
         "cwd": "workspace"
     }
@@ -3276,18 +3847,18 @@ 

-
+
-
+

- +

-
+
Type: string
-

ARMARMTTK: Path where to find linter configuration file

+ API_SPECTRAL_ARGUMENTS

API_SPECTRAL: Custom arguments

Type: array of string or string
+

API_SPECTRAL: User custom arguments to add in linter CLI call

- -
-
-
-
-
+ No Additional Items

Each item of this array must be:

-
-

- -

-
- -
-
+
+ Type: string
+ API_SPECTRAL_ARGUMENTS + + + + API_SPECTRAL_ARGUMENTS items
Type: string
@@ -3339,22 +3903,24 @@

+

+
-
+
-
+

- +

-
+
Type: string
+ API_SPECTRAL_CLI_EXECUTABLE

API_SPECTRAL: CLI Executable

Type: array of string Default: [["spectral"]]
- -
-
-
-
-
+ No Additional Items

Each item of this array must be:

-
-

- -

-
- -
-
+
+ Type: boolean Default: true
-

Posts MegaLinter results summary in the comments of the related pull request (if existing)

-
+ API_SPECTRAL_CLI_EXECUTABLE + + + + API_SPECTRAL_CLI_EXECUTABLE items
Type: string
+ +
+
-