We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
{}
Based on Hadley's suggestion: https://github.com/hadley/adv-r/blob/dc49c3872c3530ac08716fd4f4c235b01266a4ce/S4.Rmd#L345-L352
It is bad practice to use {} in the generic as it triggers a special case that is more expensive, and generally best avoided. # Don't do this! setGeneric("myGeneric", function(x) { standardGeneric("myGeneric") })
It is bad practice to use {} in the generic as it triggers a special case that is more expensive, and generally best avoided.
# Don't do this! setGeneric("myGeneric", function(x) { standardGeneric("myGeneric") })
Would it be a good idea to create a lint for this rule?
Linking with: insightsengineering/teal.code#109
The text was updated successfully, but these errors were encountered:
SGTM. It will be part of brace_linter(). Note that there are two things:
brace_linter()
{
def=
setGeneric
\(...) { ... }
function(...) { ... }
The latter can come up for long definitions like
setGeneric( "myLongGeneric", function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) standardGeneric("myLongGeneric") )
where bumping the line is used to avoid line_length_linter() hits.
line_length_linter()
Sorry, something went wrong.
Hmm actually in the multi-line case, {styler} will auto-include the { as well. So might need a companion issue, WDYT @lorenzwalthert?
cc also @IndrajeetPatil as our designated liaison :)
Linking {styler} tracker: r-lib/styler#1141
No branches or pull requests
Based on Hadley's suggestion:
https://github.com/hadley/adv-r/blob/dc49c3872c3530ac08716fd4f4c235b01266a4ce/S4.Rmd#L345-L352
Would it be a good idea to create a lint for this rule?
Linking with:
insightsengineering/teal.code#109
The text was updated successfully, but these errors were encountered: