diff --git a/.lintr b/.lintr index 88a3468..df0b1d2 100644 --- a/.lintr +++ b/.lintr @@ -9,6 +9,5 @@ linters: linters_with_defaults( exclusions: list( "inst/extdata/duplicated.R", "tests/testthat.R", - # ? should be able to exclude a directory in lintr - "tests/testthat/testdata/anRpackage/R/anRpackage-internal.R" + "tests/testthat/testdata" ) diff --git a/NEWS.md b/NEWS.md index 5b6b147..74faec2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,7 @@ * Update the CI workflows for pkgdown, test-coverage and R CMD check * use lintr >= 3, and update .lintr config file +* Fixed linting across package * lint the package in CI * Convert default git branch to 'main' (#84, @russHyde) diff --git a/R/dups-class.R b/R/dups-class.R index 42b4b65..cb88c98 100644 --- a/R/dups-class.R +++ b/R/dups-class.R @@ -6,10 +6,11 @@ as_dups <- function(x) { if (methods::is(x, "dups")) { return(x) } - structure( - list(dups_df = x), - class = "dups" - ) + + dups <- list(dups_df = x) + class(dups) <- "dups" + + dups } #' as.data.frame method for `dups` class