Skip to content
New issue

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

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

Already on GitHub? # to your account

Styler and lintr disagree on what happens after a linebreak #1188

Closed
dsweber2 opened this issue Mar 27, 2024 · 3 comments
Closed

Styler and lintr disagree on what happens after a linebreak #1188

dsweber2 opened this issue Mar 27, 2024 · 3 comments

Comments

@dsweber2
Copy link

Styler auto-formats to:

  if (TRUE ||
    FALSE) {
    TRUE
  }

While linter prefers:

  if (TRUE ||
        FALSE) {
    TRUE
  }

I don't really have strong opinions on which of these should happen, I would just like my tools to not contradict each other. It makes CI a mess.
paired issue r-lib/lintr#2535

@dshemetov
Copy link

My workaround for this has been

if (
  TRUE ||
    FALSE
) {
  TRUE
}

@MichaelChirico
Copy link
Contributor

possible duplicate of #1065, which also points to an open issue in the style guide about trying to clarify such cases upstream: tidyverse/style#197

@IndrajeetPatil
Copy link
Collaborator

Yes, duplicate of #1065

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants