Skip to content

GH-50537: [R] Fix vector_logic_linter warning by using && in if condition#50538

Merged
thisisnic merged 1 commit into
apache:mainfrom
hiroyuki-sato:topic/fix-r-dplyr-funcs-datetime
Jul 18, 2026
Merged

GH-50537: [R] Fix vector_logic_linter warning by using && in if condition#50538
thisisnic merged 1 commit into
apache:mainfrom
hiroyuki-sato:topic/fix-r-dplyr-funcs-datetime

Conversation

@hiroyuki-sato

@hiroyuki-sato hiroyuki-sato commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Rationale for this change

Fix a vector_logic_linter warning by using && instead of & in an if condition.

Error: Not lint free
R/dplyr-funcs-datetime.R:541:26: warning: [vector_logic_linter] Use `&&` in conditional expressions.
      if (format == "%X" & tolower(Sys.info()[["sysname"]]) == "windows") {

https://github.com/apache/arrow/actions/runs/29632093671/job/88047704304?pr=50536#step:5:76

What changes are included in this PR?

  • Replace & with && in the if condition.

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #50537 has been automatically assigned in GitHub to PR creator.

@hiroyuki-sato

Copy link
Copy Markdown
Collaborator Author

I opened a PR for the R changes, but I’m not very familiar with R. I’d appreciate it if someone with R experience could take a look.

@thisisnic thisisnic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like an update to the lintr package added a new linter a couple of days ago causing this to fail; this fix is spot on, thanks!

@thisisnic
thisisnic merged commit a6897f4 into apache:main Jul 18, 2026
33 checks passed
@thisisnic thisisnic removed the awaiting review Awaiting review label Jul 18, 2026
@github-actions github-actions Bot added the awaiting merge Awaiting merge label Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants