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

skip c() unless >1 argument is used #2019

Merged
merged 1 commit into from
Jul 25, 2023
Merged

skip c() unless >1 argument is used #2019

merged 1 commit into from
Jul 25, 2023

Conversation

MichaelChirico
Copy link
Collaborator

Closes #2017

Confirming this is a regression introduced by 680715f:

git checkout 680715fc5411fcbefed55bff1dc7757d86ae061b~1
Rscript -e 'lintr::lint("\nc(exp())", lintr::inner_combine_linter())'

git checkout 680715fc5411fcbefed55bff1dc7757d86ae061b
Rscript -e 'lintr::lint("\nc(exp())", lintr::inner_combine_linter())'
# <text>:2:1: warning: [inner_combine_linter] Combine inputs to vectorized functions first to take full advantage of vectorization, e.g., exp(c(x, y)) only runs the more expensive exp() once as compared to c(exp(x), exp(y)).
# c(exp())
# ^~~~~~~~

@codecov-commenter
Copy link

Codecov Report

Merging #2019 (a8f579d) into main (25d24c0) will not change coverage.
The diff coverage is 100.00%.

❗ Current head a8f579d differs from pull request most recent head a5170bf. Consider uploading reports for the commit a5170bf to get more accurate results

@@           Coverage Diff           @@
##             main    #2019   +/-   ##
=======================================
  Coverage   98.56%   98.56%           
=======================================
  Files         113      113           
  Lines        5003     5003           
=======================================
  Hits         4931     4931           
  Misses         72       72           
Files Changed Coverage Δ
R/inner_combine_linter.R 100.00% <100.00%> (ø)

Copy link
Collaborator

@IndrajeetPatil IndrajeetPatil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@MichaelChirico MichaelChirico merged commit bd5ea4e into main Jul 25, 2023
21 checks passed
@MichaelChirico MichaelChirico deleted the icl-2017 branch July 25, 2023 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression: inner_combine_linter() throwing for singleton c() calls
3 participants