-
Notifications
You must be signed in to change notification settings - Fork 188
fix symbols style #698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix symbols style #698
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,8 @@ object_name_linter <- function(styles = c("snake_case", "symbols")) { | |
|
||
# Retrieve assigned name | ||
nms <- strip_names( | ||
as.character(xml2::xml_find_first(assignments, "./text()"))) | ||
xml2::xml_text(xml2::xml_find_first(assignments, "./text()")) | ||
) | ||
|
||
generics <- strip_names(c( | ||
declared_s3_generics(xml), | ||
|
@@ -283,7 +284,7 @@ loweralnum <- rex(one_of(lower, digit)) | |
upperalnum <- rex(one_of(upper, digit)) | ||
|
||
style_regexes <- list( | ||
"symbols" = rex(start, maybe("."), zero_or_more(none_of(alnum)), end), | ||
"symbols" = rex(start, zero_or_more(none_of(alnum)), end), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The empty name can occur here because symbols like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this feels somewhat hacky... but OK for now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The reason is the other styles should allow e.g. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As long as applying those rules in the same order always works, we're OK, I'm just not 100% sure of that. |
||
"CamelCase" = rex(start, maybe("."), upper, zero_or_more(alnum), end), | ||
"camelCase" = rex(start, maybe("."), lower, zero_or_more(alnum), end), | ||
"snake_case" = rex(start, maybe("."), some_of(lower, digit), any_of("_", lower, digit), end), | ||
|
Uh oh!
There was an error while loading. Please reload this page.