-
Notifications
You must be signed in to change notification settings - Fork 196
Closed
Labels
featurea feature request or enhancementa feature request or enhancement
Milestone
Description
Currently, we use readLines() when linting, which assumes the system encoding when parsing files.
This results in uncovered lines w.r.t. fixing column numbers of UTF-8 Multibyte characters (at least on Windows, cf. #739) and in bugs when the file encoding doesn't match the system encoding (cf. #541)
lintr should
- get a new setting
encodingwith a smart default (see below) overridable in the usual ways. - respect this setting in
get_source_expressions() - Update the tests to force
UTF-8encoding where necessary
The smart default for encoding should pick the first valid option of this list:
- The
Encodingfield in a packageDESCRIPTION - The
Encodingfield from the.Rprojfile in a project directory UTF-8
This default is system-independent and thus should be safe to use.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featurea feature request or enhancementa feature request or enhancement