diff --git a/.automation/generated/flavors-stats.json b/.automation/generated/flavors-stats.json index 74650af08dc..6ae489b7bdf 100644 --- a/.automation/generated/flavors-stats.json +++ b/.automation/generated/flavors-stats.json @@ -1051,6 +1051,10 @@ [ "2022-10-30T20:09:57", 2642810 + ], + [ + "2022-10-31T01:36:18", + 2642903 ] ], "ci_light": [ @@ -2105,6 +2109,10 @@ [ "2022-10-30T20:09:57", 30353 + ], + [ + "2022-10-31T01:36:18", + 30368 ] ], "cupcake": [ @@ -2139,6 +2147,10 @@ [ "2022-10-30T20:09:57", 10 + ], + [ + "2022-10-31T01:36:18", + 10 ] ], "dart": [ @@ -4103,6 +4115,10 @@ [ "2022-10-30T20:09:57", 82058 + ], + [ + "2022-10-31T01:36:18", + 82095 ] ], "dotnet": [ @@ -5157,6 +5173,10 @@ [ "2022-10-30T20:09:57", 318598 + ], + [ + "2022-10-31T01:36:18", + 318600 ] ], "go": [ @@ -6211,6 +6231,10 @@ [ "2022-10-30T20:09:57", 14618 + ], + [ + "2022-10-31T01:36:18", + 14622 ] ], "java": [ @@ -7265,6 +7289,10 @@ [ "2022-10-30T20:09:57", 97617 + ], + [ + "2022-10-31T01:36:18", + 97635 ] ], "javascript": [ @@ -8319,6 +8347,10 @@ [ "2022-10-30T20:09:57", 161293 + ], + [ + "2022-10-31T01:36:18", + 161442 ] ], "php": [ @@ -9373,6 +9405,10 @@ [ "2022-10-30T20:09:57", 26142 + ], + [ + "2022-10-31T01:36:18", + 26144 ] ], "python": [ @@ -10427,6 +10463,10 @@ [ "2022-10-30T20:09:57", 117840 + ], + [ + "2022-10-31T01:36:18", + 117878 ] ], "ruby": [ @@ -11477,6 +11517,10 @@ [ "2022-10-30T20:09:57", 2714 + ], + [ + "2022-10-31T01:36:18", + 2714 ] ], "rust": [ @@ -12527,6 +12571,10 @@ [ "2022-10-30T20:09:57", 4102 + ], + [ + "2022-10-31T01:36:18", + 4102 ] ], "salesforce": [ @@ -13581,6 +13629,10 @@ [ "2022-10-30T20:09:57", 14782 + ], + [ + "2022-10-31T01:36:18", + 14782 ] ], "scala": [ @@ -14633,6 +14685,10 @@ [ "2022-10-30T20:09:57", 1350 + ], + [ + "2022-10-31T01:36:18", + 1350 ] ], "swift": [ @@ -15683,6 +15739,10 @@ [ "2022-10-30T20:09:57", 2652 + ], + [ + "2022-10-31T01:36:18", + 2652 ] ], "terraform": [ @@ -16737,6 +16797,10 @@ [ "2022-10-30T20:09:57", 128136 + ], + [ + "2022-10-31T01:36:18", + 128159 ] ] } \ No newline at end of file diff --git a/.automation/generated/megalinter-users.json b/.automation/generated/megalinter-users.json index 4f6cc6a014d..9b52d116291 100644 --- a/.automation/generated/megalinter-users.json +++ b/.automation/generated/megalinter-users.json @@ -62,8 +62,8 @@ "network_count": 756, "node_id": "MDEwOlJlcG9zaXRvcnkxNjM4ODMyNzk=", "notifications_url": "https://api.github.com/repos/nektos/act/notifications{?since,all,participating}", - "open_issues": 82, - "open_issues_count": 82, + "open_issues": 80, + "open_issues_count": 80, "organization": { "avatar_url": "https://avatars.githubusercontent.com/u/3813618?v=4", "events_url": "https://api.github.com/users/nektos/events{/privacy}", @@ -110,7 +110,7 @@ "releases_url": "https://api.github.com/repos/nektos/act/releases{/id}", "size": 6216, "ssh_url": "git@github.com:nektos/act.git", - "stargazers_count": 28959, + "stargazers_count": 28961, "stargazers_url": "https://api.github.com/repos/nektos/act/stargazers", "statuses_url": "https://api.github.com/repos/nektos/act/statuses/{sha}", "subscribers_count": 120, @@ -127,15 +127,15 @@ "golang" ], "trees_url": "https://api.github.com/repos/nektos/act/git/trees{/sha}", - "updated_at": "2022-10-30T17:44:54Z", + "updated_at": "2022-10-30T21:28:08Z", "url": "https://api.github.com/repos/nektos/act", "visibility": "public", - "watchers": 28959, - "watchers_count": 28959, + "watchers": 28961, + "watchers_count": 28961, "web_commit_signoff_required": false }, "repo_url": "https://github.com/nektos/act", - "stargazers": 28959 + "stargazers": 28961 }, { "info": { @@ -343,7 +343,7 @@ "releases_url": "https://api.github.com/repos/IlanCosman/tide/releases{/id}", "size": 6422, "ssh_url": "git@github.com:IlanCosman/tide.git", - "stargazers_count": 1619, + "stargazers_count": 1620, "stargazers_url": "https://api.github.com/repos/IlanCosman/tide/stargazers", "statuses_url": "https://api.github.com/repos/IlanCosman/tide/statuses/{sha}", "subscribers_count": 11, @@ -360,15 +360,15 @@ "prompt" ], "trees_url": "https://api.github.com/repos/IlanCosman/tide/git/trees{/sha}", - "updated_at": "2022-10-30T17:58:05Z", + "updated_at": "2022-10-30T22:41:31Z", "url": "https://api.github.com/repos/IlanCosman/tide", "visibility": "public", - "watchers": 1619, - "watchers_count": 1619, + "watchers": 1620, + "watchers_count": 1620, "web_commit_signoff_required": false }, "repo_url": "https://github.com/IlanCosman/tide", - "stargazers": 1619 + "stargazers": 1620 }, { "info": { @@ -592,7 +592,7 @@ "releases_url": "https://api.github.com/repos/dorssel/usbipd-win/releases{/id}", "size": 1317, "ssh_url": "git@github.com:dorssel/usbipd-win.git", - "stargazers_count": 1341, + "stargazers_count": 1342, "stargazers_url": "https://api.github.com/repos/dorssel/usbipd-win/stargazers", "statuses_url": "https://api.github.com/repos/dorssel/usbipd-win/statuses/{sha}", "subscribers_count": 32, @@ -613,15 +613,15 @@ "wsl2" ], "trees_url": "https://api.github.com/repos/dorssel/usbipd-win/git/trees{/sha}", - "updated_at": "2022-10-30T16:02:24Z", + "updated_at": "2022-10-30T19:47:05Z", "url": "https://api.github.com/repos/dorssel/usbipd-win", "visibility": "public", - "watchers": 1341, - "watchers_count": 1341, + "watchers": 1342, + "watchers_count": 1342, "web_commit_signoff_required": false }, "repo_url": "https://github.com/dorssel/usbipd-win", - "stargazers": 1341 + "stargazers": 1342 }, { "info": { @@ -848,9 +848,9 @@ }, "private": false, "pulls_url": "https://api.github.com/repos/oxsecurity/megalinter/pulls{/number}", - "pushed_at": "2022-10-30T00:41:53Z", + "pushed_at": "2022-10-30T23:27:28Z", "releases_url": "https://api.github.com/repos/oxsecurity/megalinter/releases{/id}", - "size": 267014, + "size": 267254, "ssh_url": "git@github.com:oxsecurity/megalinter.git", "stargazers_count": 906, "stargazers_url": "https://api.github.com/repos/oxsecurity/megalinter/stargazers", @@ -1169,8 +1169,8 @@ "downloads_url": "https://api.github.com/repos/onedr0p/home-ops/downloads", "events_url": "https://api.github.com/repos/onedr0p/home-ops/events", "fork": false, - "forks": 101, - "forks_count": 101, + "forks": 102, + "forks_count": 102, "forks_url": "https://api.github.com/repos/onedr0p/home-ops/forks", "full_name": "onedr0p/home-ops", "git_commits_url": "https://api.github.com/repos/onedr0p/home-ops/git/commits{/sha}", @@ -1205,7 +1205,7 @@ "milestones_url": "https://api.github.com/repos/onedr0p/home-ops/milestones{/number}", "mirror_url": null, "name": "home-ops", - "network_count": 101, + "network_count": 102, "node_id": "MDEwOlJlcG9zaXRvcnkyMzA5OTk4MjY=", "notifications_url": "https://api.github.com/repos/onedr0p/home-ops/notifications{?since,all,participating}", "open_issues": 6, @@ -1232,9 +1232,9 @@ }, "private": false, "pulls_url": "https://api.github.com/repos/onedr0p/home-ops/pulls{/number}", - "pushed_at": "2022-10-29T23:03:28Z", + "pushed_at": "2022-10-31T00:11:35Z", "releases_url": "https://api.github.com/repos/onedr0p/home-ops/releases{/id}", - "size": 27402, + "size": 27404, "ssh_url": "git@github.com:onedr0p/home-ops.git", "stargazers_count": 656, "stargazers_url": "https://api.github.com/repos/onedr0p/home-ops/stargazers", @@ -1330,8 +1330,8 @@ "network_count": 79, "node_id": "MDEwOlJlcG9zaXRvcnkxNzAzMTA5NA==", "notifications_url": "https://api.github.com/repos/unixorn/zsh-quickstart-kit/notifications{?since,all,participating}", - "open_issues": 9, - "open_issues_count": 9, + "open_issues": 7, + "open_issues_count": 7, "owner": { "avatar_url": "https://avatars.githubusercontent.com/u/23920?v=4", "events_url": "https://api.github.com/users/unixorn/events{/privacy}", @@ -1354,9 +1354,9 @@ }, "private": false, "pulls_url": "https://api.github.com/repos/unixorn/zsh-quickstart-kit/pulls{/number}", - "pushed_at": "2022-10-30T18:32:19Z", + "pushed_at": "2022-10-30T22:51:19Z", "releases_url": "https://api.github.com/repos/unixorn/zsh-quickstart-kit/releases{/id}", - "size": 415, + "size": 416, "ssh_url": "git@github.com:unixorn/zsh-quickstart-kit.git", "stargazers_count": 582, "stargazers_url": "https://api.github.com/repos/unixorn/zsh-quickstart-kit/stargazers", @@ -1699,8 +1699,8 @@ "downloads_url": "https://api.github.com/repos/KelvinTegelaar/CIPP/downloads", "events_url": "https://api.github.com/repos/KelvinTegelaar/CIPP/events", "fork": false, - "forks": 1530, - "forks_count": 1530, + "forks": 1532, + "forks_count": 1532, "forks_url": "https://api.github.com/repos/KelvinTegelaar/CIPP/forks", "full_name": "KelvinTegelaar/CIPP", "git_commits_url": "https://api.github.com/repos/KelvinTegelaar/CIPP/git/commits{/sha}", @@ -1735,7 +1735,7 @@ "milestones_url": "https://api.github.com/repos/KelvinTegelaar/CIPP/milestones{/number}", "mirror_url": null, "name": "CIPP", - "network_count": 1530, + "network_count": 1532, "node_id": "R_kgDOGNiHEA", "notifications_url": "https://api.github.com/repos/KelvinTegelaar/CIPP/notifications{?since,all,participating}", "open_issues": 3, @@ -1766,7 +1766,7 @@ "releases_url": "https://api.github.com/repos/KelvinTegelaar/CIPP/releases{/id}", "size": 63935, "ssh_url": "git@github.com:KelvinTegelaar/CIPP.git", - "stargazers_count": 431, + "stargazers_count": 432, "stargazers_url": "https://api.github.com/repos/KelvinTegelaar/CIPP/stargazers", "statuses_url": "https://api.github.com/repos/KelvinTegelaar/CIPP/statuses/{sha}", "subscribers_count": 23, @@ -1778,15 +1778,15 @@ "temp_clone_token": null, "topics": [], "trees_url": "https://api.github.com/repos/KelvinTegelaar/CIPP/git/trees{/sha}", - "updated_at": "2022-10-30T05:08:25Z", + "updated_at": "2022-10-30T22:35:55Z", "url": "https://api.github.com/repos/KelvinTegelaar/CIPP", "visibility": "public", - "watchers": 431, - "watchers_count": 431, + "watchers": 432, + "watchers_count": 432, "web_commit_signoff_required": false }, "repo_url": "https://github.com/KelvinTegelaar/CIPP", - "stargazers": 431 + "stargazers": 432 }, { "info": { @@ -2095,8 +2095,8 @@ "network_count": 98, "node_id": "MDEwOlJlcG9zaXRvcnk2MjAyNjA3NQ==", "notifications_url": "https://api.github.com/repos/ruzickap/packer-templates/notifications{?since,all,participating}", - "open_issues": 4, - "open_issues_count": 4, + "open_issues": 2, + "open_issues_count": 2, "owner": { "avatar_url": "https://avatars.githubusercontent.com/u/1434387?v=4", "events_url": "https://api.github.com/users/ruzickap/events{/privacy}", @@ -2119,9 +2119,9 @@ }, "private": false, "pulls_url": "https://api.github.com/repos/ruzickap/packer-templates/pulls{/number}", - "pushed_at": "2022-10-30T04:06:44Z", + "pushed_at": "2022-10-30T20:37:05Z", "releases_url": "https://api.github.com/repos/ruzickap/packer-templates/releases{/id}", - "size": 1046, + "size": 1048, "ssh_url": "git@github.com:ruzickap/packer-templates.git", "stargazers_count": 337, "stargazers_url": "https://api.github.com/repos/ruzickap/packer-templates/stargazers", @@ -2640,7 +2640,7 @@ }, "private": false, "pulls_url": "https://api.github.com/repos/bjw-s/home-ops/pulls{/number}", - "pushed_at": "2022-10-29T12:52:03Z", + "pushed_at": "2022-10-31T00:30:04Z", "releases_url": "https://api.github.com/repos/bjw-s/home-ops/releases{/id}", "size": 32450, "ssh_url": "git@github.com:bjw-s/home-ops.git", @@ -2881,9 +2881,9 @@ }, "private": false, "pulls_url": "https://api.github.com/repos/toboshii/home-ops/pulls{/number}", - "pushed_at": "2022-10-30T13:34:26Z", + "pushed_at": "2022-10-30T21:17:19Z", "releases_url": "https://api.github.com/repos/toboshii/home-ops/releases{/id}", - "size": 2726, + "size": 2727, "ssh_url": "git@github.com:toboshii/home-ops.git", "stargazers_count": 140, "stargazers_url": "https://api.github.com/repos/toboshii/home-ops/stargazers", @@ -3264,9 +3264,9 @@ }, "private": false, "pulls_url": "https://api.github.com/repos/carpenike/k8s-gitops/pulls{/number}", - "pushed_at": "2022-10-30T00:51:14Z", + "pushed_at": "2022-10-30T21:19:18Z", "releases_url": "https://api.github.com/repos/carpenike/k8s-gitops/releases{/id}", - "size": 123983, + "size": 123984, "ssh_url": "git@github.com:carpenike/k8s-gitops.git", "stargazers_count": 116, "stargazers_url": "https://api.github.com/repos/carpenike/k8s-gitops/stargazers", @@ -3387,7 +3387,7 @@ "releases_url": "https://api.github.com/repos/meichthys/foss_photo_libraries/releases{/id}", "size": 85, "ssh_url": "git@github.com:meichthys/foss_photo_libraries.git", - "stargazers_count": 115, + "stargazers_count": 116, "stargazers_url": "https://api.github.com/repos/meichthys/foss_photo_libraries/stargazers", "statuses_url": "https://api.github.com/repos/meichthys/foss_photo_libraries/statuses/{sha}", "subscribers_count": 8, @@ -3399,15 +3399,15 @@ "temp_clone_token": null, "topics": [], "trees_url": "https://api.github.com/repos/meichthys/foss_photo_libraries/git/trees{/sha}", - "updated_at": "2022-10-30T16:15:23Z", + "updated_at": "2022-10-30T20:58:22Z", "url": "https://api.github.com/repos/meichthys/foss_photo_libraries", "visibility": "public", - "watchers": 115, - "watchers_count": 115, + "watchers": 116, + "watchers_count": 116, "web_commit_signoff_required": false }, "repo_url": "https://github.com/meichthys/foss_photo_libraries", - "stargazers": 115 + "stargazers": 116 }, { "info": { @@ -4411,8 +4411,8 @@ "network_count": 111, "node_id": "MDEwOlJlcG9zaXRvcnkyMjQ4Nzg3ODA=", "notifications_url": "https://api.github.com/repos/Azure/ARO-RP/notifications{?since,all,participating}", - "open_issues": 161, - "open_issues_count": 161, + "open_issues": 158, + "open_issues_count": 158, "organization": { "avatar_url": "https://avatars.githubusercontent.com/u/6844498?v=4", "events_url": "https://api.github.com/users/Azure/events{/privacy}", @@ -4455,9 +4455,9 @@ }, "private": false, "pulls_url": "https://api.github.com/repos/Azure/ARO-RP/pulls{/number}", - "pushed_at": "2022-10-28T19:06:42Z", + "pushed_at": "2022-10-30T21:18:27Z", "releases_url": "https://api.github.com/repos/Azure/ARO-RP/releases{/id}", - "size": 75271, + "size": 75297, "ssh_url": "git@github.com:Azure/ARO-RP.git", "stargazers_count": 69, "stargazers_url": "https://api.github.com/repos/Azure/ARO-RP/stargazers", @@ -4944,9 +4944,9 @@ }, "private": false, "pulls_url": "https://api.github.com/repos/auricom/home-ops/pulls{/number}", - "pushed_at": "2022-10-30T18:26:22Z", + "pushed_at": "2022-10-30T21:18:48Z", "releases_url": "https://api.github.com/repos/auricom/home-ops/releases{/id}", - "size": 6644, + "size": 6645, "ssh_url": "git@github.com:auricom/home-ops.git", "stargazers_count": 57, "stargazers_url": "https://api.github.com/repos/auricom/home-ops/stargazers", @@ -5888,9 +5888,9 @@ }, "private": false, "pulls_url": "https://api.github.com/repos/jr0dd/home-ops/pulls{/number}", - "pushed_at": "2022-10-30T00:58:07Z", + "pushed_at": "2022-10-30T22:09:27Z", "releases_url": "https://api.github.com/repos/jr0dd/home-ops/releases{/id}", - "size": 5718, + "size": 5720, "ssh_url": "git@github.com:jr0dd/home-ops.git", "stargazers_count": 34, "stargazers_url": "https://api.github.com/repos/jr0dd/home-ops/stargazers", @@ -6623,9 +6623,9 @@ }, "private": false, "pulls_url": "https://api.github.com/repos/0dragosh/homelab/pulls{/number}", - "pushed_at": "2022-10-29T12:16:31Z", + "pushed_at": "2022-10-30T22:30:09Z", "releases_url": "https://api.github.com/repos/0dragosh/homelab/releases{/id}", - "size": 4163, + "size": 4164, "ssh_url": "git@github.com:0dragosh/homelab.git", "stargazers_count": 26, "stargazers_url": "https://api.github.com/repos/0dragosh/homelab/stargazers", diff --git a/CHANGELOG.md b/CHANGELOG.md index f435cfce997..8769f741823 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,8 +10,8 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l - Replace `set-output` usage with `GITHUB_OUTPUT` - New MegaLinter plugin: [mustache](https://github.com/one-acre-fund/mega-linter-plugin-logstash): Plugin to validate [Logstash](https://www.elastic.co/guide/en/logstash/current/configuration.html) pipeline definition files using [mustache](https://github.com/breml/logstash-config), by [Yann Jouanique](https://github.com/Yann-J) - - Add the SPELL_*_FILE_EXTENSIONS parameter for each SPELL type linter. If set, it will use this value to filter instead of the default behavior which is to parse the files of all other linters executed ([#1997](https://github.com/oxsecurity/megalinter/issues/1997)). +- Allow cspell to also analyze file names (new variable SPELL_CSPELL_ANALYZE_FILE_NAMES) ([#2009](https://github.com/oxsecurity/megalinter/issues/2009)) - Linter versions upgrades - [djlint](https://djlint.com/) from 1.19.2 to **1.0.3** on 2022-10-24 diff --git a/docs/descriptors/spell_cspell.md b/docs/descriptors/spell_cspell.md index a57e792c3d3..df9bb12406e 100644 --- a/docs/descriptors/spell_cspell.md +++ b/docs/descriptors/spell_cspell.md @@ -6,6 +6,8 @@ MegaLinter generates content of a `.cspell.json` config file at the end of its T Copy it at the root of your repository, read it, remove real spelling errors (after have corrected them in the source), and you're good to go ! +If you do not want cspell to analyze the files names, define `SPELL_CSPELL_ANALYZE_FILE_NAMES` to `false` + ## cspell documentation - Version in MegaLinter: **6.13.1** @@ -20,20 +22,21 @@ Copy it at the root of your repository, read it, remove real spelling errors (af - Enable cspell by adding `SPELL_CSPELL` in [ENABLE_LINTERS variable](https://oxsecurity.github.io/megalinter/beta/configuration/#activation-and-deactivation) - Disable cspell by adding `SPELL_CSPELL` in [DISABLE_LINTERS variable](https://oxsecurity.github.io/megalinter/beta/configuration/#activation-and-deactivation) -| Variable | Description | Default value | -|------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------| -| SPELL_CSPELL_ARGUMENTS | User custom arguments to add in linter CLI call
Ex: `-s --foo "bar"` | | -| SPELL_CSPELL_FILTER_REGEX_INCLUDE | Custom regex including filter
Ex: `(src\|lib)` | Include every file | -| SPELL_CSPELL_FILTER_REGEX_EXCLUDE | Custom regex excluding filter
Ex: `(test\|examples)` | Exclude no file | -| SPELL_CSPELL_CLI_LINT_MODE | Override default CLI lint mode
- `file`: Calls the linter for each file
- `list_of_files`: Call the linter with the list of files as argument
- `project`: Call the linter from the root of the project | `list_of_files` | -| SPELL_CSPELL_FILE_EXTENSIONS | Allowed file extensions. `"*"` matches any extension, `""` matches empty extension. Empty list excludes all files
Ex: `[".py", ""]` | Exclude every file | -| SPELL_CSPELL_FILE_NAMES_REGEX | File name regex filters. Regular expression list for filtering files by their base names using regex full match. Empty list includes all files
Ex: `["Dockerfile(-.+)?", "Jenkinsfile"]` | Include every file | -| SPELL_CSPELL_PRE_COMMANDS | List of bash commands to run before the linter | None | -| SPELL_CSPELL_POST_COMMANDS | List of bash commands to run after the linter | None | -| SPELL_CSPELL_CONFIG_FILE | cspell configuration file name
Use `LINTER_DEFAULT` to let the linter find it | `.cspell.json` | -| SPELL_CSPELL_RULES_PATH | Path where to find linter configuration file | Workspace folder, then MegaLinter default rules | -| SPELL_CSPELL_DISABLE_ERRORS | Run linter but consider errors as warnings | `false` | -| SPELL_CSPELL_DISABLE_ERRORS_IF_LESS_THAN | Maximum number of errors allowed | `0` | +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| SPELL_CSPELL_ANALYZE_FILE_NAMES | If set to `true`, MegaLinter will also send file names to cspell for analysis. Disable by defining `SPELL_CSPELL_ANALYZE_FILE_NAMES` to `false`` | `true` | +| SPELL_CSPELL_ARGUMENTS | User custom arguments to add in linter CLI call
Ex: `-s --foo "bar"` | | +| SPELL_CSPELL_FILTER_REGEX_INCLUDE | Custom regex including filter
Ex: `(src\|lib)` | Include every file | +| SPELL_CSPELL_FILTER_REGEX_EXCLUDE | Custom regex excluding filter
Ex: `(test\|examples)` | Exclude no file | +| SPELL_CSPELL_CLI_LINT_MODE | Override default CLI lint mode
- `file`: Calls the linter for each file
- `list_of_files`: Call the linter with the list of files as argument
- `project`: Call the linter from the root of the project | `list_of_files` | +| SPELL_CSPELL_FILE_EXTENSIONS | Allowed file extensions. `"*"` matches any extension, `""` matches empty extension. Empty list excludes all files
Ex: `[".py", ""]` | Exclude every file | +| SPELL_CSPELL_FILE_NAMES_REGEX | File name regex filters. Regular expression list for filtering files by their base names using regex full match. Empty list includes all files
Ex: `["Dockerfile(-.+)?", "Jenkinsfile"]` | Include every file | +| SPELL_CSPELL_PRE_COMMANDS | List of bash commands to run before the linter| None | +| SPELL_CSPELL_POST_COMMANDS | List of bash commands to run after the linter| None | +| SPELL_CSPELL_CONFIG_FILE | cspell configuration file name
Use `LINTER_DEFAULT` to let the linter find it | `.cspell.json` | +| SPELL_CSPELL_RULES_PATH | Path where to find linter configuration file | Workspace folder, then MegaLinter default rules | +| SPELL_CSPELL_DISABLE_ERRORS | Run linter but consider errors as warnings | `false` | +| SPELL_CSPELL_DISABLE_ERRORS_IF_LESS_THAN | Maximum number of errors allowed | `0` | ## IDE Integration diff --git a/megalinter/descriptors/markdown.megalinter-descriptor.yml b/megalinter/descriptors/markdown.megalinter-descriptor.yml index f35da0d0f5f..afc6846250f 100644 --- a/megalinter/descriptors/markdown.megalinter-descriptor.yml +++ b/megalinter/descriptors/markdown.megalinter-descriptor.yml @@ -14,9 +14,8 @@ linters: variable: MARKDOWN_DEFAULT_STYLE expected_value: markdownlint default_value: markdownlint - linter_text: - Checks for errors in Markdown files, and can also auto-fix some of them. - + linter_text: Checks for errors in Markdown files, and can also auto-fix some of them. + [MarkdownLint](https://github.com/DavidAnson/markdownlint) is run through [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli) diff --git a/megalinter/descriptors/spell.megalinter-descriptor.yml b/megalinter/descriptors/spell.megalinter-descriptor.yml index c747ae9a46a..9b510111f54 100644 --- a/megalinter/descriptors/spell.megalinter-descriptor.yml +++ b/megalinter/descriptors/spell.megalinter-descriptor.yml @@ -35,10 +35,16 @@ linters: - class: CSpellLinter linter_name: cspell name: SPELL_CSPELL + variables: + - name: SPELL_CSPELL_ANALYZE_FILE_NAMES + default_value: "true" + description: If set to `true`, MegaLinter will also send file names to cspell for analysis. Disable by defining `SPELL_CSPELL_ANALYZE_FILE_NAMES` to `false`` linter_text: | MegaLinter generates content of a `.cspell.json` config file at the end of its TextReporter artifact - + Copy it at the root of your repository, read it, remove real spelling errors (after have corrected them in the source), and you're good to go ! + + If you do not want cspell to analyze the files names, define `SPELL_CSPELL_ANALYZE_FILE_NAMES` to `false` linter_url: https://github.com/streetsidesoftware/cspell/tree/master/packages/cspell linter_repo: https://github.com/streetsidesoftware/cspell linter_image_url: https://streetsidesoftware.gallerycdn.vsassets.io/extensions/streetsidesoftware/code-spell-checker/1.9.2/1601218033318/Microsoft.VisualStudio.Services.Icons.Default diff --git a/megalinter/linters/CSpellLinter.py b/megalinter/linters/CSpellLinter.py index 5e2d17fcf8a..dd379f79262 100644 --- a/megalinter/linters/CSpellLinter.py +++ b/megalinter/linters/CSpellLinter.py @@ -7,12 +7,36 @@ import logging import os import re +import tempfile +import uuid -from megalinter import Linter, utils +from megalinter import Linter, config, utils from megalinter.constants import DEFAULT_REPORT_FOLDER_NAME class CSpellLinter(Linter): + def build_lint_command(self, file=None) -> list: + # Create temp file with files segments + if ( + self.cli_lint_mode == "list_of_files" + and self.files is not None + and len(self.files) > 0 + and config.get("SPELL_CSPELL_ANALYZE_FILE_NAMES", "true") == "true" + ): + file_names_txt = "" + for file_path in self.files: + file_path = re.sub("[^0-9a-zA-Z]+", " ", os.path.splitext(file_path)[0]) + file_names_txt += file_path + "\n" + temp_file_name = ( + tempfile.gettempdir() + + os.path.sep + + str(uuid.uuid4()) + + "-megalinter_file_names_cspell.txt" + ) + with open(temp_file_name, "w", encoding="utf-8") as f: + f.write(file_names_txt) + self.files += [temp_file_name] + return super().build_lint_command(file) # Provide additional details in text reporter logs # noinspection PyMethodMayBeStatic