Michael Chirico

Results 727 issues of Michael Chirico

is it always possible to suggest an exact alternative? I think it should be. so as.integer(1) -> suggest 1L as.numeric(NA) -> suggest NA_real_ etc. looking again I think it's definitely...

lint-metadata

Sometimes it's useful in scripts to use a "detached" brace to group a bunch of expressions together so they all execute together, and can be collapsed together, e.g.: ```r {...

false-positive

we should customize this to match what's actually linted. but it predates this PR, so we can put that as a follow-up issue _Originally posted by @MichaelChirico in https://github.com/r-lib/lintr/pull/1437#discussion_r908656360_

It's a bit of a mental burden to always remember to add `\n` to expressions when doing _ad hoc_ linting, especially since `expect_lint()` doesn't need it. I think it should...

feature

``` c(1) ``` Seems like it would fit under `unneeded_concatenation_linter`, right? Ditto for any literal value. When `c()` only has one argument, there's ambiguity when (1) the input is named...

feature
good first issue :heart:

So far all tests are just of the default `packages="lintr"`, we should add a test of a test package that has an `inst/lintr/linters.csv` file.

internals

I'm trying to use the lint output to go back to the file & make some edit around the lint. Currently the `Lint` object contains the line (`l1`) & column...

feature
lint-metadata

As seen in #1353, #1340, #1310, there are subtle performance implications to the way we write our XPaths. One thing that became clear is that writing `//NODE1[NODE2]` is slower than...

performance

We currently assume that elements of `$imports` returned by `parseNamespaceFile()` that are length>1 are `importFrom` directives; actually, they might be `import(., except=)` directives. For example, here's dplyr ([permalink](https://github.com/tidyverse/dplyr/blob/55dfc1c5b49eae3f1b144ebe7d9fa2c3d79b1835/NAMESPACE#L473-L474)): ```r parseNamespaceFile("dplyr",...

bug

weird that this triggers `commented_code_linter`. seems like a bug. _Originally posted by @MichaelChirico in https://github.com/r-lib/lintr/pull/923#discussion_r825407071_

false-positive