Skip to content

Add "Lint" mode #16

@KostyaEsmukov

Description

@KostyaEsmukov

Currently scaraplate rollup doesn't have a no-action mode, i.e. it always writes the changes. It might be useful to add a no-action mode, which just checks if there would be any changes made by rollup and prints diff and sets an exit code (0 -- success -- for no changes; and 1 -- error -- for any changes).

This mode can be used in CI pipelines to ensure that new changes didn't introduce any new diff from a template.

As for design, I like the one used by black. There're 2 flags:

  --check                         Don't write the files back, just return the
                                  status.  Return code 0 means nothing would
                                  change.  Return code 1 means some files
                                  would be reformatted.  Return code 123 means
                                  there was an internal error.
  --diff                          Don't write the files back, just output a
                                  diff for each file on stdout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions