You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> expect_lint(txt, list("should be snake_case", line_number=3), linter)
Error in vapply(x, `[[`, character(1), "message") :
values must be length 1,
but FUN(X[[1]]) result is length 2
In addition: Warning messages:
1: In if (!matches_styles(name, style)) { :
the condition has length > 1 and only the first element will be used
2: In if (!matches_styles(name, style)) { :
the condition has length > 1 and only the first element will be used
3: In if (!matches_styles(name, style)) { :
the condition has length > 1 and only the first element will be used
Proposed:
> expect_lint(txt, list("should be snake_case or lowerCamelCase", line_number=3), linter)
>
I realize it's usually far better to pick one naming style and stick to it, but today I'm writing a package whose interface is dictated by two incompatible upstream APIs, so I'd like to allow "snake_case or dotted.case, but no others". Since users would need to explicitly opt into it by specifying multiple styles, I submit that this change doesn't pose too much of a moral hazard :)
Since matches_styles already returns a vector, I think this should be easy to implement and I can take a stab at it if y'all are OK with the concept.
The text was updated successfully, but these errors were encountered:
Current behavior:
Proposed:
I realize it's usually far better to pick one naming style and stick to it, but today I'm writing a package whose interface is dictated by two incompatible upstream APIs, so I'd like to allow "snake_case or dotted.case, but no others". Since users would need to explicitly opt into it by specifying multiple styles, I submit that this change doesn't pose too much of a moral hazard :)
Since
matches_styles
already returns a vector, I think this should be easy to implement and I can take a stab at it if y'all are OK with the concept.The text was updated successfully, but these errors were encountered: