You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am turning existing scripts into an R package. It's a large amount of code, written by a former colleague. I use the lintr package and get many, many comments which I need to work through. This causes lintr to take a long time to run (15 minutes), and it produces an unworkable long list of suggestions. It would be easier for me if lintr could simply stop analysing after, say, 100 suggestions. That takes less time and gives me the chance to iteratively work through the list. Is that a useful new feature?
This #55 is related but focusses on limiting the printed output. I want to limit the analysis part to reduce the time lintr takes.
The text was updated successfully, but these errors were encountered:
What I did with such a case was store as.data.frame(lintr::lint_dir()) in a variable and use e.g. dplyr to filter the lints as needed.
Does that help you?
I think this would be a good solution for limiting the visual output (similar to what was asked in #55). But I want to limit the analysis part, to reduce the time lintr takes. I edited my OP to emphasise this point.
I feel it can be useful, and in line with how some other related tooling works (what comes to mind is ?llvm? compiler quitting after too many issues).
That said, I think there are enough "OK" workarounds that I haven't really needed this myself in practice.
As @AshesITR mentioned, to reduce the output noise, I do l = lint*(...) then work from as.data.frame(l)
I rarely find lint speed a constraint
lint_dir(all_linters()) works in a few minutes on all of r-devel. This is not ideal but it really only need be run quite rarely if the output is saved like l= above
lint_dir(linters = specific_linter()) is quite fast in general for checking a single linter is fixed
Overall, I don't think I'd put any development effort on this myself, but would be more than happy to review PR(s). It could be as easy as a few lines' change -- not sure.
I am turning existing scripts into an R package. It's a large amount of code, written by a former colleague. I use the lintr package and get many, many comments which I need to work through. This causes lintr to take a long time to run (15 minutes), and it produces an unworkable long list of suggestions. It would be easier for me if lintr could simply stop analysing after, say, 100 suggestions. That takes less time and gives me the chance to iteratively work through the list. Is that a useful new feature?
This #55 is related but focusses on limiting the printed output. I want to limit the analysis part to reduce the time lintr takes.
The text was updated successfully, but these errors were encountered: