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

reorganize a bit; add names.lints, split.lints methods; get lintr to pass most of its own lints :-) #49

Merged
merged 1 commit into from
Feb 6, 2015

Conversation

ttriche
Copy link
Contributor

@ttriche ttriche commented Feb 6, 2015

Hopefully the changes will be fairly obvious. The methods are primarily so that I can run a command like:

lints <- lint_package('lintr')
subdir <- Vectorize(function(x) strsplit(sub("./", "", fixed=TRUE, x), "/")[[1]][1])
by_subdir <- split(lints, subdir(lints))

and get something relatively easy to follow

actually_care_about <- grep('80 characters', vapply(by_subdir$R, `[[`, character(1), 'message'), invert=TRUE)
by_subdir$R[ actually_care_about ]
[[1]]
./R/expect_lint.R:68:3: warning: local variable 'itr' assigned but may not be used
  itr <- 0L
  ^~~

[[2]]
./R/get_source_expressions.R:225:5: style: Closing curly-braces should always be on their own line, unless it's followed by an else.
    })(prev_locs == lag(next_locs))
    ^

[[3]]
./R/lint.R:48:54: style: Place a space before left parenthesis, except in a function call.
        expr_lints <- flatten_lints(linters[[linter]](expr))                                                 ^

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.23%) to 80.79% when pulling 427e177 on ttriche:master into 734c614 on jimhester:master.

@jimhester
Copy link
Member

Looks good to me. Thanks Tim!

jimhester added a commit that referenced this pull request Feb 6, 2015
reorganize a bit; add names.lints, split.lints methods; get lintr to pass most of its own lints :-)
@jimhester jimhester merged commit 0d86d76 into r-lib:master Feb 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants