Comments (2)
It's a great recommendation, though maybe tough to come up with much robust enough to avoid false positives.
from lintr.
This would be possible if we could somehow determine whether a function is pure or not.
A completely correct implementation is probably not feasible unless functions are annotated in some way.
Untested thoughts on how to cause headaches:
l <- as.list(1:5)
meany <- function() assign("l", c(41, 42), envir = parent.frame())
lapply(l, function(x) {
meany()
x / sd(unlist(l))
})
from lintr.
Related Issues (20)
- 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
- New linter for if(all.equal(...)) HOT 2
- New linter for multiple assignments
- Lint `rev(sort(x))` pattern in `seq_linter()` in favour of the more efficient alternative
- Lint `deparse(substitute(x))` for `deparse1(substitute(x))` HOT 2
- False positive in return_linter(return_style="explicit") when the formals are complex
- .Rnw named chunks like <<name>> is an error (missing chunk end)
- Scoping `{meta.lintr}` HOT 1
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.