Skip to content

Linter service clears lint results too greedily #1127

Description

@bepri

Bug Description

When implementing a full lint lifecycle, both pre and post linters are run on an artifact. This requires LinterService.run() to be called twice, since each stage must be invoked individually (LinterService.run(Stage.PRE, ctx); LinterService.run(Stage.POST, ctx)).

This means:

  • Lint results are broken up in a manner that appears arbitrary to users; pre/post really are implementation details.
  • LinterService.summary() forgets the results of the first run, which could result in false positives for 0 return codes.

To Reproduce

Implement two custom linters, one pre- and one post-, and then try to run both of them as you might during a pack command's final steps.

part yaml

N/A

Relevant log output

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions