Giter VIP home page Giter VIP logo

Comments (3)

jimhester avatar jimhester commented on July 29, 2024

Tim,

First I agree with you about lintr passing its own linting. One of the reasons you are getting more lints than I would be is I have my default line length linter set to 120 rather than 80 characters. I am currently in the process of supporting per-project lint settings, which will clear up that issue. However there are still other lints which I need to fix in lintr.

However these warnings you mentioned are disturbing to me. I have options(warnPartialMatchings = TRUE) and I do not get this. Are you using the CRAN version of linter or the latest development version? Running devtools::session_info() will tell us exactly what commit you are using.

from lintr.

ttriche avatar ttriche commented on July 29, 2024

after a bit of futzing, and reading your note regarding 80 vs. 120 char lines, I'm reasonably confident that the non-line-length complaints are due to things (like .onLoad) that are baked into R. That said, here's my session info, and the pull request will be coming shortly (mostly just a bit of tidying and addition of names.lints / split.lints to ease exploration of output from lint_package).

Session info -------------------------------------------------------------------
 setting  value                       
 version  R version 3.1.2 (2014-10-31)
 system   x86_64, linux-gnu           
 ui       X11                         
 language en_US                       
 collate  en_US.UTF-8                 
 tz       <NA>                        

Packages -----------------------------------------------------------------------
 package       * version    date       source                           
 assertthat    * 0.1        2013-12-06 CRAN (R 3.1.2)                   
 bigrquery       0.1        2015-01-03 Github (hadley/bigrquery@51069ea)
 BiocInstaller   1.16.1     2015-01-02 Bioconductor                     
 codetools     * 0.2-10     2015-01-17 CRAN (R 3.1.2)                   
 crayon        * 1.1.0      2014-10-15 CRAN (R 3.1.2)                   
 DBI           * 0.3.1      2014-09-24 CRAN (R 3.1.2)                   
 devtools      * 1.7.0      2015-01-17 CRAN (R 3.1.2)                   
 dplyr           0.4.1      2015-01-14 CRAN (R 3.1.2)                   
 gtools          3.4.1      2014-05-28 CRAN (R 3.1.2)                   
 httr          * 0.6.1      2015-01-01 CRAN (R 3.1.2)                   
 igraph        * 0.7.1      2014-04-22 CRAN (R 3.1.2)                   
 lazyeval      * 0.1.10     2015-01-02 CRAN (R 3.1.2)                   
 lintr           0.2.1.9000 2015-02-05 local                            
 magrittr      * 1.5        2014-11-22 CRAN (R 3.1.2)                   
 Rcpp          * 0.11.4     2015-01-24 CRAN (R 3.1.2)                   
 rex           * 0.2.0      2014-11-26 CRAN (R 3.1.2)                   
 rstudioapi    * 0.2        2014-12-31 CRAN (R 3.1.2)                   
 stringdist    * 0.9.0      2015-01-10 CRAN (R 3.1.2)                   
 stringr       * 0.6.2      2012-12-06 CRAN (R 3.1.2)                   

from lintr.

jimhester avatar jimhester commented on July 29, 2024

Also Tim in terms of enforcing camelCase instead of snake_case the easiest way to do it is with with_defaults(). You turn off a given linter by using a value of NULL for it.

lint_package(".", 
  linters = with_defaults(
    object_camel_case_linter = NULL,
    object_snake_case_linter
  )
)

Or to also only lint for lines over 120

lint_package(".", 
  linters = with_defaults(
    object_camel_case_linter = NULL,
    object_snake_case_linter,
    line_length_linter(120)
  )
)

from lintr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.