From c84ddeb3f3bf09fa75cb4d9ab8e77522c424a9d7 Mon Sep 17 00:00:00 2001 From: Nicolas Vuillamy Date: Sun, 19 May 2024 23:12:00 +0200 Subject: [PATCH] [automation] Auto-update linters version, help and documentation (#3559) * [automation] Auto-update linters version, help and documentation * [MegaLinter] Apply linters fixes * Downgrade lightning flow scanner Until bug is fixed: https://github.com/Lightning-Flow-Scanner/lightning-flow-scanner-vsce/issues/100 * Downgrade ansible-lint to v24.2.3 Related to https://github.com/ansible/ansible-lint/issues/4177 * fix pylint issues * [MegaLinter] Apply linters fixes --------- Co-authored-by: nvuillam --- .automation/generated/linter-helps.json | 659 +++++++++--------- .automation/generated/linter-versions.json | 28 +- CHANGELOG.md | 14 + Dockerfile | 4 +- README.md | 2 +- docs/all_linters.md | 28 +- docs/descriptors/ansible_ansible_lint.md | 2 +- docs/descriptors/cloudformation_cfn_lint.md | 2 +- docs/descriptors/csharp_dotnet_format.md | 2 +- docs/descriptors/kubernetes_kubescape.md | 2 +- .../markdown_markdown_link_check.md | 2 +- docs/descriptors/php_phplint.md | 3 +- docs/descriptors/php_phpstan.md | 2 +- docs/descriptors/python_pylint.md | 615 ++++++++-------- docs/descriptors/python_pyright.md | 2 +- docs/descriptors/repository_checkov.md | 6 +- docs/descriptors/repository_git_diff.md | 2 +- docs/descriptors/repository_trufflehog.md | 4 +- .../salesforce_lightning_flow_scanner.md | 2 +- .../salesforce_sfdx_scanner_apex.md | 2 +- .../salesforce_sfdx_scanner_aura.md | 2 +- .../salesforce_sfdx_scanner_lwc.md | 2 +- docs/descriptors/snakemake_snakemake.md | 31 +- docs/descriptors/terraform_terragrunt.md | 4 +- docs/descriptors/vbdotnet_dotnet_format.md | 2 +- docs/descriptors/xml_xmllint.md | 2 +- docs/used-by-stats.md | 155 ++-- flavors/c_cpp/Dockerfile | 2 +- flavors/cupcake/Dockerfile | 2 +- flavors/documentation/Dockerfile | 2 +- flavors/dotnet/Dockerfile | 2 +- flavors/dotnetweb/Dockerfile | 2 +- flavors/go/Dockerfile | 2 +- flavors/java/Dockerfile | 2 +- flavors/javascript/Dockerfile | 2 +- flavors/php/Dockerfile | 2 +- flavors/python/Dockerfile | 2 +- flavors/ruby/Dockerfile | 2 +- flavors/rust/Dockerfile | 2 +- flavors/salesforce/Dockerfile | 4 +- flavors/security/Dockerfile | 2 +- flavors/swift/Dockerfile | 2 +- flavors/terraform/Dockerfile | 2 +- linters/ansible_ansible_lint/Dockerfile | 2 +- .../Dockerfile | 2 +- .../ansible.megalinter-descriptor.yml | 4 +- .../salesforce.megalinter-descriptor.yml | 4 +- megalinter/linters/JavaPmdLinter.py | 2 +- megalinter/reporters/TextReporter.py | 1 + 49 files changed, 832 insertions(+), 798 deletions(-) diff --git a/.automation/generated/linter-helps.json b/.automation/generated/linter-helps.json index e06a7137cb3..fb573d00dea 100644 --- a/.automation/generated/linter-helps.json +++ b/.automation/generated/linter-helps.json @@ -772,7 +772,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] [--deep-analysis]", " [--no-fail-on-crash] [--mask MASK] [--scan-secrets-history]", " [--secrets-history-timeout SECRETS_HISTORY_TIMEOUT]", @@ -1077,7 +1077,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.", @@ -3416,7 +3416,7 @@ " completion Generate autocompletion script", " config Handle cached configurations", " delete Delete configurations in Kubescape SaaS version", - " download Download framework,artifacts,attack-tracks,controls-inputs,exceptions,control", + " download Download exceptions,control,framework,artifacts,attack-tracks,controls-inputs", " fix Fix misconfiguration in files", " help Help about any command", " list List frameworks/controls will list the supported frameworks and controls", @@ -3888,7 +3888,7 @@ " Print version" ], "markdown-link-check": [ - "(node:1757) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.", + "(node:1731) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.", "(Use `node --trace-deprecation ...` to show where the warning was created)", "Usage: markdown-link-check [options] [filenamesOrUrls...]", "", @@ -4489,6 +4489,7 @@ " -w, --warning Also show warnings", " --memory-limit=MEMORY-LIMIT Memory limit for analysis", " --ignore-exit-code Ignore exit codes so there are no \"failure\" exit code even when no files processed", + " --bootstrap=BOOTSTRAP A PHP script that is included before the linter run", " -h, --help Display help for the given command. When no command is given display help for the lint command", " -q, --quiet Do not output any message", " -V, --version Display this application version", @@ -5775,11 +5776,12 @@ " pylint. (default: (3, 12))", " --ignored-modules ", " List of module names for which member attributes", - " should not be checked (useful for modules/projects", - " where namespaces are manipulated during runtime and", - " thus existing member attributes cannot be deduced by", - " static analysis). It supports qualified module names,", - " as well as Unix pattern matching. (default: ())", + " should not be checked and will not be imported (useful", + " for modules/projects where namespaces are manipulated", + " during runtime and thus existing member attributes", + " cannot be deduced by static analysis). It supports", + " qualified module names, as well as Unix pattern", + " matching. (default: ())", " --analyse-fallback-blocks ", " Analyse import fallback blocks. This can be used to", " support both Python 2 and 3 compatible code, which", @@ -5790,6 +5792,10 @@ " Clear in-memory caches upon conclusion of linting.", " Useful if running pylint in a server-like mode.", " (default: False)", + " --prefer-stubs ", + " Resolve imports to .pyi stubs if available. May reduce", + " no-member messages and increase not-an-iterable", + " messages. (default: False)", "", "Reports:", " Options related to output formatting and reporting", @@ -5851,34 +5857,6 @@ " Warning level messages displayed, use \"--disable=all", " --enable=classes --disable=W\".", "", - "Format:", - " Formatting checker.", - "", - " --max-line-length ", - " Maximum number of characters on a single line.", - " (default: 100)", - " --ignore-long-lines ", - " Regexp for a line that is allowed to be longer than", - " the limit. (default: ^\\s*(# )??$)", - " --single-line-if-stmt ", - " Allow the body of an if to be on the same line as the", - " test if there is no else. (default: False)", - " --single-line-class-stmt ", - " Allow the body of a class to be on the same line as", - " the declaration if body contains single statement.", - " (default: False)", - " --max-module-lines ", - " Maximum number of lines in a module. (default: 1000)", - " --indent-string ", - " String used as indentation unit. This is usually \" \"", - " (4 spaces) or \" \" (1 tab). (default: )", - " --indent-after-paren ", - " Number of spaces of indent required inside a hanging", - " or continued line. (default: 4)", - " --expected-line-ending-format ", - " Expected format of line ending, e.g. empty (any line", - " ending), LF or CRLF. (default: )", - "", "String:", " Check string literals.", "", @@ -5893,27 +5871,193 @@ " delimiter is used inconsistently within a module.", " (default: False)", "", - "Classes:", - " Checker for class nodes.", + "Spelling:", + " Check spelling in comments and docstrings.", "", - " --defining-attr-methods ", - " List of method names used to declare (i.e. assign)", - " instance attributes. (default: ('__init__', '__new__',", - " 'setUp', 'asyncSetUp', '__post_init__'))", - " --valid-classmethod-first-arg ", - " List of valid names for the first argument in a class", - " method. (default: ('cls',))", - " --valid-metaclass-classmethod-first-arg ", - " List of valid names for the first argument in a", - " metaclass class method. (default: ('mcs',))", - " --exclude-protected ", - " List of member names, which should be excluded from", - " the protected access warning. (default: ('_asdict',", - " '_fields', '_replace', '_source', '_make',", - " 'os._exit'))", - " --check-protected-access-in-special-methods ", - " Warn about protected attribute access inside special", - " methods (default: False)", + " --spelling-dict ", + " Spelling dictionary name. No available dictionaries :", + " You need to install both the python package and the", + " system dependency for enchant to work. (default: )", + " --spelling-ignore-words ", + " List of comma separated words that should not be", + " checked. (default: )", + " --spelling-private-dict-file ", + " A path to a file that contains the private dictionary;", + " one word per line. (default: )", + " --spelling-store-unknown-words ", + " Tells whether to store unknown words to the private", + " dictionary (see the --spelling-private-dict-file", + " option) instead of raising a message. (default: n)", + " --max-spelling-suggestions N", + " Limits count of emitted suggestions for spelling", + " mistakes. (default: 4)", + " --spelling-ignore-comment-directives ", + " List of comma separated words that should be", + " considered directives if they appear at the beginning", + " of a comment and should not be checked. (default: fmt:", + " on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:)", + "", + "Variables:", + " BaseChecker for variables.", + "", + " --init-import ", + " Tells whether we should check for unused import in", + " __init__ files. (default: False)", + " --dummy-variables-rgx ", + " A regular expression matching the name of dummy", + " variables (i.e. expected to not be used). (default: _+", + " $|(_[a-zA-Z0-9_]*[a-zA-Z0-", + " 9]+?$)|dummy|^ignored_|^unused_)", + " --additional-builtins ", + " List of additional names supposed to be defined in", + " builtins. Remember that you should avoid defining new", + " builtins when possible. (default: ())", + " --callbacks ", + " List of strings which can identify a callback function", + " by name. A callback name must start or end with one of", + " those strings. (default: ('cb_', '_cb'))", + " --redefining-builtins-modules ", + " List of qualified module names which can have objects", + " that can redefine builtins. (default: ('six.moves',", + " 'past.builtins', 'future.builtins', 'builtins', 'io'))", + " --ignored-argument-names ", + " Argument names that match this expression will be", + " ignored. (default:", + " re.compile('_.*|^ignored_|^unused_'))", + " --allow-global-unused-variables ", + " Tells whether unused global variables should be", + " treated as a violation. (default: True)", + " --allowed-redefined-builtins ", + " List of names allowed to shadow builtins (default: ())", + "", + "Basic:", + " --good-names Good variable names which should always be accepted,", + " separated by a comma. (default: ('i', 'j', 'k', 'ex',", + " 'Run', '_'))", + " --good-names-rgxs ", + " Good variable names regexes, separated by a comma. If", + " names match any regex, they will always be accepted", + " (default: )", + " --bad-names Bad variable names which should always be refused,", + " separated by a comma. (default: ('foo', 'bar', 'baz',", + " 'toto', 'tutu', 'tata'))", + " --bad-names-rgxs ", + " Bad variable names regexes, separated by a comma. If", + " names match any regex, they will always be refused", + " (default: )", + " --name-group ", + " Colon-delimited sets of names that determine each", + " other's naming style when the name regexes allow", + " several styles. (default: ())", + " --include-naming-hint ", + " Include a hint for the correct naming format with", + " invalid-name. (default: False)", + " --property-classes ", + " List of decorators that produce properties, such as", + " abc.abstractproperty. Add to this list to register", + " other decorators that produce valid properties. These", + " decorators are taken in consideration only for", + " invalid-name. (default: ('abc.abstractproperty',))", + " --argument-naming-style