nufmt icon indicating copy to clipboard operation
nufmt copied to clipboard

Checklist of format

Open AucaCoyan opened this issue 2 years ago • 0 comments

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:

  • String
  • Int
  • Nothing
  • List
  • Record
  • Pipe
  • External

(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 a let statement, 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.
  • [x] add automatic testing.

AucaCoyan avatar Jun 02 '23 17:06 AucaCoyan