Skip to content

lint_dir() should be cognizant of read permissions #1939

@MichaelChirico

Description

@MichaelChirico

lint_dir() currently just looks at dir(recursive = TRUE) and attempts to run lint() on all the included files.

This is usually fine for packages, but less so for maintaining an analysis codebase where ownership permissions may be mixed.

The current behavior is clunky because linting can fail mid-way & lose progress. It would be better to skip (possibly warning) files where the correct read permissions are not available:

lint_dir()
# ...........................Error in file(con, "r") : cannot open the connection
# In addition: Warning message:
# In file(con, "r") :
#   cannot open file '...': Permission denied

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions