diff --git a/.automation/build.py b/.automation/build.py index e78025dbfb3..a09e41ba437 100644 --- a/.automation/build.py +++ b/.automation/build.py @@ -721,7 +721,7 @@ def generate_documentation(): + "code**, **IAC**, **configuration**, and **scripts** in your repository " + "sources, to **ensure all your projects " + "sources are clean and formatted** whatever IDE/toolbox is used by " - + "their developers, powered by [**OX security**](https://www.ox.security/?ref=megalinter).\n\n" + + "their developers, powered by [**OX Security**](https://www.ox.security/?ref=megalinter).\n\n" + f"Supporting [**{len(linters_by_type['language'])}** languages]" + "(#languages), " + f"[**{len(linters_by_type['format'])}** formats](#formats), " @@ -767,7 +767,16 @@ def generate_documentation(): def generate_descriptor_documentation(descriptor): descriptor_file = f"{descriptor.get('descriptor_id').lower()}.yml" descriptor_url = f"{URL_ROOT}/megalinter/descriptors/{descriptor_file}" + linter_names = [ + linter.get("linter_name") for linter in descriptor.get("linters", []) + ] + is_are = "is" if len(linter_names) == 1 else "are" descriptor_md = [ + "---", + f"title: {descriptor.get('descriptor_id')} linters in MegaLinter", + f"description: {', '.join(linter_names)} {is_are} available to analyze " + f"{descriptor.get('descriptor_id')} files in MegaLinter", + "---", "", f"", f"", @@ -872,6 +881,11 @@ def generate_flavor_documentation(flavor_id, flavor, linters_tables_md): f"![Docker Pulls]({BASE_SHIELD_COUNT_LINK}/" f"{ML_DOCKER_IMAGE}-{flavor_id})" ) flavor_doc_md = [ + "---", + f"title: {flavor_id} flavor in MegaLinter", + f"description: {flavor_id} flavor is an optimized MegaLinter with " + f"only linters related to {flavor_id} projects", + "---", f"# {flavor_id} MegaLinter Flavor", "", docker_image_badge, @@ -940,12 +954,9 @@ def process_type(linters_by_type, type1, type_label, linters_tables_md): "| :---: | ----------------- | -------------- | ------------ | :-----: |", ] descriptor_linters = linters_by_type[type1] - prev_lang = "" for linter in descriptor_linters: lang_lower, linter_name_lower, descriptor_label = get_linter_base_info(linter) - if prev_lang != linter.descriptor_id and os.path.isfile( - REPO_ICONS + "/" + linter.descriptor_id.lower() + ".ico" - ): + if os.path.isfile(REPO_ICONS + "/" + linter.descriptor_id.lower() + ".ico"): icon_html = icon( f"{DOCS_URL_RAW_ROOT}/assets/icons/{linter.descriptor_id.lower()}.ico", "", @@ -953,9 +964,7 @@ def process_type(linters_by_type, type1, type_label, linters_tables_md): descriptor_label, 32, ) - elif prev_lang != linter.descriptor_id and os.path.isfile( - REPO_ICONS + "/default.ico" - ): + elif os.path.isfile(REPO_ICONS + "/default.ico"): icon_html = icon( f"{DOCS_URL_RAW_ROOT}/assets/icons/default.ico", "", @@ -966,12 +975,7 @@ def process_type(linters_by_type, type1, type_label, linters_tables_md): else: icon_html = "" descriptor_url = doc_url(f"{DOCS_URL_DESCRIPTORS_ROOT}/{lang_lower}.md") - descriptor_id_cell = ( - f"[{descriptor_label}]({descriptor_url})" - if prev_lang != linter.descriptor_id - else "" - ) - prev_lang = linter.descriptor_id + descriptor_id_cell = f"[{descriptor_label}]({descriptor_url})" # Build extra badges md_extras = [] repo = get_github_repo(linter) @@ -1001,6 +1005,12 @@ def process_type(linters_by_type, type1, type_label, linters_tables_md): # Build individual linter doc linter_doc_md = [ + "---", + f"title: {linter.linter_name} configuration in MegaLinter", + f"description: How to use {linter.linter_name} (configure, " + "ignore files, ignore errors, help & version documentations)" + f" to analyze {linter.descriptor_id} files", + "---", "", f"", ] @@ -1044,6 +1054,28 @@ def process_type(linters_by_type, type1, type_label, linters_tables_md): else: linter_doc_md += [f"# {linter.linter_name} {badge}"] + # Indicate that a linter is disabled in this version + if hasattr(linter, "deprecated") and linter.deprecated is True: + linter_doc_md += [""] + linter_doc_md += ["> This linter has been deprecated.", ">"] + + if ( + hasattr(linter, "deprecated_description") + and linter.deprecated_description + ): + linter_doc_md += [ + "> ".join( + ("> " + linter.deprecated_description.lstrip()).splitlines(True) + ), + ">", + ] + + linter_doc_md += [ + f"> You should disable {linter.linter_name} by adding it in DISABLE_LINTERS property.", + ">", + "> It will be maintained at least until the next major release.", + ] + # Indicate that a linter is disabled in this version if hasattr(linter, "disabled") and linter.disabled is True: linter_doc_md += [""] @@ -1224,12 +1256,25 @@ def process_type(linters_by_type, type1, type_label, linters_tables_md): ) # cli_lint_mode can be overridden by user config if the descriptor cli_lint_mode is not "project" if linter.cli_lint_mode != "project": - linter_doc_md += [ + cli_lint_mode_doc_md = ( f"| {linter.name}_CLI_LINT_MODE | Override default CLI lint mode
" - f"- `file`: Calls the linter for each file
" - "- `list_of_files`: Call the linter with the list of files as argument
" - f"- `project`: Call the linter from the root of the project | `{linter.cli_lint_mode}` |" - ] + ) + cli_lint_mode_doc_md += "- `file`: Calls the linter for each file
" + + if linter.cli_lint_mode == "file": + enum = ["file", "project"] + else: + enum = ["file", "list_of_files", "project"] + + cli_lint_mode_doc_md += "- `list_of_files`: Call the linter with the list of files as argument
" + + cli_lint_mode_doc_md += ( + "- `project`: Call the linter from the root of the project" + ) + cli_lint_mode_doc_md += f" | `{linter.cli_lint_mode}` |" + + linter_doc_md += [cli_lint_mode_doc_md] + add_in_config_schema_file( [ [ @@ -1239,7 +1284,7 @@ def process_type(linters_by_type, type1, type_label, linters_tables_md): "type": "string", "title": f"{linter.name}: Override default cli lint mode", "default": linter.cli_lint_mode, - "enum": ["file", "list_of_files", "project"], + "enum": enum, }, ] ] @@ -1963,13 +2008,43 @@ def replace_in_file(file_path, start, end, content, add_new_line=True): # Read in the file with open(file_path, "r", encoding="utf-8") as file: file_content = file.read() + # Detect markdown headers if in replacement + header_content = None + header_matches = re.findall( + r"", content, re.MULTILINE | re.DOTALL + ) + if header_matches and len(header_matches) > 0: + # Get text between markdown-headers tag + header_content = header_matches[0] + content = re.sub( + r"", "", content, 1, re.MULTILINE | re.DOTALL + )[1:] # Replace the target string if add_new_line is True: replacement = f"{start}\n{content}\n{end}" else: replacement = f"{start}{content}{end}" regex = rf"{start}([\s\S]*?){end}" - file_content = re.sub(regex, replacement, file_content, re.DOTALL) + file_content = re.sub(regex, replacement, file_content, 1, re.DOTALL) + # Add / replace header if necessary + if header_content is not None: + existing_header_matches = re.findall( + r"---\n(.*)\n---", file_content, re.MULTILINE | re.DOTALL + ) + if ( + existing_header_matches + and len(existing_header_matches) > 0 + and file_content.startswith("---") + ): + file_content = re.sub( + r"---\n.*?\n---", + header_content, + file_content, + 1, + re.MULTILINE | re.DOTALL, + ) + else: + file_content = header_content + "\n" + file_content # Write the file out again with open(file_path, "w", encoding="utf-8") as file: file.write(file_content) @@ -2040,7 +2115,7 @@ def move_to_file(file_path, start, end, target_file, keep_in_source=False): else: bracket_content = "" if keep_in_source is False: - file_content = re.sub(regex, replacement, file_content, re.DOTALL) + file_content = re.sub(regex, replacement, file_content, 1, re.DOTALL) # Write the file out again with open(file_path, "w", encoding="utf-8") as file: file.write(file_content) @@ -2192,10 +2267,10 @@ def finalize_doc_build(): "", "", """![GitHub release](https://img.shields.io/github/v/release/oxsecurity/megalinter?sort=semver&color=%23FD80CD) -[![Docker Pulls](https://img.shields.io/badge/docker%20pulls-3.7M-blue?color=%23FD80CD)](https://megalinter.github.io/flavors/) +[![Docker Pulls](https://img.shields.io/badge/docker%20pulls-3.8M-blue?color=%23FD80CD)](https://megalinter.github.io/flavors/) [![Downloads/week](https://img.shields.io/npm/dw/mega-linter-runner.svg?color=%23FD80CD)](https://npmjs.org/package/mega-linter-runner) [![GitHub stars](https://img.shields.io/github/stars/oxsecurity/megalinter?cacheSeconds=3600&color=%23FD80CD)](https://github.com/oxsecurity/megalinter/stargazers/) -[![Dependents](https://img.shields.io/static/v1?label=Used%20by&message=1690&color=informational&logo=slickpic)](https://github.com/oxsecurity/megalinter/network/dependents) +[![Dependents](https://img.shields.io/static/v1?label=Used%20by&message=1690&color=%23FD80CD&logo=slickpic)](https://github.com/oxsecurity/megalinter/network/dependents) [![GitHub contributors](https://img.shields.io/github/contributors/oxsecurity/megalinter.svg?color=%23FD80CD)](https://github.com/oxsecurity/megalinter/graphs/contributors/) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square&color=%23FD80CD)](http://makeapullrequest.com)""", # noqa: E501 ) @@ -2881,6 +2956,7 @@ def update_dependents_info(): generate_linter_dockerfiles() generate_linter_test_classes() if UPDATE_DOC is True: + logging.info("Running documentation generators...") refresh_users_info() generate_documentation() generate_documentation_all_linters() diff --git a/.automation/generated/flavors-stats.json b/.automation/generated/flavors-stats.json index 8f11882e7f0..aa7f21eaafe 100644 --- a/.automation/generated/flavors-stats.json +++ b/.automation/generated/flavors-stats.json @@ -1131,6 +1131,70 @@ [ "2022-12-07T07:19:55", 2692901 + ], + [ + "2022-12-18T20:23:59", + 2706567 + ], + [ + "2022-12-19T18:26:59", + 2707791 + ], + [ + "2022-12-20T16:08:58", + 2708889 + ], + [ + "2022-12-21T23:23:24", + 2711127 + ], + [ + "2022-12-22T22:59:06", + 2712487 + ], + [ + "2022-12-24T20:01:35", + 2714076 + ], + [ + "2022-12-25T21:13:52", + 2714989 + ], + [ + "2022-12-26T19:56:00", + 2715746 + ], + [ + "2022-12-27T23:56:39", + 2716726 + ], + [ + "2022-12-29T20:55:31", + 2718615 + ], + [ + "2022-12-30T20:56:36", + 2719494 + ], + [ + "2022-12-31T08:10:29", + 2719726 + ], + [ + "2023-01-01T23:58:03", + 2720646 + ], + [ + "2023-01-02T23:32:43", + 2721546 + ], + [ + "2023-01-04T17:53:34", + 2724190 + ], + [ + "2023-01-05T19:18:33", + 2725601 ] ], "ci_light": [ @@ -2265,6 +2329,70 @@ [ "2022-12-07T07:19:55", 36335 + ], + [ + "2022-12-18T20:23:59", + 38358 + ], + [ + "2022-12-19T18:26:59", + 38629 + ], + [ + "2022-12-20T16:08:58", + 38875 + ], + [ + "2022-12-21T23:23:24", + 39181 + ], + [ + "2022-12-22T22:59:06", + 39425 + ], + [ + "2022-12-24T20:01:35", + 39674 + ], + [ + "2022-12-25T21:13:52", + 39700 + ], + [ + "2022-12-26T19:56:00", + 39839 + ], + [ + "2022-12-27T23:56:39", + 40047 + ], + [ + "2022-12-29T20:55:31", + 40459 + ], + [ + "2022-12-30T20:56:36", + 40563 + ], + [ + "2022-12-31T08:10:29", + 40599 + ], + [ + "2023-01-01T23:58:03", + 40655 + ], + [ + "2023-01-02T23:32:43", + 40824 + ], + [ + "2023-01-04T17:53:34", + 41260 + ], + [ + "2023-01-05T19:18:33", + 41583 ] ], "cupcake": [ @@ -2379,6 +2507,70 @@ [ "2022-12-07T07:19:55", 559 + ], + [ + "2022-12-18T20:23:59", + 906 + ], + [ + "2022-12-19T18:26:59", + 926 + ], + [ + "2022-12-20T16:08:58", + 945 + ], + [ + "2022-12-21T23:23:24", + 1155 + ], + [ + "2022-12-22T22:59:06", + 1204 + ], + [ + "2022-12-24T20:01:35", + 1225 + ], + [ + "2022-12-25T21:13:52", + 1225 + ], + [ + "2022-12-26T19:30:31", + 1228 + ], + [ + "2022-12-27T23:56:39", + 1244 + ], + [ + "2022-12-29T20:55:31", + 1286 + ], + [ + "2022-12-30T20:56:36", + 1302 + ], + [ + "2022-12-31T08:10:29", + 1303 + ], + [ + "2023-01-01T23:58:03", + 1304 + ], + [ + "2023-01-02T23:32:43", + 1313 + ], + [ + "2023-01-04T17:53:34", + 1353 + ], + [ + "2023-01-05T19:18:33", + 1377 ] ], "dart": [ @@ -4423,6 +4615,70 @@ [ "2022-12-07T07:19:55", 93754 + ], + [ + "2022-12-18T20:23:59", + 96858 + ], + [ + "2022-12-19T18:26:59", + 97082 + ], + [ + "2022-12-20T16:08:58", + 97258 + ], + [ + "2022-12-21T23:23:24", + 97555 + ], + [ + "2022-12-22T22:59:06", + 97790 + ], + [ + "2022-12-24T20:01:35", + 98101 + ], + [ + "2022-12-25T21:13:52", + 98252 + ], + [ + "2022-12-26T19:56:00", + 98392 + ], + [ + "2022-12-27T23:56:39", + 98568 + ], + [ + "2022-12-29T20:55:31", + 98941 + ], + [ + "2022-12-30T20:56:36", + 99113 + ], + [ + "2022-12-31T08:10:29", + 99178 + ], + [ + "2023-01-01T23:58:03", + 99497 + ], + [ + "2023-01-02T23:32:43", + 99760 + ], + [ + "2023-01-04T17:53:34", + 100332 + ], + [ + "2023-01-05T19:18:33", + 100628 ] ], "dotnet": [ @@ -5557,6 +5813,70 @@ [ "2022-12-07T07:19:55", 328159 + ], + [ + "2022-12-18T20:23:59", + 332613 + ], + [ + "2022-12-19T18:26:59", + 332974 + ], + [ + "2022-12-20T16:08:58", + 333267 + ], + [ + "2022-12-21T23:23:24", + 333886 + ], + [ + "2022-12-22T22:59:06", + 334190 + ], + [ + "2022-12-24T20:01:35", + 334463 + ], + [ + "2022-12-25T21:13:52", + 334507 + ], + [ + "2022-12-26T19:56:00", + 334588 + ], + [ + "2022-12-27T23:56:39", + 334910 + ], + [ + "2022-12-29T20:55:31", + 335266 + ], + [ + "2022-12-30T20:56:36", + 335538 + ], + [ + "2022-12-31T08:10:29", + 335631 + ], + [ + "2023-01-01T23:58:03", + 335719 + ], + [ + "2023-01-02T23:32:43", + 335910 + ], + [ + "2023-01-04T17:53:34", + 336690 + ], + [ + "2023-01-05T19:18:33", + 337051 ] ], "go": [ @@ -6691,6 +7011,70 @@ [ "2022-12-07T07:19:55", 15465 + ], + [ + "2022-12-18T20:23:59", + 15667 + ], + [ + "2022-12-19T18:26:59", + 15740 + ], + [ + "2022-12-20T16:08:58", + 15755 + ], + [ + "2022-12-21T23:23:24", + 15791 + ], + [ + "2022-12-22T22:59:06", + 15815 + ], + [ + "2022-12-24T20:01:35", + 15827 + ], + [ + "2022-12-25T21:13:52", + 15835 + ], + [ + "2022-12-26T19:30:31", + 15864 + ], + [ + "2022-12-27T23:56:39", + 15875 + ], + [ + "2022-12-29T20:55:31", + 15884 + ], + [ + "2022-12-30T20:56:36", + 15885 + ], + [ + "2022-12-31T08:10:29", + 15885 + ], + [ + "2023-01-01T23:58:03", + 15887 + ], + [ + "2023-01-02T23:32:43", + 15907 + ], + [ + "2023-01-04T17:53:34", + 15931 + ], + [ + "2023-01-05T19:18:33", + 15943 ] ], "java": [ @@ -7825,6 +8209,70 @@ [ "2022-12-07T07:19:55", 102236 + ], + [ + "2022-12-18T20:23:59", + 103317 + ], + [ + "2022-12-19T18:26:59", + 103409 + ], + [ + "2022-12-20T16:08:58", + 103521 + ], + [ + "2022-12-21T23:23:24", + 103702 + ], + [ + "2022-12-22T22:59:06", + 103812 + ], + [ + "2022-12-24T20:01:35", + 103911 + ], + [ + "2022-12-25T21:13:52", + 103944 + ], + [ + "2022-12-26T19:56:00", + 103996 + ], + [ + "2022-12-27T23:56:39", + 104061 + ], + [ + "2022-12-29T20:55:31", + 104201 + ], + [ + "2022-12-30T20:56:36", + 104253 + ], + [ + "2022-12-31T08:10:29", + 104269 + ], + [ + "2023-01-01T23:58:03", + 104318 + ], + [ + "2023-01-02T23:32:43", + 104357 + ], + [ + "2023-01-04T17:53:34", + 104568 + ], + [ + "2023-01-05T19:18:33", + 104692 ] ], "javascript": [ @@ -8959,6 +9407,70 @@ [ "2022-12-07T07:19:55", 173593 + ], + [ + "2022-12-18T20:23:59", + 177426 + ], + [ + "2022-12-19T18:26:59", + 178143 + ], + [ + "2022-12-20T16:08:58", + 178474 + ], + [ + "2022-12-21T23:23:24", + 178906 + ], + [ + "2022-12-22T22:59:06", + 179209 + ], + [ + "2022-12-24T20:01:35", + 179656 + ], + [ + "2022-12-25T21:13:52", + 179790 + ], + [ + "2022-12-26T19:56:00", + 179998 + ], + [ + "2022-12-27T23:56:39", + 180350 + ], + [ + "2022-12-29T20:55:31", + 180757 + ], + [ + "2022-12-30T20:56:36", + 180908 + ], + [ + "2022-12-31T08:10:29", + 180974 + ], + [ + "2023-01-01T23:58:03", + 181416 + ], + [ + "2023-01-02T23:32:43", + 181806 + ], + [ + "2023-01-04T17:53:34", + 182648 + ], + [ + "2023-01-05T19:18:33", + 183151 ] ], "php": [ @@ -10043,56 +10555,120 @@ 26913 ], [ - "2022-11-08T01:06:52", - 26964 + "2022-11-08T01:06:52", + 26964 + ], + [ + "2022-11-11T17:10:50", + 27435 + ], + [ + "2022-11-13T20:58:24", + 27613 + ], + [ + "2022-11-14T23:48:23", + 0 + ], + [ + "2022-11-15T07:38:22", + 27870 + ], + [ + "2022-11-17T09:11:40", + 28473 + ], + [ + "2022-11-19T22:14:34", + 28858 + ], + [ + "2022-11-21T23:47:48", + 29106 + ], + [ + "2022-11-22T01:14:59", + 29117 + ], + [ + "2022-11-23T23:28:30", + 29307 + ], + [ + "2022-11-26T01:00:47", + 29407 + ], + [ + "2022-11-28T01:02:53", + 29424 + ], + [ + "2022-12-07T07:19:55", + 30367 + ], + [ + "2022-12-18T20:23:59", + 32057 + ], + [ + "2022-12-19T18:26:59", + 32350 + ], + [ + "2022-12-20T16:08:58", + 32526 + ], + [ + "2022-12-21T23:23:24", + 32765 ], [ - "2022-11-11T17:10:50", - 27435 + "2022-12-22T22:59:06", + 32907 ], [ - "2022-11-13T20:58:24", - 27613 + "2022-12-24T20:01:35", + 32943 ], [ - "2022-11-14T23:48:23", - 0 + "2022-12-25T21:13:52", + 33040 ], [ - "2022-11-15T07:38:22", - 27870 + "2022-12-26T19:30:31", + 33337 ], [ - "2022-11-17T09:11:40", - 28473 + "2022-12-27T23:56:39", + 33479 ], [ - "2022-11-19T22:14:34", - 28858 + "2022-12-29T20:55:31", + 33705 ], [ - "2022-11-21T23:47:48", - 29106 + "2022-12-30T20:56:36", + 33756 ], [ - "2022-11-22T01:14:59", - 29117 + "2022-12-31T08:10:29", + 33760 ], [ - "2022-11-23T23:28:30", - 29307 + "2023-01-01T23:58:03", + 33900 ], [ - "2022-11-26T01:00:47", - 29407 + "2023-01-02T23:32:43", + 33969 ], [ - "2022-11-28T01:02:53", - 29424 + "2023-01-04T17:53:34", + 34454 ], [ - "2022-12-07T07:19:55", - 30367 + "2023-01-05T19:18:33", + 34740 ] ], "python": [ @@ -11227,6 +11803,70 @@ [ "2022-12-07T07:19:55", 133802 + ], + [ + "2022-12-18T20:23:59", + 138864 + ], + [ + "2022-12-19T18:26:59", + 139150 + ], + [ + "2022-12-20T16:08:58", + 139498 + ], + [ + "2022-12-21T23:23:24", + 140102 + ], + [ + "2022-12-22T22:59:06", + 140496 + ], + [ + "2022-12-24T20:01:35", + 140786 + ], + [ + "2022-12-25T21:13:52", + 140818 + ], + [ + "2022-12-26T19:56:00", + 140920 + ], + [ + "2022-12-27T23:56:39", + 141171 + ], + [ + "2022-12-29T20:55:31", + 141503 + ], + [ + "2022-12-30T20:56:36", + 141638 + ], + [ + "2022-12-31T08:10:29", + 141690 + ], + [ + "2023-01-01T23:58:03", + 141832 + ], + [ + "2023-01-02T23:32:43", + 141974 + ], + [ + "2023-01-04T17:53:34", + 142707 + ], + [ + "2023-01-05T19:18:33", + 143313 ] ], "ruby": [ @@ -12357,6 +12997,70 @@ [ "2022-12-07T07:19:55", 2766 + ], + [ + "2022-12-18T20:23:59", + 2785 + ], + [ + "2022-12-19T18:26:59", + 2785 + ], + [ + "2022-12-20T16:08:58", + 2787 + ], + [ + "2022-12-21T23:23:24", + 2791 + ], + [ + "2022-12-22T22:59:06", + 2791 + ], + [ + "2022-12-24T20:01:35", + 2793 + ], + [ + "2022-12-25T21:13:52", + 2793 + ], + [ + "2022-12-26T19:30:31", + 2795 + ], + [ + "2022-12-27T23:56:39", + 2795 + ], + [ + "2022-12-29T20:55:31", + 2797 + ], + [ + "2022-12-30T20:56:36", + 2797 + ], + [ + "2022-12-31T08:10:29", + 2797 + ], + [ + "2023-01-01T23:58:03", + 2797 + ], + [ + "2023-01-02T23:32:43", + 2797 + ], + [ + "2023-01-04T17:53:34", + 2802 + ], + [ + "2023-01-05T19:18:33", + 2802 ] ], "rust": [ @@ -13487,6 +14191,70 @@ [ "2022-12-07T07:19:55", 4259 + ], + [ + "2022-12-18T20:23:59", + 4332 + ], + [ + "2022-12-19T18:26:59", + 4339 + ], + [ + "2022-12-20T16:08:58", + 4341 + ], + [ + "2022-12-21T23:23:24", + 4350 + ], + [ + "2022-12-22T22:59:06", + 4350 + ], + [ + "2022-12-24T20:01:35", + 4350 + ], + [ + "2022-12-25T21:13:52", + 4350 + ], + [ + "2022-12-26T19:30:31", + 4353 + ], + [ + "2022-12-27T23:56:39", + 4353 + ], + [ + "2022-12-29T20:55:31", + 4353 + ], + [ + "2022-12-30T20:56:36", + 4353 + ], + [ + "2022-12-31T08:10:29", + 4353 + ], + [ + "2023-01-01T23:58:03", + 4353 + ], + [ + "2023-01-02T23:32:43", + 4375 + ], + [ + "2023-01-04T17:53:34", + 4381 + ], + [ + "2023-01-05T19:18:33", + 4386 ] ], "salesforce": [ @@ -14621,6 +15389,70 @@ [ "2022-12-07T07:19:55", 15644 + ], + [ + "2022-12-18T20:23:59", + 15776 + ], + [ + "2022-12-19T18:26:59", + 15781 + ], + [ + "2022-12-20T16:08:58", + 15787 + ], + [ + "2022-12-21T23:23:24", + 15806 + ], + [ + "2022-12-22T22:59:06", + 15828 + ], + [ + "2022-12-24T20:01:35", + 15841 + ], + [ + "2022-12-25T21:13:52", + 15846 + ], + [ + "2022-12-26T19:30:31", + 15851 + ], + [ + "2022-12-27T23:56:39", + 15855 + ], + [ + "2022-12-29T20:55:31", + 15869 + ], + [ + "2022-12-30T20:56:36", + 15875 + ], + [ + "2022-12-31T08:10:29", + 15880 + ], + [ + "2023-01-01T23:58:03", + 15885 + ], + [ + "2023-01-02T23:32:43", + 15889 + ], + [ + "2023-01-04T17:53:34", + 15909 + ], + [ + "2023-01-05T19:18:33", + 15927 ] ], "scala": [ @@ -15753,6 +16585,70 @@ [ "2022-12-07T07:19:55", 1544 + ], + [ + "2022-12-18T20:23:59", + 1786 + ], + [ + "2022-12-19T18:26:59", + 1790 + ], + [ + "2022-12-20T16:08:58", + 1791 + ], + [ + "2022-12-21T23:23:24", + 1797 + ], + [ + "2022-12-22T22:59:06", + 1807 + ], + [ + "2022-12-24T20:01:35", + 1833 + ], + [ + "2022-12-25T21:13:52", + 1836 + ], + [ + "2022-12-26T19:30:31", + 1837 + ], + [ + "2022-12-27T23:56:39", + 1863 + ], + [ + "2022-12-29T20:55:31", + 1874 + ], + [ + "2022-12-30T20:56:36", + 1879 + ], + [ + "2022-12-31T08:10:29", + 1880 + ], + [ + "2023-01-01T23:58:03", + 1881 + ], + [ + "2023-01-02T23:32:43", + 1895 + ], + [ + "2023-01-04T17:53:34", + 1927 + ], + [ + "2023-01-05T19:18:33", + 1974 ] ], "swift": [ @@ -16883,6 +17779,70 @@ [ "2022-12-07T07:19:55", 2792 + ], + [ + "2022-12-18T20:23:59", + 2884 + ], + [ + "2022-12-19T18:26:59", + 2907 + ], + [ + "2022-12-20T16:08:58", + 2920 + ], + [ + "2022-12-21T23:23:24", + 2994 + ], + [ + "2022-12-22T22:59:06", + 2995 + ], + [ + "2022-12-24T20:01:35", + 3008 + ], + [ + "2022-12-25T21:13:52", + 3008 + ], + [ + "2022-12-26T19:30:31", + 3008 + ], + [ + "2022-12-27T23:56:39", + 3008 + ], + [ + "2022-12-29T20:55:31", + 3008 + ], + [ + "2022-12-30T20:56:36", + 3008 + ], + [ + "2022-12-31T08:10:29", + 3008 + ], + [ + "2023-01-01T23:58:03", + 3008 + ], + [ + "2023-01-02T23:32:43", + 3008 + ], + [ + "2023-01-04T17:53:34", + 3031 + ], + [ + "2023-01-05T19:18:33", + 3053 ] ], "terraform": [ @@ -18017,6 +18977,70 @@ [ "2022-12-07T07:19:55", 144049 + ], + [ + "2022-12-18T20:23:59", + 149086 + ], + [ + "2022-12-19T18:26:59", + 149549 + ], + [ + "2022-12-20T16:08:58", + 150049 + ], + [ + "2022-12-21T23:23:24", + 150868 + ], + [ + "2022-12-22T22:59:06", + 151377 + ], + [ + "2022-12-24T20:01:35", + 152010 + ], + [ + "2022-12-25T21:13:52", + 152274 + ], + [ + "2022-12-26T19:56:00", + 152559 + ], + [ + "2022-12-27T23:56:39", + 152926 + ], + [ + "2022-12-29T20:55:31", + 153675 + ], + [ + "2022-12-30T20:56:36", + 154035 + ], + [ + "2022-12-31T08:10:29", + 154171 + ], + [ + "2023-01-01T23:58:03", + 154505 + ], + [ + "2023-01-02T23:32:43", + 154848 + ], + [ + "2023-01-04T17:53:34", + 155756 + ], + [ + "2023-01-05T19:18:33", + 156394 ] ] } \ No newline at end of file diff --git a/.automation/generated/linter-helps.json b/.automation/generated/linter-helps.json index 5f2371aa3ef..b2f6bc82950 100644 --- a/.automation/generated/linter-helps.json +++ b/.automation/generated/linter-helps.json @@ -483,9 +483,9 @@ " input).", " --python-cell-magics TEXT When processing Jupyter Notebooks, add the", " given magic to the list of known python-", - " magics (prun, timeit, pypy, python, python3,", - " capture, time). Useful for formatting cells", - " with custom python magics.", + " magics (python, python3, pypy, capture,", + " timeit, time, prun). Useful for formatting", + " cells with custom python magics.", " -x, --skip-source-first-line Skip the first line of the source code.", " -S, --skip-string-normalization", " Don't normalize string quotes or prefixes.", @@ -667,7 +667,7 @@ " [--secrets-scan-file-type SECRETS_SCAN_FILE_TYPE]", " [--enable-secret-scan-all-files]", " [--block-list-secret-scan BLOCK_LIST_SECRET_SCAN]", - " [--summary-position {bottom,top}]", + " [--summary-position {top,bottom}]", " [--skip-resources-without-violations]", "", "Infrastructure as code static analysis", @@ -918,7 +918,7 @@ " --block-list-secret-scan BLOCK_LIST_SECRET_SCAN", " List of files to filter out from the secret scanner", " [env var: CKV_SECRETS_SCAN_BLOCK_LIST]", - " --summary-position {bottom,top}", + " --summary-position {top,bottom}", " Chose whether the summary will be appended on top", " (before the checks results) or on bottom (after check", " results), default is on top.", @@ -1134,7 +1134,7 @@ "" ], "clj-kondo": [ - "clj-kondo v2022.10.14", + "clj-kondo v2022.12.10", "", "", "Options:", @@ -1157,7 +1157,7 @@ " nearest `.clj-kondo` directory in the current and parent directories.", "", " --config : config may be a file or an EDN expression. See", - " https://cljdoc.org/d/clj-kondo/clj-kondo/2022.10.14/doc/configuration", + " https://cljdoc.org/d/clj-kondo/clj-kondo/2022.12.10/doc/configuration", "", " --config-dir : use this config directory instead of auto-detected", " .clj-kondo dir.", @@ -1414,6 +1414,25 @@ " processed by linter, in the current directory (where the .cfg", " file is located) and all sub-directories." ], + "csharpier": [ + "dotnet-csharpier", + "", + "Usage:", + " dotnet-csharpier [options] [...]", + "", + "Arguments:", + " One or more paths to a directory containing c# files to format or a c# file to format. If a path is not specified the current directory is used", + "", + "Options:", + " --check Check that files are formatted. Will not write any changes.", + " --fast Skip comparing syntax tree of formatted file to original file to validate changes.", + " --skip-write Skip writing changes. Generally used for testing to ensure csharpier doesn't throw any errors or cause syntax tree validation failures.", + " --write-stdout Write the results of formatting any files to stdout.", + " --pipe-multiple-files Keep csharpier running so that multiples files can be piped to it via stdin", + " --version Show version information", + " -?, -h, --help Show help and usage information", + "" + ], "cspell": [ "Usage: cspell [options] [command]", "", @@ -1535,27 +1554,25 @@ " dockerfilelint < Dockerfile Lint the contents of Dockerfile via stdin" ], "dotenv-linter": [ - "dotenv-linter 3.2.0", + "dotenv-linter 3.3.0", "Mikhail Grachev ", "Lightning-fast linter for .env files", "", "USAGE:", - " dotenv-linter [FLAGS] [OPTIONS] ... [SUBCOMMAND]", + " dotenv-linter [OPTIONS] [input]... [SUBCOMMAND]", "", - "FLAGS:", - " -h, --help Prints help information", - " --no-color Turns off the colored output", - " --not-check-updates Doesn't check for updates", - " -q, --quiet Doesn't display additional information", - " -r, --recursive Recursively searches and checks .env files", - " -v, --version Prints version information", + "ARGS:", + " ... files or paths [default: /]", "", "OPTIONS:", " -e, --exclude ... Excludes files from check", + " -h, --help Print help information", + " --no-color Turns off the colored output", + " --not-check-updates Doesn't check for updates", + " -q, --quiet Doesn't display additional information", + " -r, --recursive Recursively searches and checks .env files", " -s, --skip ... Skips checks", - "", - "ARGS:", - " ... files or paths [default: /]", + " -v, --version Print version information", "", "SUBCOMMANDS:", " compare Compares if files have the same keys [aliases: c]", @@ -1660,26 +1677,26 @@ " --parser-options Object Specify parser options", " --resolve-plugins-relative-to path::String A folder where plugins should be resolved from, CWD by default", "", - "Specifying rules and plugins:", + "Specify Rules and Plugins:", " --plugin [String] Specify plugins", " --rule Object Specify rules", " --rulesdir [path::String] Load additional rules from this directory. Deprecated: Use rules from plugins", "", - "Fixing problems:", + "Fix Problems:", " --fix Automatically fix problems", " --fix-dry-run Automatically fix problems without saving the changes to the file system", " --fix-type Array Specify the types of fixes to apply (directive, problem, suggestion, layout)", "", - "Ignoring files:", + "Ignore Files:", " --ignore-path path::String Specify path of ignore file", " --no-ignore Disable use of ignore files and patterns", " --ignore-pattern [String] Pattern of files to ignore (in addition to those in .eslintignore)", "", - "Using stdin:", + "Use stdin:", " --stdin Lint code provided on - default: false", " --stdin-filename String Specify filename to process STDIN as", "", - "Handling warnings:", + "Handle Warnings:", " --quiet Report errors only - default: false", " --max-warnings Int Number of warnings to trigger nonzero exit code - default: -1", "", @@ -1721,26 +1738,26 @@ " --parser-options Object Specify parser options", " --resolve-plugins-relative-to path::String A folder where plugins should be resolved from, CWD by default", "", - "Specifying rules and plugins:", + "Specify Rules and Plugins:", " --plugin [String] Specify plugins", " --rule Object Specify rules", " --rulesdir [path::String] Load additional rules from this directory. Deprecated: Use rules from plugins", "", - "Fixing problems:", + "Fix Problems:", " --fix Automatically fix problems", " --fix-dry-run Automatically fix problems without saving the changes to the file system", " --fix-type Array Specify the types of fixes to apply (directive, problem, suggestion, layout)", "", - "Ignoring files:", + "Ignore Files:", " --ignore-path path::String Specify path of ignore file", " --no-ignore Disable use of ignore files and patterns", " --ignore-pattern [String] Pattern of files to ignore (in addition to those in .eslintignore)", "", - "Using stdin:", + "Use stdin:", " --stdin Lint code provided on - default: false", " --stdin-filename String Specify filename to process STDIN as", "", - "Handling warnings:", + "Handle Warnings:", " --quiet Report errors only - default: false", " --max-warnings Int Number of warnings to trigger nonzero exit code - default: -1", "", @@ -2122,10 +2139,10 @@ " [-c] [--ws] [--sp SETTINGS_PATH] [--cr CONFIG_ROOT]", " [--resolve-all-configs] [--profile PROFILE] [--old-finders]", " [-j [JOBS]] [--ac] [--interactive] [--format-error FORMAT_ERROR]", - " [--format-success FORMAT_SUCCESS] [--filter-files] [-s SKIP]", - " [--extend-skip EXTEND_SKIP] [--sg SKIP_GLOB]", - " [--extend-skip-glob EXTEND_SKIP_GLOB] [--gitignore]", - " [--ext SUPPORTED_EXTENSIONS]", + " [--format-success FORMAT_SUCCESS] [--sort-reexports]", + " [--filter-files] [-s SKIP] [--extend-skip EXTEND_SKIP]", + " [--sg SKIP_GLOB] [--extend-skip-glob EXTEND_SKIP_GLOB]", + " [--gitignore] [--ext SUPPORTED_EXTENSIONS]", " [--blocked-extension BLOCKED_EXTENSIONS] [--dont-follow-links]", " [--filename FILENAME] [--allow-root] [-a ADD_IMPORTS] [--append]", " [--af] [--rm REMOVE_IMPORTS] [--float-to-top]", @@ -2140,7 +2157,8 @@ " [--case-sensitive] [--remove-redundant-aliases] [--honor-noqa]", " [--treat-comment-as-code TREAT_COMMENTS_AS_CODE]", " [--treat-all-comment-as-code] [--formatter FORMATTER] [--color]", - " [--ext-format EXT_FORMAT] [--star-first] [--sd DEFAULT_SECTION]", + " [--ext-format EXT_FORMAT] [--star-first]", + " [--split-on-trailing-comma] [--sd DEFAULT_SECTION]", " [--only-sections] [--ds] [--fas] [--fss] [--hcss] [--srss]", " [--fass] [-t FORCE_TO_TOP] [--combine-straight-imports]", " [--nlb NO_LINES_BEFORE] [--src SRC_PATHS]", @@ -2149,7 +2167,7 @@ " [-f KNOWN_FUTURE_LIBRARY] [-o KNOWN_THIRD_PARTY]", " [-p KNOWN_FIRST_PARTY] [--known-local-folder KNOWN_LOCAL_FOLDER]", " [--virtual-env VIRTUAL_ENV] [--conda-env CONDA_ENV]", - " [--py {all,2,27,3,310,35,36,37,38,39,auto}]", + " [--py {all,2,27,3,310,311,36,37,38,39,auto}]", " [files ...]", "", "Sort Python import definitions alphabetically within logical sections. Run", @@ -2213,7 +2231,8 @@ " Use the old deprecated finder logic that relies on", " environment introspection magic.", " -j [JOBS], --jobs [JOBS]", - " Number of files to process in parallel.", + " Number of files to process in parallel. Negative value", + " means use number of CPUs.", " --ac, --atomic Ensures the output doesn't save if the resulting file", " contains syntax errors.", " --interactive Tells isort to apply changes interactively.", @@ -2221,6 +2240,8 @@ " Override the format used to print errors.", " --format-success FORMAT_SUCCESS", " Override the format used to print success.", + " --sort-reexports Automatically sort all re-exports (module level", + " __all__ collections)", "", "target options:", " files One or more Python source files that need their", @@ -2394,6 +2415,9 @@ " extensions formatting rules.", " --star-first Forces star imports above others to avoid overriding", " directly imported variables.", + " --split-on-trailing-comma", + " Split imports list followed by a trailing comma into", + " VERTICAL_HANGING_INDENT mode", "", "section output options:", " --sd DEFAULT_SECTION, --section-default DEFAULT_SECTION", @@ -2473,7 +2497,7 @@ " --conda-env CONDA_ENV", " Conda environment to use for determining whether a", " package is third-party", - " --py {all,2,27,3,310,35,36,37,38,39,auto}, --python-version {all,2,27,3,310,35,36,37,38,39,auto}", + " --py {all,2,27,3,310,311,36,37,38,39,auto}, --python-version {all,2,27,3,310,311,36,37,38,39,auto}", " Tells isort to set the known standard library based on", " the specified Python version. Default is to assume any", " Python 3 version could be the target, and use a union", @@ -2654,8 +2678,10 @@ " --color Make output colorful", " --color-name=", " Customize the output color", - " --debug Turn on debug output", - " --trace Turn on trace output", + " --debug Turn on debug output. Deprecated, use", + " '--log-level=debug' instead.", + " --trace Turn on trace output. Deprecated, use", + " '--log-level=trace' instead.", " --disabled_rules=", " Comma-separated list of rules to globally disable. To", " disable standard ktlint rule-set use", @@ -2664,16 +2690,23 @@ " --limit= Maximum number of errors to show (default: show all)", " --relative Print files relative to the working directory (e.g.", " dir/file.kt instead of /home/user/project/dir/file.kt)", - " --reporter=", + " --reporter=", " A reporter to use (built-in: plain (default), plain?", - " group_by_file, json, sarif, checkstyle, html). To use", - " a third-party reporter specify a path to a JAR file", - " on the filesystem via ',artifact=' option. To", - " override reporter output, use ',output=' option.", - " -R, --ruleset=", + " group_by_file, plain-summary, json, sarif,", + " checkstyle, html). To use a third-party reporter", + " specify a path to a JAR file on the filesystem via ',", + " artifact=' option. To override reporter output, use ',", + " output=' option.", + " -R, --ruleset=", " A path to a JAR file containing additional ruleset(s)", " --stdin Read file from stdin", - " -v, --verbose Show error codes", + " --patterns-from-stdin[=]", + " Read additional patterns to check/format from stdin.", + " Patterns are delimited by the given argument.", + " (default is newline) If the argument is an empty", + " string, the NUL byte is used.", + " -v, --verbose Show error codes. Deprecated, use '--log-level=info'", + " instead.", " --editorconfig=", " Path to the default '.editorconfig'. A property value", " from this file is used only when no '.editorconfig'", @@ -2684,6 +2717,9 @@ " --experimental Enabled experimental rules (ktlint-ruleset-experimental)", " --baseline=", " Defines a baseline file to check against", + " -l, --log-level=", + " Defines the minimum log level (trace, debug, info,", + " warn, error) or none to suppress all logging", " -h, --help Show this help message and exit.", " -V, --version Print version information and exit.", "Commands:", @@ -2789,13 +2825,14 @@ " [--no-color] [-v] [] ...", " ([--cache []] | [--no-cache])", " [--ignore [] ...] [--enable [] ...]", - " [--only [] ...] [--globals [] ...]", - " [--read-globals [] ...] [--new-globals [] ...]", - " [--new-read-globals [] ...] [--not-globals [] ...]", + " [--only [] ...] [--operators [] ...]", + " [--globals [] ...] [--read-globals [] ...]", + " [--new-globals [] ...] [--new-read-globals [] ...]", + " [--not-globals [] ...]", " [--exclude-files [] ...]", " [--include-files [] ...]", "", - "luacheck 1.0.0, a linter and a static analyzer for Lua.", + "luacheck 1.1.0, a linter and a static analyzer for Lua.", "", "Arguments:", " files List of files, directories and rockspecs to check. Pass", @@ -2828,6 +2865,8 @@ " --only [] ...,", " -o [] ...", " Filter out warnings not matching these patterns.", + " --operators [] ...", + " Allow compound operators matching patterns", "", "Options for configuring allowed globals:", " --std Set standard globals, default is max. can be one", @@ -3344,6 +3383,36 @@ " -p, --path path::String (DEPRECATED) Directory containing the files to lint (default: current directory) - default: .", " -f, --files String (DEPRECATED) Comma-separated list of Ant-style file patterns specifying files that must be included" ], + "npm-package-json-lint": [ + "", + " Configurable linter for package.json files.", + "", + " Usage", + " $ npmPkgJsonLint ", + "", + " Options", + " --quiet, -q Report errors only", + " --noConfigFiles, -ncf Disables use of .npmpackagejsonlintrc.json files, npmpackagejsonlint.config.js files, and npmpackagejsonlint object in package.json file.", + " --configFile, -c File path of .npmpackagejsonlintrc.json", + " --ignorePath, -i Path to a file containing patterns that describe files to ignore. The path can be absolute or relative to process.cwd(). By default, npm-package-json-lint looks for .npmpackagejsonlintignore in process.cwd().", + " --maxWarnings, -mw Maximum number of warnings that can be detected before an error is thrown.", + " --allowEmptyTargets Do not throw an error when a list of targets is empty.", + "", + " Examples", + " $ npmPkgJsonLint --version", + " $ npmPkgJsonLint .", + " $ npmPkgJsonLint ./packages", + " $ npmPkgJsonLint ./package1 ./package2", + " $ npmPkgJsonLint -c ./config/.npmpackagejsonlintrc.json .", + " $ npmPkgJsonLint --configFile ./config/npmpackagejsonlint.config.json .", + " $ npmPkgJsonLint -q .", + " $ npmPkgJsonLint --quiet ./packages", + " $ npmPkgJsonLint . --ignorePath .gitignore", + " $ npmPkgJsonLint . -i .gitignore", + " $ npmPkgJsonLint . --maxWarnings 10", + " $ npmPkgJsonLint . -mw 10", + "" + ], "perlcritic": [ "Usage:", " perlcritic [-12345 | --brutal | --cruel | --harsh | --stern | --gentle]", @@ -3507,11 +3576,11 @@ " --xml[=XML] Path to store JUnit XML results.", " -w, --warning Also show warnings.", " -q, --quiet Do not output any message", + " --no-files-exit-code Throw error if no files processed.", " -h, --help Display help for the given command. When no command is given display help for the list command", " -V, --version Display this application version", " --ansi|--no-ansi Force (or disable --no-ansi) ANSI output", " -n, --no-interaction Do not ask any interactive question", - " -nf, --no-files-exit-code Throw error if no files processed.", " -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug" ], "phpstan": [ @@ -4039,194 +4108,511 @@ " prepend the command parameters with a hyphen (-), not a forward slash (/).", "" ], - "prettier": [ - "Usage: prettier [options] [file/dir/glob ...]", + "powershell_formatter": [ "", - "By default, output is written to stdout.", - "Stdin is read if it is piped to Prettier and no files are given.", - "", - "Output options:", + "Usage: pwsh[.exe] [-Login] [[-File] [args]]", + " [-Command { - | [-args ]", + " | [] } ]", + " [-ConfigurationName ] [-ConfigurationFile ]", + " [-CustomPipeName ] [-EncodedCommand ]", + " [-ExecutionPolicy ] [-InputFormat {Text | XML}]", + " [-Interactive] [-MTA] [-NoExit] [-NoLogo] [-NonInteractive] [-NoProfile]", + " [-NoProfileLoadTime] [-OutputFormat {Text | XML}]", + " [-SettingsFile ] [-SSHServerMode] [-STA]", + " [-Version] [-WindowStyle