diff --git a/.automation/generated/linter-helps.json b/.automation/generated/linter-helps.json index 7835bf755b1..073604468b6 100644 --- a/.automation/generated/linter-helps.json +++ b/.automation/generated/linter-helps.json @@ -1520,6 +1520,126 @@ " -v, --verbose Print detailed debugging output.", " -h, --help Show help and usage information." ], + "codespell": [ + "usage: codespell [-h] [--version] [-d] [-c] [-w] [-D DICTIONARY]", + " [--builtin BUILTIN-LIST] [--ignore-regex IGNORE_REGEX]", + " [-I FILES] [-L WORDS] [--uri-ignore-words-list WORDS]", + " [-r REGEX] [--uri-regex URI_REGEX] [-s] [--count] [-S SKIP]", + " [-x FILES] [-i INTERACTIVE] [-q QUIET_LEVEL] [-e] [-f] [-H]", + " [-A LINES] [-B LINES] [-C LINES] [--stdin-single-line]", + " [--config CONFIG] [--toml TOML]", + " [files ...]", + "", + "positional arguments:", + " files files or directories to check", + "", + "options:", + " -h, --help show this help message and exit", + " --version show program's version number and exit", + " -d, --disable-colors disable colors, even when printing to terminal", + " -c, --enable-colors enable colors, even when not printing to terminal", + " -w, --write-changes write changes in place if possible", + " -D DICTIONARY, --dictionary DICTIONARY", + " comma-separated list of custom dictionary files that", + " contain spelling corrections. If this flag is not", + " specified or equals \"-\" then the default dictionary is", + " used.", + " --builtin BUILTIN-LIST", + " comma-separated list of builtin dictionaries to", + " include (when \"-D -\" or no \"-D\" is passed). Current", + " options are:", + " - 'clear' for unambiguous errors", + " - 'rare' for rare (but valid) words that are likely to", + " be errors", + " - 'informal' for making informal words more formal", + " - 'usage' for replacing phrasing with recommended", + " terms", + " - 'code' for words from code and/or mathematics that", + " are likely to be typos in other contexts (such as", + " uint)", + " - 'names' for valid proper names that might be typos", + " - 'en-GB_to_en-US' for corrections from en-GB to en-US", + " The default is 'clear,rare'.", + " --ignore-regex IGNORE_REGEX", + " regular expression that is used to find patterns to", + " ignore by treating as whitespace. When writing regular", + " expressions, consider ensuring there are boundary non-", + " word chars, e.g., \"\\bmatch\\b\". Defaults to", + " empty/disabled.", + " -I FILES, --ignore-words FILES", + " comma-separated list of files that contain words to be", + " ignored by codespell. Files must contain 1 word per", + " line. Words are case sensitive based on how they are", + " written in the dictionary file.", + " -L WORDS, --ignore-words-list WORDS", + " comma-separated list of words to be ignored by", + " codespell. Words are case sensitive based on how they", + " are written in the dictionary file.", + " --uri-ignore-words-list WORDS", + " comma-separated list of words to be ignored by", + " codespell in URIs and emails only. Words are case", + " sensitive based on how they are written in the", + " dictionary file. If set to \"*\", all misspelling in", + " URIs and emails will be ignored.", + " -r REGEX, --regex REGEX", + " regular expression that is used to find words. By", + " default any alphanumeric character, the underscore,", + " the hyphen, and the apostrophe are used to build", + " words. This option cannot be specified together with", + " --write-changes.", + " --uri-regex URI_REGEX", + " regular expression that is used to find URIs and", + " emails. A default expression is provided.", + " -s, --summary print summary of fixes", + " --count print the number of errors as the last line of stderr", + " -S SKIP, --skip SKIP comma-separated list of files to skip. It accepts", + " globs as well. E.g.: if you want codespell to skip", + " .eps and .txt files, you'd give \"*.eps,*.txt\" to this", + " option.", + " -x FILES, --exclude-file FILES", + " ignore whole lines that match those in the comma-", + " separated list of files EXCLUDE. The lines in these", + " files should match the to-be-excluded lines exactly", + " -i INTERACTIVE, --interactive INTERACTIVE", + " set interactive mode when writing changes:", + " - 0: no interactivity.", + " - 1: ask for confirmation.", + " - 2: ask user to choose one fix when more than one is", + " available.", + " - 3: both 1 and 2", + " -q QUIET_LEVEL, --quiet-level QUIET_LEVEL", + " bitmask that allows suppressing messages:", + " - 0: print all messages.", + " - 1: disable warnings about wrong encoding.", + " - 2: disable warnings about binary files.", + " - 4: omit warnings about automatic fixes that were", + " disabled in the dictionary.", + " - 8: don't print anything for non-automatic fixes.", + " - 16: don't print the list of fixed files.", + " - 32: don't print configuration files.", + " As usual with bitmasks, these levels can be combined;", + " e.g. use 3 for levels 1+2, 7 for 1+2+4, 23 for", + " 1+2+4+16, etc. The default mask is 34.", + " -e, --hard-encoding-detection", + " use chardet to detect the encoding of each file. This", + " can slow down codespell, but is more reliable in", + " detecting encodings other than utf-8, iso8859-1, and", + " ascii.", + " -f, --check-filenames", + " check file names as well", + " -H, --check-hidden check hidden files and directories (those starting", + " with \".\") as well.", + " -A LINES, --after-context LINES", + " print LINES of trailing context", + " -B LINES, --before-context LINES", + " print LINES of leading context", + " -C LINES, --context LINES", + " print LINES of surrounding context", + " --stdin-single-line output just a single line for each misspelling in", + " stdin mode", + " --config CONFIG path to config file.", + " --toml TOML path to a pyproject.toml file." + ], "coffeelint": [ "Usage: coffeelint [options] source [...]", "", diff --git a/.automation/generated/linter-links-previews.json b/.automation/generated/linter-links-previews.json index b31a0b9906b..84eec1b02ab 100644 --- a/.automation/generated/linter-links-previews.json +++ b/.automation/generated/linter-links-previews.json @@ -84,6 +84,11 @@ "image": "https://opengraph.githubassets.com/bf0d187aea6f03a804178458080b2be18a5fd1bf8d8cc353ff3150743aae9805/greglook/cljstyle", "title": "GitHub - greglook/cljstyle: A tool for formatting Clojure code" }, + "codespell": { + "description": "codespell checks code and documentation for common misspellings.", + "image": null, + "title": "codespell-project/codespell: check code for common misspellings" + }, "coffeelint": { "description": "\n CoffeeLint is a style checker that helps keep\n CoffeeScript\n code clean and consistent. CoffeeScript does a great job at\n insulating programmers from many of\n JavaScript's bad parts, but it won't help enforce a consistent style\n across a code base. CoffeeLint can help with that.\n ", "image": null, @@ -624,4 +629,4 @@ "image": "https://avatars3.githubusercontent.com/u/5244945?s=400&v=4", "title": "adrienverge/yamllint" } -} \ No newline at end of file +} diff --git a/.automation/generated/linter-versions.json b/.automation/generated/linter-versions.json index 5904a932052..d0a13dde554 100644 --- a/.automation/generated/linter-versions.json +++ b/.automation/generated/linter-versions.json @@ -15,6 +15,7 @@ "clippy": "0.1.81", "clj-kondo": "2024.09.27", "cljstyle": "0.15.0", + "codespell": "2.3.0", "coffeelint": "5.2.11", "cpplint": "2.0.0", "csharpier": "0.29.2", diff --git a/.automation/test/spell_codespell/spell_bad_1.md b/.automation/test/spell_codespell/spell_bad_1.md new file mode 100644 index 00000000000..0f406f799da --- /dev/null +++ b/.automation/test/spell_codespell/spell_bad_1.md @@ -0,0 +1,2 @@ +abandonded Dockefile +abberivated acadamy diff --git a/.automation/test/spell_codespell/spell_fix_1.md b/.automation/test/spell_codespell/spell_fix_1.md new file mode 100644 index 00000000000..0f406f799da --- /dev/null +++ b/.automation/test/spell_codespell/spell_fix_1.md @@ -0,0 +1,2 @@ +abandonded Dockefile +abberivated acadamy diff --git a/.automation/test/spell_codespell/spell_good_1.md b/.automation/test/spell_codespell/spell_good_1.md new file mode 100644 index 00000000000..ebdbe35ec6c --- /dev/null +++ b/.automation/test/spell_codespell/spell_good_1.md @@ -0,0 +1,2 @@ +abandoned Dockerfile +abbreviated academy diff --git a/.github/workflows/deploy-BETA-linters.yml b/.github/workflows/deploy-BETA-linters.yml index c649d845738..a9fa157c66a 100644 --- a/.github/workflows/deploy-BETA-linters.yml +++ b/.github/workflows/deploy-BETA-linters.yml @@ -158,6 +158,7 @@ jobs: "spell_proselint", "spell_vale", "spell_lychee", + "spell_codespell", "sql_sqlfluff", "swift_swiftlint", "tekton_tekton_lint", diff --git a/.github/workflows/deploy-DEV-linters.yml b/.github/workflows/deploy-DEV-linters.yml index 3106bed46f5..5b51b13cf4e 100644 --- a/.github/workflows/deploy-DEV-linters.yml +++ b/.github/workflows/deploy-DEV-linters.yml @@ -139,6 +139,7 @@ jobs: "spell_proselint", "spell_vale", "spell_lychee", + "spell_codespell", "sql_sqlfluff", "swift_swiftlint", "tekton_tekton_lint", diff --git a/.github/workflows/deploy-RELEASE-linters.yml b/.github/workflows/deploy-RELEASE-linters.yml index 086335e6687..192d823e64a 100644 --- a/.github/workflows/deploy-RELEASE-linters.yml +++ b/.github/workflows/deploy-RELEASE-linters.yml @@ -152,6 +152,7 @@ jobs: "spell_proselint", "spell_vale", "spell_lychee", + "spell_codespell", "sql_sqlfluff", "swift_swiftlint", "tekton_tekton_lint", diff --git a/CHANGELOG.md b/CHANGELOG.md index 72b34dc3b49..bfe82ee82c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l - Core - New linters + - Add [codespell](https://github.com/codespell-project/codespell) - Media diff --git a/Dockerfile b/Dockerfile index b02ef553ff5..5cdab774a97 100644 --- a/Dockerfile +++ b/Dockerfile @@ -254,11 +254,12 @@ RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtuale && mkdir -p "/venvs/snakemake" && cd "/venvs/snakemake" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakemake && deactivate && cd ./../.. \ && mkdir -p "/venvs/snakefmt" && cd "/venvs/snakefmt" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakefmt && deactivate && cd ./../.. \ && mkdir -p "/venvs/proselint" && cd "/venvs/proselint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir proselint && deactivate && cd ./../.. \ + && mkdir -p "/venvs/codespell" && cd "/venvs/codespell" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir codespell && deactivate && cd ./../.. \ && mkdir -p "/venvs/sqlfluff" && cd "/venvs/sqlfluff" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir sqlfluff && deactivate && cd ./../.. \ && mkdir -p "/venvs/yamllint" && cd "/venvs/yamllint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir yamllint && deactivate && cd ./../.. \ && find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \ && rm -rf /root/.cache -ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/cpplint/bin:/venvs/cfn-lint/bin:/venvs/djlint/bin:/venvs/pylint/bin:/venvs/black/bin:/venvs/flake8/bin:/venvs/isort/bin:/venvs/bandit/bin:/venvs/mypy/bin:/venvs/pyright/bin:/venvs/ruff/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/rst-lint/bin:/venvs/rstcheck/bin:/venvs/rstfmt/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin +ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/cpplint/bin:/venvs/cfn-lint/bin:/venvs/djlint/bin:/venvs/pylint/bin:/venvs/black/bin:/venvs/flake8/bin:/venvs/isort/bin:/venvs/bandit/bin:/venvs/mypy/bin:/venvs/pyright/bin:/venvs/ruff/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/rst-lint/bin:/venvs/rstcheck/bin:/venvs/rstfmt/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/codespell/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin #PIPVENV__END ############################ diff --git a/docs/standalone-linters.md b/docs/standalone-linters.md index 557c50439d6..520b0dbc0d9 100644 --- a/docs/standalone-linters.md +++ b/docs/standalone-linters.md @@ -109,6 +109,7 @@ | SPELL_PROSELINT | oxsecurity/megalinter-only-spell_proselint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-spell_proselint/beta) | | SPELL_VALE | oxsecurity/megalinter-only-spell_vale:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-spell_vale/beta) | | SPELL_LYCHEE | oxsecurity/megalinter-only-spell_lychee:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-spell_lychee/beta) | +| SPELL_CODESPELL | oxsecurity/megalinter-only-spell_codespell:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-spell_codespell/beta) | | SQL_SQLFLUFF | oxsecurity/megalinter-only-sql_sqlfluff:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-sql_sqlfluff/beta) | | SQL_TSQLLINT | oxsecurity/megalinter-only-sql_tsqllint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-sql_tsqllint/beta) | | SWIFT_SWIFTLINT | oxsecurity/megalinter-only-swift_swiftlint:beta | ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/oxsecurity/megalinter-only-swift_swiftlint/beta) | diff --git a/flavors/c_cpp/Dockerfile b/flavors/c_cpp/Dockerfile index f7965ea83e7..aaebfba63da 100644 --- a/flavors/c_cpp/Dockerfile +++ b/flavors/c_cpp/Dockerfile @@ -160,11 +160,12 @@ RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtuale && mkdir -p "/venvs/snakemake" && cd "/venvs/snakemake" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakemake && deactivate && cd ./../.. \ && mkdir -p "/venvs/snakefmt" && cd "/venvs/snakefmt" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakefmt && deactivate && cd ./../.. \ && mkdir -p "/venvs/proselint" && cd "/venvs/proselint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir proselint && deactivate && cd ./../.. \ + && mkdir -p "/venvs/codespell" && cd "/venvs/codespell" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir codespell && deactivate && cd ./../.. \ && mkdir -p "/venvs/sqlfluff" && cd "/venvs/sqlfluff" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir sqlfluff && deactivate && cd ./../.. \ && mkdir -p "/venvs/yamllint" && cd "/venvs/yamllint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir yamllint && deactivate && cd ./../.. \ && find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \ && rm -rf /root/.cache -ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/cpplint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin +ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/cpplint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/codespell/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin #PIPVENV__END ############################ diff --git a/flavors/c_cpp/flavor.json b/flavors/c_cpp/flavor.json index ea6071cb911..11340f461ae 100644 --- a/flavors/c_cpp/flavor.json +++ b/flavors/c_cpp/flavor.json @@ -53,6 +53,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "XML_XMLLINT", diff --git a/flavors/cupcake/Dockerfile b/flavors/cupcake/Dockerfile index 44d1c2fc5d9..abcd9d0645f 100644 --- a/flavors/cupcake/Dockerfile +++ b/flavors/cupcake/Dockerfile @@ -207,11 +207,12 @@ RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtuale && mkdir -p "/venvs/rstcheck" && cd "/venvs/rstcheck" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir rstcheck[toml,sphinx] && deactivate && cd ./../.. \ && mkdir -p "/venvs/rstfmt" && cd "/venvs/rstfmt" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir rstfmt && deactivate && cd ./../.. \ && mkdir -p "/venvs/proselint" && cd "/venvs/proselint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir proselint && deactivate && cd ./../.. \ + && mkdir -p "/venvs/codespell" && cd "/venvs/codespell" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir codespell && deactivate && cd ./../.. \ && mkdir -p "/venvs/sqlfluff" && cd "/venvs/sqlfluff" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir sqlfluff && deactivate && cd ./../.. \ && mkdir -p "/venvs/yamllint" && cd "/venvs/yamllint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir yamllint && deactivate && cd ./../.. \ && find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \ && rm -rf /root/.cache -ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/cpplint/bin:/venvs/cfn-lint/bin:/venvs/djlint/bin:/venvs/pylint/bin:/venvs/black/bin:/venvs/flake8/bin:/venvs/isort/bin:/venvs/mypy/bin:/venvs/pyright/bin:/venvs/ruff/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/rst-lint/bin:/venvs/rstcheck/bin:/venvs/rstfmt/bin:/venvs/proselint/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin +ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/cpplint/bin:/venvs/cfn-lint/bin:/venvs/djlint/bin:/venvs/pylint/bin:/venvs/black/bin:/venvs/flake8/bin:/venvs/isort/bin:/venvs/mypy/bin:/venvs/pyright/bin:/venvs/ruff/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/rst-lint/bin:/venvs/rstcheck/bin:/venvs/rstfmt/bin:/venvs/proselint/bin:/venvs/codespell/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin #PIPVENV__END ############################ diff --git a/flavors/cupcake/flavor.json b/flavors/cupcake/flavor.json index af7070c8d7e..56419261303 100644 --- a/flavors/cupcake/flavor.json +++ b/flavors/cupcake/flavor.json @@ -79,6 +79,7 @@ "SPELL_CSPELL", "SPELL_PROSELINT", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "SWIFT_SWIFTLINT", "TERRAFORM_TFLINT", diff --git a/flavors/documentation/Dockerfile b/flavors/documentation/Dockerfile index 99c4eea50cd..0f5f09ee7dd 100644 --- a/flavors/documentation/Dockerfile +++ b/flavors/documentation/Dockerfile @@ -158,11 +158,12 @@ RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtuale && mkdir -p "/venvs/snakemake" && cd "/venvs/snakemake" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakemake && deactivate && cd ./../.. \ && mkdir -p "/venvs/snakefmt" && cd "/venvs/snakefmt" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakefmt && deactivate && cd ./../.. \ && mkdir -p "/venvs/proselint" && cd "/venvs/proselint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir proselint && deactivate && cd ./../.. \ + && mkdir -p "/venvs/codespell" && cd "/venvs/codespell" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir codespell && deactivate && cd ./../.. \ && mkdir -p "/venvs/sqlfluff" && cd "/venvs/sqlfluff" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir sqlfluff && deactivate && cd ./../.. \ && mkdir -p "/venvs/yamllint" && cd "/venvs/yamllint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir yamllint && deactivate && cd ./../.. \ && find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \ && rm -rf /root/.cache -ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin +ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/codespell/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin #PIPVENV__END ############################ diff --git a/flavors/documentation/flavor.json b/flavors/documentation/flavor.json index 78c9f232d8c..53693773737 100644 --- a/flavors/documentation/flavor.json +++ b/flavors/documentation/flavor.json @@ -48,6 +48,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "XML_XMLLINT", diff --git a/flavors/dotnet/Dockerfile b/flavors/dotnet/Dockerfile index aece9e4ed92..8f48bff9a8f 100644 --- a/flavors/dotnet/Dockerfile +++ b/flavors/dotnet/Dockerfile @@ -169,11 +169,12 @@ RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtuale && mkdir -p "/venvs/snakemake" && cd "/venvs/snakemake" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakemake && deactivate && cd ./../.. \ && mkdir -p "/venvs/snakefmt" && cd "/venvs/snakefmt" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakefmt && deactivate && cd ./../.. \ && mkdir -p "/venvs/proselint" && cd "/venvs/proselint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir proselint && deactivate && cd ./../.. \ + && mkdir -p "/venvs/codespell" && cd "/venvs/codespell" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir codespell && deactivate && cd ./../.. \ && mkdir -p "/venvs/sqlfluff" && cd "/venvs/sqlfluff" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir sqlfluff && deactivate && cd ./../.. \ && mkdir -p "/venvs/yamllint" && cd "/venvs/yamllint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir yamllint && deactivate && cd ./../.. \ && find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \ && rm -rf /root/.cache -ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/cpplint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin +ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/cpplint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/codespell/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin #PIPVENV__END ############################ diff --git a/flavors/dotnet/flavor.json b/flavors/dotnet/flavor.json index c5c8df06ab5..8068276dae3 100644 --- a/flavors/dotnet/flavor.json +++ b/flavors/dotnet/flavor.json @@ -63,6 +63,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "VBDOTNET_DOTNET_FORMAT", diff --git a/flavors/dotnetweb/Dockerfile b/flavors/dotnetweb/Dockerfile index 03352f795ec..0f093c080eb 100644 --- a/flavors/dotnetweb/Dockerfile +++ b/flavors/dotnetweb/Dockerfile @@ -169,11 +169,12 @@ RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtuale && mkdir -p "/venvs/snakemake" && cd "/venvs/snakemake" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakemake && deactivate && cd ./../.. \ && mkdir -p "/venvs/snakefmt" && cd "/venvs/snakefmt" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakefmt && deactivate && cd ./../.. \ && mkdir -p "/venvs/proselint" && cd "/venvs/proselint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir proselint && deactivate && cd ./../.. \ + && mkdir -p "/venvs/codespell" && cd "/venvs/codespell" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir codespell && deactivate && cd ./../.. \ && mkdir -p "/venvs/sqlfluff" && cd "/venvs/sqlfluff" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir sqlfluff && deactivate && cd ./../.. \ && mkdir -p "/venvs/yamllint" && cd "/venvs/yamllint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir yamllint && deactivate && cd ./../.. \ && find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \ && rm -rf /root/.cache -ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/cpplint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin +ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/cpplint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/codespell/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin #PIPVENV__END ############################ diff --git a/flavors/dotnetweb/flavor.json b/flavors/dotnetweb/flavor.json index bd25b4a1eef..ed18760f530 100644 --- a/flavors/dotnetweb/flavor.json +++ b/flavors/dotnetweb/flavor.json @@ -69,6 +69,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "TSX_ESLINT", diff --git a/flavors/go/Dockerfile b/flavors/go/Dockerfile index 8b5944785f6..913de803b0f 100644 --- a/flavors/go/Dockerfile +++ b/flavors/go/Dockerfile @@ -166,11 +166,12 @@ RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtuale && mkdir -p "/venvs/snakemake" && cd "/venvs/snakemake" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakemake && deactivate && cd ./../.. \ && mkdir -p "/venvs/snakefmt" && cd "/venvs/snakefmt" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakefmt && deactivate && cd ./../.. \ && mkdir -p "/venvs/proselint" && cd "/venvs/proselint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir proselint && deactivate && cd ./../.. \ + && mkdir -p "/venvs/codespell" && cd "/venvs/codespell" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir codespell && deactivate && cd ./../.. \ && mkdir -p "/venvs/sqlfluff" && cd "/venvs/sqlfluff" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir sqlfluff && deactivate && cd ./../.. \ && mkdir -p "/venvs/yamllint" && cd "/venvs/yamllint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir yamllint && deactivate && cd ./../.. \ && find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \ && rm -rf /root/.cache -ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin +ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/codespell/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin #PIPVENV__END ############################ diff --git a/flavors/go/flavor.json b/flavors/go/flavor.json index a21b72f8ecd..2bae2aa1899 100644 --- a/flavors/go/flavor.json +++ b/flavors/go/flavor.json @@ -51,6 +51,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "XML_XMLLINT", diff --git a/flavors/java/Dockerfile b/flavors/java/Dockerfile index 0c4f542c070..246c99305d4 100644 --- a/flavors/java/Dockerfile +++ b/flavors/java/Dockerfile @@ -161,11 +161,12 @@ RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtuale && mkdir -p "/venvs/snakemake" && cd "/venvs/snakemake" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakemake && deactivate && cd ./../.. \ && mkdir -p "/venvs/snakefmt" && cd "/venvs/snakefmt" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakefmt && deactivate && cd ./../.. \ && mkdir -p "/venvs/proselint" && cd "/venvs/proselint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir proselint && deactivate && cd ./../.. \ + && mkdir -p "/venvs/codespell" && cd "/venvs/codespell" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir codespell && deactivate && cd ./../.. \ && mkdir -p "/venvs/sqlfluff" && cd "/venvs/sqlfluff" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir sqlfluff && deactivate && cd ./../.. \ && mkdir -p "/venvs/yamllint" && cd "/venvs/yamllint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir yamllint && deactivate && cd ./../.. \ && find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \ && rm -rf /root/.cache -ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin +ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/codespell/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin #PIPVENV__END ############################ diff --git a/flavors/java/flavor.json b/flavors/java/flavor.json index 679125c6af0..d05494c5a41 100644 --- a/flavors/java/flavor.json +++ b/flavors/java/flavor.json @@ -53,6 +53,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "XML_XMLLINT", diff --git a/flavors/javascript/Dockerfile b/flavors/javascript/Dockerfile index f96e00d1e74..2fe55c7d4cd 100644 --- a/flavors/javascript/Dockerfile +++ b/flavors/javascript/Dockerfile @@ -158,11 +158,12 @@ RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtuale && mkdir -p "/venvs/snakemake" && cd "/venvs/snakemake" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakemake && deactivate && cd ./../.. \ && mkdir -p "/venvs/snakefmt" && cd "/venvs/snakefmt" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakefmt && deactivate && cd ./../.. \ && mkdir -p "/venvs/proselint" && cd "/venvs/proselint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir proselint && deactivate && cd ./../.. \ + && mkdir -p "/venvs/codespell" && cd "/venvs/codespell" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir codespell && deactivate && cd ./../.. \ && mkdir -p "/venvs/sqlfluff" && cd "/venvs/sqlfluff" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir sqlfluff && deactivate && cd ./../.. \ && mkdir -p "/venvs/yamllint" && cd "/venvs/yamllint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir yamllint && deactivate && cd ./../.. \ && find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \ && rm -rf /root/.cache -ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin +ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/codespell/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin #PIPVENV__END ############################ diff --git a/flavors/javascript/flavor.json b/flavors/javascript/flavor.json index e2d9f0bb840..1c7c24027ca 100644 --- a/flavors/javascript/flavor.json +++ b/flavors/javascript/flavor.json @@ -55,6 +55,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "TSX_ESLINT", diff --git a/flavors/php/Dockerfile b/flavors/php/Dockerfile index 20ec40fad7b..c6b82d3f32f 100644 --- a/flavors/php/Dockerfile +++ b/flavors/php/Dockerfile @@ -172,11 +172,12 @@ RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtuale && mkdir -p "/venvs/snakemake" && cd "/venvs/snakemake" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakemake && deactivate && cd ./../.. \ && mkdir -p "/venvs/snakefmt" && cd "/venvs/snakefmt" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakefmt && deactivate && cd ./../.. \ && mkdir -p "/venvs/proselint" && cd "/venvs/proselint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir proselint && deactivate && cd ./../.. \ + && mkdir -p "/venvs/codespell" && cd "/venvs/codespell" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir codespell && deactivate && cd ./../.. \ && mkdir -p "/venvs/sqlfluff" && cd "/venvs/sqlfluff" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir sqlfluff && deactivate && cd ./../.. \ && mkdir -p "/venvs/yamllint" && cd "/venvs/yamllint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir yamllint && deactivate && cd ./../.. \ && find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \ && rm -rf /root/.cache -ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin +ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/codespell/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin #PIPVENV__END ############################ diff --git a/flavors/php/flavor.json b/flavors/php/flavor.json index e7681c74970..c0157265bd3 100644 --- a/flavors/php/flavor.json +++ b/flavors/php/flavor.json @@ -54,6 +54,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "XML_XMLLINT", diff --git a/flavors/python/Dockerfile b/flavors/python/Dockerfile index 5f65a71e179..9176d1d2897 100644 --- a/flavors/python/Dockerfile +++ b/flavors/python/Dockerfile @@ -170,11 +170,12 @@ RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtuale && mkdir -p "/venvs/snakemake" && cd "/venvs/snakemake" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakemake && deactivate && cd ./../.. \ && mkdir -p "/venvs/snakefmt" && cd "/venvs/snakefmt" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakefmt && deactivate && cd ./../.. \ && mkdir -p "/venvs/proselint" && cd "/venvs/proselint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir proselint && deactivate && cd ./../.. \ + && mkdir -p "/venvs/codespell" && cd "/venvs/codespell" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir codespell && deactivate && cd ./../.. \ && mkdir -p "/venvs/sqlfluff" && cd "/venvs/sqlfluff" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir sqlfluff && deactivate && cd ./../.. \ && mkdir -p "/venvs/yamllint" && cd "/venvs/yamllint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir yamllint && deactivate && cd ./../.. \ && find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \ && rm -rf /root/.cache -ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/cpplint/bin:/venvs/djlint/bin:/venvs/pylint/bin:/venvs/black/bin:/venvs/flake8/bin:/venvs/isort/bin:/venvs/bandit/bin:/venvs/mypy/bin:/venvs/pyright/bin:/venvs/ruff/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/rst-lint/bin:/venvs/rstcheck/bin:/venvs/rstfmt/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin +ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/cpplint/bin:/venvs/djlint/bin:/venvs/pylint/bin:/venvs/black/bin:/venvs/flake8/bin:/venvs/isort/bin:/venvs/bandit/bin:/venvs/mypy/bin:/venvs/pyright/bin:/venvs/ruff/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/rst-lint/bin:/venvs/rstcheck/bin:/venvs/rstfmt/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/codespell/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin #PIPVENV__END ############################ diff --git a/flavors/python/flavor.json b/flavors/python/flavor.json index 88071537b7e..02ff0ef0bf1 100644 --- a/flavors/python/flavor.json +++ b/flavors/python/flavor.json @@ -61,6 +61,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "XML_XMLLINT", diff --git a/flavors/ruby/Dockerfile b/flavors/ruby/Dockerfile index 3497048e8a4..078c81a826a 100644 --- a/flavors/ruby/Dockerfile +++ b/flavors/ruby/Dockerfile @@ -162,11 +162,12 @@ RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtuale && mkdir -p "/venvs/snakemake" && cd "/venvs/snakemake" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakemake && deactivate && cd ./../.. \ && mkdir -p "/venvs/snakefmt" && cd "/venvs/snakefmt" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakefmt && deactivate && cd ./../.. \ && mkdir -p "/venvs/proselint" && cd "/venvs/proselint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir proselint && deactivate && cd ./../.. \ + && mkdir -p "/venvs/codespell" && cd "/venvs/codespell" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir codespell && deactivate && cd ./../.. \ && mkdir -p "/venvs/sqlfluff" && cd "/venvs/sqlfluff" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir sqlfluff && deactivate && cd ./../.. \ && mkdir -p "/venvs/yamllint" && cd "/venvs/yamllint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir yamllint && deactivate && cd ./../.. \ && find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \ && rm -rf /root/.cache -ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin +ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/codespell/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin #PIPVENV__END ############################ diff --git a/flavors/ruby/flavor.json b/flavors/ruby/flavor.json index 14346fda162..5011c540b5f 100644 --- a/flavors/ruby/flavor.json +++ b/flavors/ruby/flavor.json @@ -49,6 +49,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "XML_XMLLINT", diff --git a/flavors/rust/Dockerfile b/flavors/rust/Dockerfile index d97dc90c325..733074a054c 100644 --- a/flavors/rust/Dockerfile +++ b/flavors/rust/Dockerfile @@ -158,11 +158,12 @@ RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtuale && mkdir -p "/venvs/snakemake" && cd "/venvs/snakemake" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakemake && deactivate && cd ./../.. \ && mkdir -p "/venvs/snakefmt" && cd "/venvs/snakefmt" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakefmt && deactivate && cd ./../.. \ && mkdir -p "/venvs/proselint" && cd "/venvs/proselint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir proselint && deactivate && cd ./../.. \ + && mkdir -p "/venvs/codespell" && cd "/venvs/codespell" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir codespell && deactivate && cd ./../.. \ && mkdir -p "/venvs/sqlfluff" && cd "/venvs/sqlfluff" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir sqlfluff && deactivate && cd ./../.. \ && mkdir -p "/venvs/yamllint" && cd "/venvs/yamllint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir yamllint && deactivate && cd ./../.. \ && find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \ && rm -rf /root/.cache -ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin +ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/codespell/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin #PIPVENV__END ############################ diff --git a/flavors/rust/flavor.json b/flavors/rust/flavor.json index b5fea47da48..984670625cf 100644 --- a/flavors/rust/flavor.json +++ b/flavors/rust/flavor.json @@ -49,6 +49,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "XML_XMLLINT", diff --git a/flavors/salesforce/Dockerfile b/flavors/salesforce/Dockerfile index ebb68b8d9e0..117175e1a07 100644 --- a/flavors/salesforce/Dockerfile +++ b/flavors/salesforce/Dockerfile @@ -168,11 +168,12 @@ RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtuale && mkdir -p "/venvs/snakemake" && cd "/venvs/snakemake" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakemake && deactivate && cd ./../.. \ && mkdir -p "/venvs/snakefmt" && cd "/venvs/snakefmt" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakefmt && deactivate && cd ./../.. \ && mkdir -p "/venvs/proselint" && cd "/venvs/proselint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir proselint && deactivate && cd ./../.. \ + && mkdir -p "/venvs/codespell" && cd "/venvs/codespell" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir codespell && deactivate && cd ./../.. \ && mkdir -p "/venvs/sqlfluff" && cd "/venvs/sqlfluff" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir sqlfluff && deactivate && cd ./../.. \ && mkdir -p "/venvs/yamllint" && cd "/venvs/yamllint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir yamllint && deactivate && cd ./../.. \ && find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \ && rm -rf /root/.cache -ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin +ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/codespell/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin #PIPVENV__END ############################ diff --git a/flavors/salesforce/flavor.json b/flavors/salesforce/flavor.json index 9d46e295990..fb61c9a8d43 100644 --- a/flavors/salesforce/flavor.json +++ b/flavors/salesforce/flavor.json @@ -54,6 +54,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "XML_XMLLINT", diff --git a/flavors/swift/Dockerfile b/flavors/swift/Dockerfile index b53417a2ae5..79687019a27 100644 --- a/flavors/swift/Dockerfile +++ b/flavors/swift/Dockerfile @@ -160,11 +160,12 @@ RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtuale && mkdir -p "/venvs/snakemake" && cd "/venvs/snakemake" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakemake && deactivate && cd ./../.. \ && mkdir -p "/venvs/snakefmt" && cd "/venvs/snakefmt" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakefmt && deactivate && cd ./../.. \ && mkdir -p "/venvs/proselint" && cd "/venvs/proselint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir proselint && deactivate && cd ./../.. \ + && mkdir -p "/venvs/codespell" && cd "/venvs/codespell" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir codespell && deactivate && cd ./../.. \ && mkdir -p "/venvs/sqlfluff" && cd "/venvs/sqlfluff" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir sqlfluff && deactivate && cd ./../.. \ && mkdir -p "/venvs/yamllint" && cd "/venvs/yamllint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir yamllint && deactivate && cd ./../.. \ && find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \ && rm -rf /root/.cache -ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin +ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/codespell/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin #PIPVENV__END ############################ diff --git a/flavors/swift/flavor.json b/flavors/swift/flavor.json index ce3e6befa93..018f5ef56d0 100644 --- a/flavors/swift/flavor.json +++ b/flavors/swift/flavor.json @@ -48,6 +48,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "SWIFT_SWIFTLINT", "TEKTON_TEKTON_LINT", diff --git a/flavors/terraform/Dockerfile b/flavors/terraform/Dockerfile index 20b677247ca..aa7617d4ba9 100644 --- a/flavors/terraform/Dockerfile +++ b/flavors/terraform/Dockerfile @@ -172,11 +172,12 @@ RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtuale && mkdir -p "/venvs/snakemake" && cd "/venvs/snakemake" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakemake && deactivate && cd ./../.. \ && mkdir -p "/venvs/snakefmt" && cd "/venvs/snakefmt" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir snakefmt && deactivate && cd ./../.. \ && mkdir -p "/venvs/proselint" && cd "/venvs/proselint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir proselint && deactivate && cd ./../.. \ + && mkdir -p "/venvs/codespell" && cd "/venvs/codespell" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir codespell && deactivate && cd ./../.. \ && mkdir -p "/venvs/sqlfluff" && cd "/venvs/sqlfluff" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir sqlfluff && deactivate && cd ./../.. \ && mkdir -p "/venvs/yamllint" && cd "/venvs/yamllint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir yamllint && deactivate && cd ./../.. \ && find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \ && rm -rf /root/.cache -ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin +ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/codespell/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin #PIPVENV__END ############################ diff --git a/flavors/terraform/flavor.json b/flavors/terraform/flavor.json index f1df11ed2fc..43fdc41092e 100644 --- a/flavors/terraform/flavor.json +++ b/flavors/terraform/flavor.json @@ -49,6 +49,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "TERRAFORM_TFLINT", diff --git a/linters/spell_codespell/Dockerfile b/linters/spell_codespell/Dockerfile new file mode 100644 index 00000000000..a7605147e33 --- /dev/null +++ b/linters/spell_codespell/Dockerfile @@ -0,0 +1,235 @@ +# syntax=docker/dockerfile:1 +########################################### +########################################### +## Dockerfile to run MegaLinter ## +########################################### +########################################### + +# @not-generated + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#ARGTOP__START + +#ARGTOP__END + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#FROM__START + +#FROM__END + +################## +# Build wheel for megalinter python package +################## +FROM ghcr.io/astral-sh/uv:0.4.20 AS uv +FROM python:3.12.7-alpine3.20 AS build-ml-core +WORKDIR / +COPY pyproject.toml . +COPY --from=uv /uv /bin/uv +RUN --mount=type=cache,target=/root/.cache/uv \ + uv pip install --system -r pyproject.toml +COPY . . +RUN --mount=type=cache,target=/root/.cache/uv \ + uv pip install --system . + +################## +# Get base image # +################## +FROM python:3.12.7-alpine3.20 + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#ARG__START + +#ARG__END + +#################### +# Run APK installs # +#################### + +WORKDIR / + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#APK__START +RUN apk add --no-cache \ + bash \ + ca-certificates \ + curl \ + gcc \ + git \ + git-lfs \ + libffi-dev \ + make \ + musl-dev \ + openssh \ + && git config --global core.autocrlf true +#APK__END + +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# hadolint ignore=DL3044 +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true + +############################## +# Installs rust dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#CARGO__START + +#CARGO__END + +################################ +# Installs python dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#PIPVENV__START +RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtualenv \ + && mkdir -p "/venvs/codespell" && cd "/venvs/codespell" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir codespell && deactivate && cd ./../.. \ + && find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \ + && rm -rf /root/.cache +ENV PATH="${PATH}":/venvs/codespell/bin +#PIPVENV__END + +############################ +# Install NPM dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +ENV NODE_OPTIONS="--max-old-space-size=8192" \ + NODE_ENV=production +#NPM__START + +#NPM__END + +# Add node packages to path # +ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ + NODE_PATH="/node-deps/node_modules" + +############################## +# Installs ruby dependencies # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#GEM__START + +#GEM__END + +############################## +# COPY instructions # +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# + +#COPY__START + +#COPY__END + +############################################################################################# +## @generated by .automation/build.py using descriptor files, please do not update manually ## +############################################################################################# +#OTHER__START + +#OTHER__END + +################################ +# Installs python dependencies # +################################ +COPY --from=build-ml-core pyproject.toml README.md ./ +COPY --from=build-ml-core megalinter /megalinter/ +RUN --mount=type=cache,target=/root/.cache/uv,from=build-ml-core \ + --mount=from=uv,source=/uv,target=/bin/uv \ + uv pip install --system -e . + +####################################### +# Copy scripts and rules to container # +####################################### +COPY megalinter/descriptors /megalinter-descriptors +COPY TEMPLATES /action/lib/.automation + +# Copy server scripts +COPY server /server + +########################### +# Get the build arguments # +########################### +ARG BUILD_DATE +ARG BUILD_REVISION +ARG BUILD_VERSION + +################################################# +# Set ENV values used for debugging the version # +################################################# +ENV BUILD_DATE=$BUILD_DATE \ + BUILD_REVISION=$BUILD_REVISION \ + BUILD_VERSION=$BUILD_VERSION + +#FLAVOR__START +ENV MEGALINTER_FLAVOR=none +#FLAVOR__END + +######################################### +# Label the instance and set maintainer # +######################################### +LABEL com.github.actions.name="MegaLinter" \ + com.github.actions.description="The ultimate linters aggregator to make sure your projects are clean" \ + com.github.actions.icon="code" \ + com.github.actions.color="red" \ + maintainer="Nicolas Vuillamy " \ + org.opencontainers.image.created=$BUILD_DATE \ + org.opencontainers.image.revision=$BUILD_REVISION \ + org.opencontainers.image.version=$BUILD_VERSION \ + org.opencontainers.image.authors="Nicolas Vuillamy " \ + org.opencontainers.image.url="https://megalinter.io" \ + org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \ + org.opencontainers.image.documentation="https://megalinter.io" \ + org.opencontainers.image.vendor="Nicolas Vuillamy" \ + org.opencontainers.image.description="Lint your code base with GitHub Actions" + +#EXTRA_DOCKERFILE_LINES__START +ENV ENABLE_LINTERS=SPELL_CODESPELL \ + FLAVOR_SUGGESTIONS=false \ + SINGLE_LINTER=SPELL_CODESPELL \ + PRINT_ALPACA=false \ + LOG_FILE=none \ + SARIF_REPORTER=true \ + TEXT_REPORTER=false \ + UPDATED_SOURCES_REPORTER=false \ + GITHUB_STATUS_REPORTER=false \ + GITHUB_COMMENT_REPORTER=false \ + EMAIL_REPORTER=false \ + API_REPORTER=false \ + FILEIO_REPORTER=false \ + CONFIG_REPORTER=false \ + SARIF_TO_HUMAN=false +RUN mkdir /root/docker_ssh && mkdir /usr/bin/megalinter-sh +EXPOSE 22 +COPY entrypoint.sh /entrypoint.sh +COPY sh /usr/bin/megalinter-sh +COPY sh/megalinter_exec /usr/bin/megalinter_exec +COPY sh/motd /etc/motd +RUN find /usr/bin/megalinter-sh/ -type f -iname "*.sh" -exec chmod +x {} \; && \ + chmod +x entrypoint.sh && \ + chmod +x /usr/bin/megalinter_exec && \ + echo "alias megalinter='python -m megalinter.run'" >> ~/.bashrc && source ~/.bashrc && \ + echo "alias megalinter_exec='/usr/bin/megalinter_exec'" >> ~/.bashrc && source ~/.bashrc +RUN export STANDALONE_LINTER_VERSION="$(python -m megalinter.run --input /tmp --linterversion)" && \ + echo $STANDALONE_LINTER_VERSION +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#EXTRA_DOCKERFILE_LINES__END diff --git a/megalinter/descriptors/all_flavors.json b/megalinter/descriptors/all_flavors.json index efc57af906b..3785aa363d2 100644 --- a/megalinter/descriptors/all_flavors.json +++ b/megalinter/descriptors/all_flavors.json @@ -54,6 +54,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "XML_XMLLINT", @@ -172,6 +173,7 @@ "SPELL_CSPELL", "SPELL_PROSELINT", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "SWIFT_SWIFTLINT", "TERRAFORM_TFLINT", @@ -238,6 +240,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "XML_XMLLINT", @@ -311,6 +314,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "VBDOTNET_DOTNET_FORMAT", @@ -391,6 +395,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "TSX_ESLINT", @@ -486,6 +491,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "XML_XMLLINT", @@ -549,6 +555,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "XML_XMLLINT", @@ -614,6 +621,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "TSX_ESLINT", @@ -682,6 +690,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "XML_XMLLINT", @@ -753,6 +762,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "XML_XMLLINT", @@ -812,6 +822,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "XML_XMLLINT", @@ -871,6 +882,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "XML_XMLLINT", @@ -935,6 +947,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "XML_XMLLINT", @@ -1023,6 +1036,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "SWIFT_SWIFTLINT", "TEKTON_TEKTON_LINT", @@ -1083,6 +1097,7 @@ "SPELL_PROSELINT", "SPELL_VALE", "SPELL_LYCHEE", + "SPELL_CODESPELL", "SQL_SQLFLUFF", "TEKTON_TEKTON_LINT", "TERRAFORM_TFLINT", diff --git a/megalinter/descriptors/python.megalinter-descriptor.yml b/megalinter/descriptors/python.megalinter-descriptor.yml index d2a49017f53..48d1f0e5cea 100644 --- a/megalinter/descriptors/python.megalinter-descriptor.yml +++ b/megalinter/descriptors/python.megalinter-descriptor.yml @@ -301,9 +301,9 @@ linters: linter_name: pyright name: PYTHON_PYRIGHT linter_text: | - Optional static typing checks for python, by Microsoft + Fix common misspellings in text files. - If you don't use python static typing, you should disable this linter by adding `PYTHON_PYRIGHT` in `DISABLE_LINTERS` variable in your `.mega-linter.yml` config file + It's designed primarily for checking misspelled words in source code (backslash escapes are skipped), but it can be used with other files as well. It does not check for word membership in a complete dictionary, but instead looks for a set of common misspellings. Therefore it should catch errors like "adn", but it will not catch "adnasdfasdf". This also means it shouldn't generate false-positives when you use a niche term it doesn't know about. linter_url: https://github.com/Microsoft/pyright linter_rules_url: https://github.com/microsoft/pyright#type-checking-features linter_repo: https://github.com/microsoft/pyright diff --git a/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json b/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json index 21e8da3f09f..f1d640eeafb 100644 --- a/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json +++ b/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json @@ -243,6 +243,7 @@ "SCALA_SCALAFIX", "SNAKEMAKE_LINT", "SNAKEMAKE_SNAKEFMT", + "SPELL_CODESPELL", "SPELL_CSPELL", "SPELL_LYCHEE", "SPELL_MISSPELL", diff --git a/megalinter/descriptors/spell.megalinter-descriptor.yml b/megalinter/descriptors/spell.megalinter-descriptor.yml index 4e9daa621ef..e836260b187 100644 --- a/megalinter/descriptors/spell.megalinter-descriptor.yml +++ b/megalinter/descriptors/spell.megalinter-descriptor.yml @@ -211,3 +211,52 @@ linters: dockerfile: - FROM lycheeverse/lychee:latest-alpine AS lychee - COPY --link --from=lychee /usr/local/bin/lychee /usr/bin/ + + # codespell + - linter_name: codespell + name: SPELL_CODESPELL + linter_text: | + A file **.codespellrc** can be created at the root of the repository to configure codespell. + + See the [codespell documentation](https://github.com/codespell-project/codespell) for details. + test_folder: spell_codespell + can_output_sarif: false + descriptor_flavors: + - all_flavors + - cupcake + - documentation + linter_url: https://github.com/codespell-project/codespell + linter_repo: https://github.com/codespell-project/codespell + linter_rules_configuration_url: https://github.com/codespell-project/codespell?tab=readme-ov-file#using-a-config-file + linter_rules_inline_disable_url: https://github.com/codespell-project/codespell?tab=readme-ov-file#inline-ignore + linter_speed: 3 + lint_all_other_linters_files: true + lint_all_files: false + file_extensions: + - .md + - .mdx + - .markdown + - .html + - .htm + - .rst + - .txt + - .json + - .jsonc + - .json5 + - .yaml + - .yml + config_file_name: .codespellrc + cli_config_arg_name: --config + cli_help_arg_name: --help + cli_lint_ignore_arg_name: --skip + cli_lint_fix_arg_name: --write-changes + cli_version_arg_name: --version + cli_lint_mode: list_of_files + cli_lint_errors_count: total_lines + examples: + - codespell + - codespell ./my_file ./my_directory + - codespell --config mycodespellconfig.ini --check-filenames test.txt + install: + pip: + - codespell diff --git a/megalinter/tests/test_megalinter/linters/spell_codespell_test.py b/megalinter/tests/test_megalinter/linters/spell_codespell_test.py new file mode 100644 index 00000000000..70b4ce779b4 --- /dev/null +++ b/megalinter/tests/test_megalinter/linters/spell_codespell_test.py @@ -0,0 +1,14 @@ +# !/usr/bin/env python3 +""" +Unit tests for SPELL linter codespell +This class has been automatically @generated by .automation/build.py, please don't update it manually +""" + +from unittest import TestCase + +from megalinter.tests.test_megalinter.LinterTestRoot import LinterTestRoot + + +class spell_codespell_test(TestCase, LinterTestRoot): + descriptor_id = "SPELL" + linter_name = "codespell"