Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.
/ raco-format Public archive
forked from mxork/raco-format

Indent racket files from CLI.

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE-APACHE
Unknown
LICENSE-MIT
Notifications You must be signed in to change notification settings

racket-tw/raco-format

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alternatives

Check out https://github.com/sorawee/fmt for a similar project that is aimed at having more features and extensibility.

raco-format

Formats source files.

raco format [FILE] ...

Examples

Reading from stdin:

$ raco format <<EOF
#lang racket/base

    (require
racket/list
)

(for ([i 15])
    (displayln
  (cond
     [(= (modulo i 15) 0) 
     "fizzbuzz"]
         [(= (modulo i 5) 0) "buzz"]
     [(= (modulo i 3) 0) "fizz"]
   [else i])))
EOF
#lang racket/base

(require
  racket/list
  )

(for ([i 15])
  (displayln
   (cond
     [(= (modulo i 15) 0) 
      "fizzbuzz"]
     [(= (modulo i 5) 0) "buzz"]
     [(= (modulo i 3) 0) "fizz"]
     [else i])))

Formatting files in place:

$ raco format a.rkt b.rkt
a.rkt
b.rkt

Formatting all *.rkt files in a directory:

$ find
.
./folder
./folder/e.txt
./folder/d.rkt
./c.txt
./b.rkt
./a.rkt

$ raco format .
./a.rkt
./b.rkt
./folder/d.rkt

About

Indent racket files from CLI.

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE-APACHE
Unknown
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Racket 100.0%