Skip to content

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

mxork/raco-format

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 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