Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 1.22 KB

README.md

File metadata and controls

39 lines (30 loc) · 1.22 KB

AutoFormat.jl

Build Status

Basic autoformat tool for Julialang

Notice

As Stefan mentioned the right way to do this is to enhance the printing of Julia ASTs to the point where the printed form of an expression object is the properly formatted version.

Read list:

Installing Unregistered Packages

 Pkg.clone("git://github.com/yulijia/AutoFormat.jl.git")

Example

using AutoFormat
format("/home/yu/messy_code.jl","/home/yu/messy_code_format.jl",2)
    # usage : format_demo(input_file,output_file,tab_width)
    # download a messy code file example at https://gist.github.com/yulijia/9391666

Todo

  • Learning abstract syntax tree
  • Fix bugs
    • can not format one line block
    • matrix alignment
    • wrong comments style
  • Other features
    • indent with tabs
    • print result with STDOUT
    • print comments or not
    • display diffs instead of rewriting files