Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow cspell to work with CLI_LINT_MODE=project #4629

Merged
merged 2 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l

- Fixes
- [GH-4610](https://github.com/oxsecurity/megalinter/issues/4610) : PHP CS Fixer linter version available is not correct since running on PHP 8.4 runtime (by @llaville)
- Allow cspell to work with CLI_LINT_MODE=project
- Downgrade npm-groovy-lint until it's fixed

- Reporters
Expand Down
7 changes: 7 additions & 0 deletions megalinter/linters/CSpellLinter.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ def build_lint_command(self, file=None) -> list:
"[cspell] Unable to check file names on a readonly workspace: "
+ str(e)
)
# Add . parameter if cli_lint_mode is project
if (
self.cli_lint_mode == "project"
and "." not in self.cli_lint_extra_args_after
and "." not in self.cli_lint_extra_args
):
self.cli_lint_extra_args_after.append(".")
return super().build_lint_command(file)

# Remove temp file with file names if existing
Expand Down
Loading