Skip to content

Invalid parentheses can cause lintr to error or hang #1427

Closed
@kamilzyla

Description

@kamilzyla

Steps to reproduce

Run lintr::lint() on the following snippets.

This one throws Error in rep.int(character, length) : invalid 'times' value:

function() {)

This one hangs forever:

{ if (x) x()

Expected behavior

The function should exit cleanly and report a human-readable error.

Notes

Tested on version 3.0.0 released to CRAN as well as the development version at commit 6c3f0fd.

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