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

Resolve error with purrr::keep in lintr #2887

Closed
wants to merge 3 commits into from
Closed
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-linter.yml file, or with `oxsecurity/megalinter:beta` docker image

- Fixes
- Fix crashes while collecting R lints with lintr

- Linter versions upgrades
- Secretlint logo - reduce size to 150 and remove background
- [mypy](https://mypy.readthedocs.io/en/stable/) from 1.4.1 to **1.5.0** on 2023-08-11
Expand Down
2 changes: 1 addition & 1 deletion megalinter/linters/RLinter.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def build_lint_command(self, file=None):
r_commands = [
f"lints <- lintr::lint('{file}');",
"print(lints);",
"errors <- purrr::keep(lints, ~ .type == 'error');",
"errors <- purrr::keep(lints, function(x) x$type == 'error');",
"quit(save = 'no', status = if (length(errors) > 0) 1 else 0)",
]
# Build shell command
Expand Down