r-lib / lintr

Static Code Analysis for R
https://lintr.r-lib.org
Other
1.16k stars 184 forks source link

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

Open dsweber2 opened 3 months ago

dsweber2 commented 3 months ago

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: https://github.com/r-lib/styler/issues/1188

IndrajeetPatil commented 3 months ago

I think this is the same issue as https://github.com/r-lib/lintr/issues/2034

MichaelChirico commented 3 months ago

Solution may well be the same but the offending code looks different enough I'll leave this open for now.