gren-lang / gren-lang/compiler
Gren Format command removes multiline comments, format also moves comments away from documented code
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 503
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
When running the
gren format <file path>command:
- Single comments will be moved away from code they are directly above
- Multiline comments following the same practice as shown in the core code will be removed
- Multiline comments will be moved away from code they are directly above
Comment blocks written like:
{-| appends new line character
Some more info I deem important
-}
appendNewLine : String -> String
appendNewLine input =
input ++ "\n"
Will be formatted to:
appendNewLine : String -> String
appendNewLine input =
input ++ "\n"
Comment blocks without the | will be moved instead of removed like so:
{- appends new line character
Hello World
-}
appendNewLine : String -> String
appendNewLine input =
input ++ "\n"
Will be formatted to:
{- appends new line character
Hello World
-}
appendNewLine : String -> String
appendNewLine input =
input ++ "\n"
Single Line comments will be moved away and above code
-- appends new line character
appendNewLine : String -> String
appendNewLine input =
input ++ "\n"
Will be formatted to:
-- appends new line character
appendNewLine : String -> String
appendNewLine input =
input ++ "\n"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the gren format <file path> command using the single-line and multiline comment examples in the report. Trace the formatter entry point and add regression coverage for preserving comment text and keeping comments directly above the documented code; done means all shown examples format without removing or moving comments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100