Skip to content

lint_package fails if .lintr does not end with new line #160

@dirkschumacher

Description

@dirkschumacher

Just observed the following error. If it is a feature and not a bug, then it might make sense to improve the error message. Tested on a Mac.

cat("linters: with_defaults(closed_curly_linter = NULL)", file = ".lintr")
lintr::lint_package()

=> Error in mapply(function(from, to) paste(lines[from:to], collapse = "\n")

cat("linters: with_defaults(closed_curly_linter = NULL)\n", file = ".lintr")
lintr::lint_package()

This works as intented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions