Skip to content

yulijia/AutoFormat.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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:https://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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages