Simple way to enforce a specific assignment operator without XPath.
Examples
if (FALSE) { # \dontrun{
# Prefer <- (most common)
use_arrow <- enforce_assignment_operator("<-")
# Prefer =
use_equals <- enforce_assignment_operator("=")
test_linter(use_arrow, "x = 5", should_lint = TRUE)
test_linter(use_arrow, "x <- 5", should_lint = FALSE)
} # }