Skip to content

Implement code formatting #42

@avh4

Description

@avh4

#38 is a discussion of possible approaches. This issue tracks implementation progress for the current approach.

Planned CLI options:

gren format [INPUTS... | --stdin] [--yes] [--validate]
  • INPUTS: zero or more files to format, or directories to recursively search for gren files to format. If none are given, use the directories implied by gren.json
  • --stdin: instead of formatting files, read stdin and format it to stdout
  • --yes: don't prompt for confirmation before formatting files and overwriting them (does nothing with --stdin)
  • --validate: Don't modify files, and exit 0 if files are all formatted, or exit 1 if some files are not formatted. Intended for use on CI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    formattingIssue is related to `gren format`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions