Skip to content

allow_lazy argument for implicit_assignment_linter to skip lazy assignment - #2140

Merged
MichaelChirico merged 12 commits into
mainfrom
implicit-lazy
Sep 14, 2023
Merged

MichaelChirico merged 12 commits into
mainfrom
implicit-lazy

Conversation

@MichaelChirico

@MichaelChirico MichaelChirico commented Sep 11, 2023 •

Copy link
Copy Markdown
Collaborator

Closes #2016.

Base automatically changed from implicit-paren to main September 13, 2023 23:01
@codecov-commenter

codecov-commenter commented Sep 13, 2023 •

Copy link
Copy Markdown

Codecov Report

Merging #2140 (4eaf209) into main (5f18b79) will increase coverage by 0.00%.
The diff coverage is 100.00%.

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

@@           Coverage Diff           @@
##             main    #2140   +/-   ##
=======================================
  Coverage   99.64%   99.64%           
=======================================
  Files         112      112           
  Lines        5122     5124    +2     
=======================================
+ Hits         5104     5106    +2     
  Misses         18       18           
Files Changed Coverage Δ
R/implicit_assignment_linter.R 100.00% <100.00%> (ø)

@AshesITR AshesITR left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not sure if lazy assignment in an || expression can be useful. LGTM, though.

Comment thread NEWS.md Resolved
@MichaelChirico

Copy link
Copy Markdown
Collaborator Author

Not sure if lazy assignment in an || expression can be useful. LGTM, though.

I found at least 50 cases using it in whatever repos I have cloned locally, here's a neat example:

https://github.com/r-devel/r-svn/blob/b50422e6f5ecaa0fa6a297bbd32d7a1e24b4ac35/src/library/tools/R/build.R#L438

@IndrajeetPatil

This comment was marked as outdated.

@MichaelChirico

This comment was marked as outdated.

@MichaelChirico

This comment was marked as outdated.

@MichaelChirico
MichaelChirico merged commit 4c88419 into main Sep 14, 2023
@MichaelChirico
MichaelChirico deleted the implicit-lazy branch September 14, 2023 22:02
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.

New argument for implicit_assignment_linter allowing lazy assignment

4 participants