Comments (3)
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.
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.
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)
- `paste_linter()` doesn't work as expected with pipes HOT 1
- pattern= should be a configurable setting in lint_dir()
- `min_r_version_linter()` to detect invalid or missing minimum R version in R package HOT 5
- Lint `seq_len(length(x))` HOT 4
- New function expect_no_lint() akin to expect_no_warning() etc HOT 1
- False positive in `undesirable_function_linter()` HOT 4
- expect_lint() error for missing {testthat} should reference which function called it HOT 6
- Use bulleted list for `{cli}`-formatted messages involving `conditionMessage()`
- Dealing with `object_usage_linter` during local development HOT 16
- Linter to recommend using vectorized functions, when relevant? HOT 3
- Include examples that don't lint for `matrix_apply_linter()`
- Linting is too agressive HOT 2
- Catch ifelse(A [&&-or-||] B, ...) (in vector_logic_linter?)
- New linter to recommend `sequence()` base R function HOT 4
- New linter to recommend `list2DF()` base R function HOT 4
- Probably inappropriate proposals for function argument lintr HOT 11
- Use `{cli}` for progress bar
- Suggestion: add rule for `!isTRUE` -> `isFALSE` HOT 3
- Possible to point out over-broad exclusion '# nolint seq_linter'? HOT 2
- Automatic fixes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lintr.