Skip to content

Convert parser warnings to lints? #2065

@MichaelChirico

Description

@MichaelChirico

We already convert parser errors to lints (type = "error"), but what about parser warnings?

I came across such a warning when trying to lint r-devel, it came from a test file where the lint was intentional:

lintr::lint("tests/simple-true.R", linters = list())
# Warning messages:
# 1: In parse(text = source_expression$content, srcfile = source_expression,  :
#   non-integer value 1e-3L qualified with L; using numeric value
# 2: In parse(text = source_expression$content, srcfile = source_expression,  :
#   integer literal 1.L contains unnecessary decimal point
# 3: In parse(text = source_expression$content, srcfile = source_expression,  :
#   non-integer value 1e-3L qualified with L; using numeric value
# 4: In parse(text = source_expression$content, srcfile = source_expression,  :
#   integer literal 1.L contains unnecessary decimal point

Should those be returned as lints (type = "warning") instead?

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions