Not directly caused by this PR but shouldn't this XPath land on the parent expr? ``` r lintr::lint( text = "x[, length(unique(col)) == .N]", linters = lintr::any_duplicated_linter() ) #> <text>:1:5: warning: [any_duplicated_linter] anyDuplicated(x) == 0L is better than length(unique(x)) == .N #> x[, length(unique(col)) == .N] #> ^~~~~~~~~~~~~~~~~~~ ``` <sup>Created on 2025-06-02 with [reprex v2.1.1](https://reprex.tidyverse.org)</sup> _Originally posted by @Bisaloo in https://github.com/r-lib/lintr/pull/2795#discussion_r2121017100_