# Strangely, having something like pattern: length($VAR $OP $VAR2) doesn't work

id: length_test-1
language: r
severity: warning
rule:
  pattern: length($VAR == $VAR2)
fix: length(~~VAR~~) == ~~VAR2~~
message: Checking the length of a logical vector is likely a mistake.

---

id: length_test-2
language: r
severity: warning
rule:
  pattern: length($VAR != $VAR2)
fix: length(~~VAR~~) != ~~VAR2~~
message: Checking the length of a logical vector is likely a mistake.

---

id: length_test-3
language: r
severity: warning
rule:
  pattern: length($VAR > $VAR2)
fix: length(~~VAR~~) > ~~VAR2~~
message: Checking the length of a logical vector is likely a mistake.

---

id: length_test-4
language: r
severity: warning
rule:
  pattern: length($VAR >= $VAR2)
fix: length(~~VAR~~) >= ~~VAR2~~
message: Checking the length of a logical vector is likely a mistake.

---

id: length_test-5
language: r
severity: warning
rule:
  pattern: length($VAR < $VAR2)
fix: length(~~VAR~~) < ~~VAR2~~
message: Checking the length of a logical vector is likely a mistake.

---

id: length_test-6
language: r
severity: warning
rule:
  pattern: length($VAR <= $VAR2)
fix: length(~~VAR~~) <= ~~VAR2~~
message: Checking the length of a logical vector is likely a mistake.
