gren-lang / gren-lang/compiler

Implement code formatting

Open
#42 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

formatting
Dominant language
Haskell
Stars
503
Forks
29
PR merge metrics
No merged PRs in 30d

Description

#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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the unchecked parser/AST comment-retention items and the formatting test suite described in the issue. Review the planned gren format CLI options and the existing linked implementation work before proceeding. Done means completing the remaining formatting, test, and cleanup checklist items, including idempotence if retained.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
compilers, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.