Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Make failure message of expect_lint_free() more actionable #1784

@AshesITR

Description

@AshesITR

Currently, if expect_lint_free() fails, the message is

Not lint free

Which, while correct, isn't very helpful and requires another lintr run to find out where the lints are.
Instead, we should show the first couple of lints in the message, e.g.

Number of lints (42) not equal to 0.

[output of print.lints(head(lints, 10L))]

and 32 more...

Compare expect_equal(1:100, numeric()):

1:100 (actual) not equal to numeric() (expected).

actual: 1 2 3 4 5 6 7 8 9 10 and 90 more...
expected: ...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions