From a39a07c95434b33d541b0d8678e49f9371858d99 Mon Sep 17 00:00:00 2001 From: bdovaz Date: Fri, 10 Feb 2023 21:42:09 +0000 Subject: [PATCH] [MegaLinter] Apply linters fixes --- .automation/build.py | 12 ++++++++---- docs/descriptors/xml_xmllint.md | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.automation/build.py b/.automation/build.py index 3a7b7e2f1ad..4759b82e6c8 100644 --- a/.automation/build.py +++ b/.automation/build.py @@ -1895,6 +1895,7 @@ def get_install_md(item): ) return linter_doc_md + def doc_url(href): if ( "/descriptors/" in href @@ -2013,23 +2014,26 @@ def merge_install_attr(item): else: item["install"][elt] = elt_val + item["install"][elt] + def md_package_list(package_list, type, indent, start_url): res = [] for package_id_v in package_list: package_id = package_id_v package_version = "" - if type == "npm" and package_id.count("@") == 2: # npm specific version + if type == "npm" and package_id.count("@") == 2: # npm specific version package_id_split = package_id.split("@") package_id = "@" + package_id_split[1] package_version = "/v/" + package_id_split[2] - elif type == "pip" and "==" in package_id_v: # py specific version + elif type == "pip" and "==" in package_id_v: # py specific version package_id = package_id_v.split("==")[0] package_version = "/" + package_id_v.split("==")[1] elif type == "gem": - gem_match=re.match(r"(.*)\s-v\s(.*)", package_id_v) # gem specific version + gem_match = re.match( + r"(.*)\s-v\s(.*)", package_id_v + ) # gem specific version - if gem_match: # gem specific version + if gem_match: # gem specific version package_id = gem_match.group(1) package_version = "/versions/" + gem_match.group(2) res += [f"{indent}- [{package_id_v}]({start_url}{package_id}{package_version})"] diff --git a/docs/descriptors/xml_xmllint.md b/docs/descriptors/xml_xmllint.md index 819a23de36a..abebef13cdb 100644 --- a/docs/descriptors/xml_xmllint.md +++ b/docs/descriptors/xml_xmllint.md @@ -25,7 +25,7 @@ To apply file formatting you must set `XML_XMLLINT_CLI_LINT_MODE: file` and `XML | Variable | Description | Default value | |-----------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------| | XML_XMLLINT_AUTOFORMAT | If set to `true`, it will reformat and reindent the output | `false` | -| XML_XMLLINT_INDENT | The number of indentation spaces when `XML_XMLLINT_AUTOFORMAT` is `true` | ` ` | +| XML_XMLLINT_INDENT | The number of indentation spaces when `XML_XMLLINT_AUTOFORMAT` is `true` | `` | | XML_XMLLINT_ARGUMENTS | User custom arguments to add in linter CLI call
Ex: `-s --foo "bar"` | | | XML_XMLLINT_FILTER_REGEX_INCLUDE | Custom regex including filter
Ex: `(src\|lib)` | Include every file | | XML_XMLLINT_FILTER_REGEX_EXCLUDE | Custom regex excluding filter
Ex: `(test\|examples)` | Exclude no file |