Closed mschilli87 closed 7 years ago
I think object_usage_linter
will be hard to satisfy (see http://stackoverflow.com/q/9439256/2451238).
Even though I think it makes sense (what happens if your data.frame
doesn't have a column of that name?), and I'd be willing to replace aes
by aes_string
(see http://stackoverflow.com/a/12429344/2451238) without really solving the underlying 'problem', I have no clue how to 'fix' this for data.table
s.
@retaj: Any thoughts on this?
edit: See bf41f5bd3c3a91ad0cdb2d50e3c9bdf7ab3685f0 to see what object_usage_linter
complains about.
I think we definitely should satisfy absolute_paths_linter
, but I don't know what part of code is just some old leftover test and how to adjust the parts that cannot be deleted (yet).
@retaj: Can you have a look at 78551cb81730c98939dbd46e73eb7870b01cca6c and point me to how to work around the absolute paths?
test_load_data.R should be excluded from linting, it's just my debugging scrapbook...
object_usage_linter should be ignored (just like a bunch of R CMD check notes that get raised when it encounters ggplot2, data.table or plyr code). I know there are workarounds, but I don't think we should obfuscate our code to satisfy outdated checks and styling guidelines.
multiple_dots_lintr
chokes on names like circ.gr.reduced
or collapse.to.other
:
Words within variable and function names should be separated by '_' rather than '.'
camel_case_linter
(obviously) has a problem with things likecolData
,queryHits
androwRanges
that would need conversion of somex$y
tox[["y"]]
plus explicit usage of::
to explicetely exclude foreign function names from linting: Variable and function names should be all lowercase.
My guess is that we'd rather keep these linters disabled instead of re-naming functions/variables and/or go all [[
/::
(at least for now).
@retaj: Do you agree?
If so, I will remove them from the todo list of this issue and once you have resolved #30, I can finish off this one for good.
I think both dots and underscores in variable names are fine. Guess each style guide has a different preference (e.g. google style guide is strictly against underscores in R function names), but most people are comparably good at reading variable.names, variable_names and variableNames.
I would keep these two off...
The following
lintr
linters currently cannot be enabled without breaking the tests:infix_spaces_linter
(0d0bfe8dac2baf9d1a820f75213fc92272e72584)camel_case_linter
line_length_linter
(994540090829d993ef43a48e457c5013c7f10b80)single_quotes_linter
(c0bbfae1fac6ed824715f23be47b036d4c3f2614)multiple_dots_linter
assignment_linter
(db3f2d973c4e960a8422ed7f18d674d7be92e20f)commas_linter
(9e2b16a9f754aef39f664e84254fffe63e0aab4d)commented_code_linter
(b87b4539d89391531531c35eab0a5d6c568fc26d)object_usage_linter
(bf41f5bd3c3a91ad0cdb2d50e3c9bdf7ab3685f0)spaces_left_parentheses_linter
(2cab2062778895c6c514450b61f01ded88c0e8b1)absolute_paths_linter
(0f9b7b9b427d8984b919c325cc102cffedbb06eb)object_length_linter
(b3df7acc0da4a87101244cb3b5dc3e6ff5064aa5)open_curly_linter
(cbdf6d7c3ca6d2c0a87c56b38dece718696e3caa)closed_curly_linter
(78cbbc9cc82eb07fb2d1299b45e5eb9362b31132)no_tab_linter
(5d450b30570eaa51227ce7543849fcb3cbd234fd)trailing_blank_lines_linter
(53d0cbc1c4a8f6de2bd39fd6cb4efd4d4fa78bc7)Unless we agree to skip any of those for some specifc reason, the code should be adjusted accordingly and the linters be part of the test suite.