Skip to content
Snippets Groups Projects
Select Git revision
  • 654cfb995d67239db8f9a1d6f6dc00a13d35f390
  • main default protected
2 results

formast

  • Clone with SSH
  • Clone with HTTPS
  • s200545's avatar
    s200545 authored
    654cfb99
    History

    formast

    An AST formatting tool to run on java files, with different formatting options. Available options are: - tokenize - ast - relative ast - sorted compressed ast

    Develop

    Remember to download tree-sitter-java and run the following command (uncomment it in the main.py) to generate the language file, when you are running formastfor the first time.

     Language.build_library(
         # Store the library in the `build` directory
         'build/my-languages.so',
    
         # Include one or more languages
         [
             '../../vendor/tree-sitter-java'
         ]
     )

    To see the available options:

    pdm run formast --help

    To run the executable:

    pdm run formast <args> <file_path>