Skip to content
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

lintr style code check for Bioconductor #62

Open
nturaga opened this issue May 6, 2020 · 2 comments
Open

lintr style code check for Bioconductor #62

nturaga opened this issue May 6, 2020 · 2 comments
Labels
Intermediate Intermediate level Hackathon project

Comments

@nturaga
Copy link
Contributor

nturaga commented May 6, 2020

Implement a BiocLint() function which takes in an .R file(s) and returns lines in the code which need to be improved.

lintr: https://github.com/jimhester/lintr#project-configuration

Goal: Create a new .lintr file (lintr configuration file)

@nturaga nturaga added the Beginner Beginner level Hackathon project label May 6, 2020
@mtmorgan mtmorgan added Intermediate Intermediate level Hackathon project and removed Beginner Beginner level Hackathon project labels May 6, 2020
@LiNk-NY
Copy link
Contributor

LiNk-NY commented May 6, 2020

Here is a starter .lintr configuration file

linters: with_defaults(
    assignment_linter,
    absolute_paths_linter,
    no_tab_linter,
    camel_case_linter = NULL,
    snake_case_linter,
    closed_curly_linter = NULL,
    commented_code_linter = NULL,
    open_curly_linter = NULL,
    line_length_linter(80),
    multiple_dots_linter,
    single_quotes_linter = NULL,
    spaces_left_parentheses_linter,
    trailing_whitespace_linter
  )

@lcolladotor
Copy link
Contributor

Hi,

Sorry, I'm new to lintr (I've seen the name here and there before, haven't dived into it). When I first quickly looked at it, it seemed to me that BiocCheck was already doing something similar.

If so, is the idea to have BiocCheck rely on lintr for all the formatting checks?

If so, it might be good to have an example .R file that fails the formatting checks to test this on as well as see if any auto-formatting tools like in #57 help resolve these issues or most of them.

Best,
Leo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Intermediate Intermediate level Hackathon project
Projects
None yet
Development

No branches or pull requests

5 participants