Skip to content

Write new formatting engine #1480

Open
Open
@rjmholt

Description

@rjmholt

PSSA2 currently only has an analyzer. It should also have a formatter.

In particular, the API should allow objects to implement an abstract class that doesn't emit diagnostics, but instead contributes edits to a formatting buffer.

Rules should be able to provide an implementation for this also by implementing an API that provides an instance of the required abstract class.

Requirements are:

  • Run as many formatters over the script as it can at once
  • When formatters want to overwrite the same extent, the largest wins
  • Attempt to run until no more formatters have edits to make, up to some maximum number of runs
  • Formatters should reuse the rule configuration system

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions