Checklist of format
Open
Nobody has claimed this yet.
enhancement
meta-issue
- Dominant language
- Rust
- Stars
- 230
- Forks
- 40
- Avg merge
- 15h 30m
- Merged PRs (30d)
- 1
Description
Status of formatting Shapes in nufmt
FlatShape is a struct that gives me the type of contents to format. Based in this struct, the code decides how to output.
The following checklist runs down on the state of every enum case, separated in groups:
solved, no problem raised:
StringIntNothingListRecordPipeExternal
(partially) handled, but some problems occured:
ExternalArg: This FlatShape is the argument of the Extenal enum. Most of the time is a long pipeline. I didn't handle the arguments recurively yet.I don't like recursion.Garbage: I don't know why this is called garbage. Usually starts with aletstatement, or sometimes with a comment. Normally it grabs the first line after a comment.
remaining to handle:
This enums I haven't found them yet, or didn't tried. With further tests we'll check it.
And:Binary:Block:Bool:Closure:Custom(DeclId):DateTime:Directory:Filepath:Flag:Float:GlobPattern:InternalCall(DeclId):Keyword:Literal:MatchPattern:Operator:Or:Range:Redirection:Signature:StringInterpolation:Table:Variable(VarId):
Tasks left to do:
- test every case at least once.
- add automatic testing.
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 with the FlatShape definition in crates/nu-parser/src/flatten.rs and inspect how nufmt currently handles the solved cases. Exercise the remaining enum variants and extend the automatic tests; done means each listed case has been tested and is formatted appropriately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100