You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Josh Tynjala <jo...@bowlerhat.dev> on 2021/09/22 17:42:53 UTC

Introducing asformat

Hey everyone,

I recently created asformat, which is a formatter for ActionScript code. It
is based on the Royale compiler's lexer that creates a stream of tokens.
One nice thing about working with the token stream versus a full AST
(Abstract Syntax Tree) is that it's easier to keep track of existing
whitespace to preserve it where appropriate.

In addition to command line usage, this formatter is intended to eventually
be used by IDEs/editors, such as VSCode and Moonshine.

You can find asformat in nightly builds for now. I'm still testing it with
existing codebases, but I wanted to share my progress so that others could
check it out, if interested.

Usage:

Format a file, and write it back to the file system:

asformat --write-files src/com/example/MyClass.as

Alternatively, format all .as files in a directory:

asformat --write-files src

Options:

--write-files: Writes the formatting changes back to the original files. If
a file has no formatting changes, it will not be modified. Alias: -w.
Default: false.

--list-files: Lists the files that have been changed by formatting. If a
file has no formatting changes, it won't be listed. Alias: -l. Default:
false.

--insert-spaces: Indents with spaces instead of tabs. (Default: false)

--tab-width: The width of tabs when insert-spaces is specified. (Default: 4)

--insert-final-new-line: Adds a final empty line at the end of the file, if
one doesn't exist already. (Default: false)

--open-brace-new-line: Controls whether an opening curly brace is placed on
a new line, or is "cuddled" on the current line. (Default: true)

--insert-space-for-loop-semicolon: Controls whether a space is inserted
after the semicolons in a for() loop. (Default: true)

--insert-space-control-flow-keywords: Controls whether a space is inserted
between control flow keywords (like if, for, while) and the following (
open parenthesis. (Default: true)

--insert-space-anonymous-function-keyword: Controls whether a space is
inserted between the function keyword and the following ( open parenthesis,
if the function is anonymous (if it doesn't have a name). (Default: false)

--insert-space-binary-operators: Controls whether a space is inserted
before and after binary operators (like +, -, *, /, &&, ||, etc.) (Default:
true)

--insert-space-comma-delimiter: Controls whether a space is inserted after
comma delimiters in Object and Array literals. (Default: true)

--collapse-empty-blocks: Controls whether empty blocks are collapsed so
that the opening and closing curly brace are both on the same line or
not. (Default:
false)

--max-preserve-new-lines: Specify the maximum number of new line characters
that are allowed to appear consecutively. (Default: 2)

--semicolons: Controls how semicolons are handled. Valid values are insert,
remove, and ignore. Insert means that missing semicolons are inserted.
Remove means that all semicolons are removed, and ignore means that there
is no change to semicolons in the file. (Default: insert)

Additional notes:

If neither --write-files nor --list-files is specified, the formatted
source code is written to standard output instead.

If no files are specified, asformat waits for standard input instead.

--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>

Re: Introducing asformat

Posted by Josh Tynjala <jo...@bowlerhat.dev>.
I am hoping that existing XML formatters in IDEs will be able to handle
MXML properly by detecting the AS3 script elements separately (it works for
syntax coloring, so hopefully, formatting too). I know that this doesn't
help from a command line perspective, but honestly, I'd rather not have to
write an XML formatter from scratch. If I'm forced to, I hope that I can
find an open source XML formatter written in Java that is Apache license
compatible.

--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>


On Mon, Sep 27, 2021 at 3:10 AM Yishay Weiss <yi...@apache.org> wrote:

> This can be very useful, and it's nice it's a standalone util which opens
> up using it in all editors. Do you have plans to create mxmlformatter?
>
> On 2021/09/22 17:42:53, Josh Tynjala <jo...@bowlerhat.dev> wrote:
> > Hey everyone,
> >
> > I recently created asformat, which is a formatter for ActionScript code.
> It
> > is based on the Royale compiler's lexer that creates a stream of tokens.
> > One nice thing about working with the token stream versus a full AST
> > (Abstract Syntax Tree) is that it's easier to keep track of existing
> > whitespace to preserve it where appropriate.
> >
> > In addition to command line usage, this formatter is intended to
> eventually
> > be used by IDEs/editors, such as VSCode and Moonshine.
> >
> > You can find asformat in nightly builds for now. I'm still testing it
> with
> > existing codebases, but I wanted to share my progress so that others
> could
> > check it out, if interested.
> >
> > Usage:
> >
> > Format a file, and write it back to the file system:
> >
> > asformat --write-files src/com/example/MyClass.as
> >
> > Alternatively, format all .as files in a directory:
> >
> > asformat --write-files src
> >
> > Options:
> >
> > --write-files: Writes the formatting changes back to the original files.
> If
> > a file has no formatting changes, it will not be modified. Alias: -w.
> > Default: false.
> >
> > --list-files: Lists the files that have been changed by formatting. If a
> > file has no formatting changes, it won't be listed. Alias: -l. Default:
> > false.
> >
> > --insert-spaces: Indents with spaces instead of tabs. (Default: false)
> >
> > --tab-width: The width of tabs when insert-spaces is specified.
> (Default: 4)
> >
> > --insert-final-new-line: Adds a final empty line at the end of the file,
> if
> > one doesn't exist already. (Default: false)
> >
> > --open-brace-new-line: Controls whether an opening curly brace is placed
> on
> > a new line, or is "cuddled" on the current line. (Default: true)
> >
> > --insert-space-for-loop-semicolon: Controls whether a space is inserted
> > after the semicolons in a for() loop. (Default: true)
> >
> > --insert-space-control-flow-keywords: Controls whether a space is
> inserted
> > between control flow keywords (like if, for, while) and the following (
> > open parenthesis. (Default: true)
> >
> > --insert-space-anonymous-function-keyword: Controls whether a space is
> > inserted between the function keyword and the following ( open
> parenthesis,
> > if the function is anonymous (if it doesn't have a name). (Default:
> false)
> >
> > --insert-space-binary-operators: Controls whether a space is inserted
> > before and after binary operators (like +, -, *, /, &&, ||, etc.)
> (Default:
> > true)
> >
> > --insert-space-comma-delimiter: Controls whether a space is inserted
> after
> > comma delimiters in Object and Array literals. (Default: true)
> >
> > --collapse-empty-blocks: Controls whether empty blocks are collapsed so
> > that the opening and closing curly brace are both on the same line or
> > not. (Default:
> > false)
> >
> > --max-preserve-new-lines: Specify the maximum number of new line
> characters
> > that are allowed to appear consecutively. (Default: 2)
> >
> > --semicolons: Controls how semicolons are handled. Valid values are
> insert,
> > remove, and ignore. Insert means that missing semicolons are inserted.
> > Remove means that all semicolons are removed, and ignore means that there
> > is no change to semicolons in the file. (Default: insert)
> >
> > Additional notes:
> >
> > If neither --write-files nor --list-files is specified, the formatted
> > source code is written to standard output instead.
> >
> > If no files are specified, asformat waits for standard input instead.
> >
> > --
> > Josh Tynjala
> > Bowler Hat LLC <https://bowlerhat.dev>
> >
>

Re: Introducing asformat

Posted by Yishay Weiss <yi...@apache.org>.
This can be very useful, and it's nice it's a standalone util which opens up using it in all editors. Do you have plans to create mxmlformatter?

On 2021/09/22 17:42:53, Josh Tynjala <jo...@bowlerhat.dev> wrote: 
> Hey everyone,
> 
> I recently created asformat, which is a formatter for ActionScript code. It
> is based on the Royale compiler's lexer that creates a stream of tokens.
> One nice thing about working with the token stream versus a full AST
> (Abstract Syntax Tree) is that it's easier to keep track of existing
> whitespace to preserve it where appropriate.
> 
> In addition to command line usage, this formatter is intended to eventually
> be used by IDEs/editors, such as VSCode and Moonshine.
> 
> You can find asformat in nightly builds for now. I'm still testing it with
> existing codebases, but I wanted to share my progress so that others could
> check it out, if interested.
> 
> Usage:
> 
> Format a file, and write it back to the file system:
> 
> asformat --write-files src/com/example/MyClass.as
> 
> Alternatively, format all .as files in a directory:
> 
> asformat --write-files src
> 
> Options:
> 
> --write-files: Writes the formatting changes back to the original files. If
> a file has no formatting changes, it will not be modified. Alias: -w.
> Default: false.
> 
> --list-files: Lists the files that have been changed by formatting. If a
> file has no formatting changes, it won't be listed. Alias: -l. Default:
> false.
> 
> --insert-spaces: Indents with spaces instead of tabs. (Default: false)
> 
> --tab-width: The width of tabs when insert-spaces is specified. (Default: 4)
> 
> --insert-final-new-line: Adds a final empty line at the end of the file, if
> one doesn't exist already. (Default: false)
> 
> --open-brace-new-line: Controls whether an opening curly brace is placed on
> a new line, or is "cuddled" on the current line. (Default: true)
> 
> --insert-space-for-loop-semicolon: Controls whether a space is inserted
> after the semicolons in a for() loop. (Default: true)
> 
> --insert-space-control-flow-keywords: Controls whether a space is inserted
> between control flow keywords (like if, for, while) and the following (
> open parenthesis. (Default: true)
> 
> --insert-space-anonymous-function-keyword: Controls whether a space is
> inserted between the function keyword and the following ( open parenthesis,
> if the function is anonymous (if it doesn't have a name). (Default: false)
> 
> --insert-space-binary-operators: Controls whether a space is inserted
> before and after binary operators (like +, -, *, /, &&, ||, etc.) (Default:
> true)
> 
> --insert-space-comma-delimiter: Controls whether a space is inserted after
> comma delimiters in Object and Array literals. (Default: true)
> 
> --collapse-empty-blocks: Controls whether empty blocks are collapsed so
> that the opening and closing curly brace are both on the same line or
> not. (Default:
> false)
> 
> --max-preserve-new-lines: Specify the maximum number of new line characters
> that are allowed to appear consecutively. (Default: 2)
> 
> --semicolons: Controls how semicolons are handled. Valid values are insert,
> remove, and ignore. Insert means that missing semicolons are inserted.
> Remove means that all semicolons are removed, and ignore means that there
> is no change to semicolons in the file. (Default: insert)
> 
> Additional notes:
> 
> If neither --write-files nor --list-files is specified, the formatted
> source code is written to standard output instead.
> 
> If no files are specified, asformat waits for standard input instead.
> 
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
> 

Re: Introducing asformat

Posted by Josh Tynjala <jo...@bowlerhat.dev>.
The formatter and linter are documented. I'll make sure that the other
things are too.

--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>


On Wed, Sep 28, 2022 at 11:31 AM Andrew Wetmore <co...@gmail.com> wrote:

> Have we got documentation for all these new features, and how-tos for
> deploying them?
>
> On Wed, Sep 28, 2022 at 12:36 PM Josh Tynjala <jo...@bowlerhat.dev>
> wrote:
>
> > A new release sounds good to me! I just updated the compiler release
> notes,
> > and there's a decent amount of stuff to be included. Not just these
> > formatter improvements, but also the new linter, headless JS RoyaleUnit
> > tests with Playwright, and the --watch compiler option are all new since
> > the last release.
> >
> > --
> > Josh Tynjala
> > Bowler Hat LLC <https://bowlerhat.dev>
> >
> >
> > On Wed, Sep 28, 2022 at 6:45 AM Harbs <ha...@gmail.com> wrote:
> >
> > > That’s great!
> > >
> > > This is a good reason to get another release out… :-)
> > >
> > > Harbs
> > >
> > > > On Sep 28, 2022, at 12:24 AM, Josh Tynjala <
> joshtynjala@bowlerhat.dev>
> > > wrote:
> > > >
> > > > I just wanted to follow up by mentioning that I recently added the
> > > ability for the formatter load configuration files, in addition to the
> > > existing command line options. It will automatically detect an
> > > asformat-config.xml file in the current working directory, allowing you
> > to
> > > easily specify configuration options for a specific project. You can
> also
> > > use a new -load-config option to load a configuration file from any
> path,
> > > not just the current working directory. You can use
> > -skip-local-config-file
> > > to ignore the asformat-config.xml file.
> > > >
> > > > Once we release the next Royale update, I plan to make vscode-as3mxml
> > > automatically detect the asformat-config.xml file too, so you will be
> > able
> > > to configure formatting options for both the command line and VSCode at
> > the
> > > same time.
> > > >
> > > > I also updated the Royale documentation to add a section for the
> > > formatter:
> > > >
> > > > https://apache.github.io/royale-docs/formatter <
> > > https://apache.github.io/royale-docs/formatter>
> > > >
> > > > --
> > > > Josh Tynjala
> > > > Bowler Hat LLC <https://bowlerhat.dev/>
> > > >
> > > >
> > > > On Wed, Sep 22, 2021 at 10:42 AM Josh Tynjala <
> > joshtynjala@bowlerhat.dev
> > > <ma...@bowlerhat.dev>> wrote:
> > > > Hey everyone,
> > > >
> > > > I recently created asformat, which is a formatter for ActionScript
> > code.
> > > It is based on the Royale compiler's lexer that creates a stream of
> > tokens.
> > > One nice thing about working with the token stream versus a full AST
> > > (Abstract Syntax Tree) is that it's easier to keep track of existing
> > > whitespace to preserve it where appropriate.
> > > >
> > > > In addition to command line usage, this formatter is intended to
> > > eventually be used by IDEs/editors, such as VSCode and Moonshine.
> > > >
> > > > You can find asformat in nightly builds for now. I'm still testing it
> > > with existing codebases, but I wanted to share my progress so that
> others
> > > could check it out, if interested.
> > > >
> > > > Usage:
> > > >
> > > > Format a file, and write it back to the file system:
> > > >
> > > > asformat --write-files src/com/example/MyClass.as
> > > >
> > > > Alternatively, format all .as files in a directory:
> > > >
> > > > asformat --write-files src
> > > >
> > > > Options:
> > > >
> > > > --write-files: Writes the formatting changes back to the original
> > files.
> > > If a file has no formatting changes, it will not be modified. Alias:
> -w.
> > > Default: false.
> > > >
> > > > --list-files: Lists the files that have been changed by formatting.
> If
> > a
> > > file has no formatting changes, it won't be listed. Alias: -l. Default:
> > > false.
> > > >
> > > > --insert-spaces: Indents with spaces instead of tabs. (Default:
> false)
> > > >
> > > > --tab-width: The width of tabs when insert-spaces is specified.
> > > (Default: 4)
> > > >
> > > > --insert-final-new-line: Adds a final empty line at the end of the
> > file,
> > > if one doesn't exist already. (Default: false)
> > > >
> > > > --open-brace-new-line: Controls whether an opening curly brace is
> > placed
> > > on a new line, or is "cuddled" on the current line. (Default: true)
> > > >
> > > > --insert-space-for-loop-semicolon: Controls whether a space is
> inserted
> > > after the semicolons in a for() loop. (Default: true)
> > > >
> > > > --insert-space-control-flow-keywords: Controls whether a space is
> > > inserted between control flow keywords (like if, for, while) and the
> > > following ( open parenthesis. (Default: true)
> > > >
> > > > --insert-space-anonymous-function-keyword: Controls whether a space
> is
> > > inserted between the function keyword and the following ( open
> > parenthesis,
> > > if the function is anonymous (if it doesn't have a name). (Default:
> > false)
> > > >
> > > > --insert-space-binary-operators: Controls whether a space is inserted
> > > before and after binary operators (like +, -, *, /, &&, ||, etc.)
> > (Default:
> > > true)
> > > >
> > > > --insert-space-comma-delimiter: Controls whether a space is inserted
> > > after comma delimiters in Object and Array literals. (Default: true)
> > > >
> > > > --collapse-empty-blocks: Controls whether empty blocks are collapsed
> so
> > > that the opening and closing curly brace are both on the same line or
> > not.
> > > (Default: false)
> > > >
> > > > --max-preserve-new-lines: Specify the maximum number of new line
> > > characters that are allowed to appear consecutively. (Default: 2)
> > > >
> > > > --semicolons: Controls how semicolons are handled. Valid values are
> > > insert, remove, and ignore. Insert means that missing semicolons are
> > > inserted. Remove means that all semicolons are removed, and ignore
> means
> > > that there is no change to semicolons in the file. (Default: insert)
> > > >
> > > > Additional notes:
> > > >
> > > > If neither --write-files nor --list-files is specified, the formatted
> > > source code is written to standard output instead.
> > > >
> > > > If no files are specified, asformat waits for standard input instead.
> > > >
> > > > --
> > > > Josh Tynjala
> > > > Bowler Hat LLC <https://bowlerhat.dev/>
> > >
> > >
> >
>
>
> --
> Andrew Wetmore
>
> Editor, Moose House Publications <https://moosehousepress.com/>
> Editor-Writer, The Apache Software Foundation <https://apache.org/>
>

Re: Introducing asformat

Posted by Andrew Wetmore <co...@gmail.com>.
Have we got documentation for all these new features, and how-tos for
deploying them?

On Wed, Sep 28, 2022 at 12:36 PM Josh Tynjala <jo...@bowlerhat.dev>
wrote:

> A new release sounds good to me! I just updated the compiler release notes,
> and there's a decent amount of stuff to be included. Not just these
> formatter improvements, but also the new linter, headless JS RoyaleUnit
> tests with Playwright, and the --watch compiler option are all new since
> the last release.
>
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
>
>
> On Wed, Sep 28, 2022 at 6:45 AM Harbs <ha...@gmail.com> wrote:
>
> > That’s great!
> >
> > This is a good reason to get another release out… :-)
> >
> > Harbs
> >
> > > On Sep 28, 2022, at 12:24 AM, Josh Tynjala <jo...@bowlerhat.dev>
> > wrote:
> > >
> > > I just wanted to follow up by mentioning that I recently added the
> > ability for the formatter load configuration files, in addition to the
> > existing command line options. It will automatically detect an
> > asformat-config.xml file in the current working directory, allowing you
> to
> > easily specify configuration options for a specific project. You can also
> > use a new -load-config option to load a configuration file from any path,
> > not just the current working directory. You can use
> -skip-local-config-file
> > to ignore the asformat-config.xml file.
> > >
> > > Once we release the next Royale update, I plan to make vscode-as3mxml
> > automatically detect the asformat-config.xml file too, so you will be
> able
> > to configure formatting options for both the command line and VSCode at
> the
> > same time.
> > >
> > > I also updated the Royale documentation to add a section for the
> > formatter:
> > >
> > > https://apache.github.io/royale-docs/formatter <
> > https://apache.github.io/royale-docs/formatter>
> > >
> > > --
> > > Josh Tynjala
> > > Bowler Hat LLC <https://bowlerhat.dev/>
> > >
> > >
> > > On Wed, Sep 22, 2021 at 10:42 AM Josh Tynjala <
> joshtynjala@bowlerhat.dev
> > <ma...@bowlerhat.dev>> wrote:
> > > Hey everyone,
> > >
> > > I recently created asformat, which is a formatter for ActionScript
> code.
> > It is based on the Royale compiler's lexer that creates a stream of
> tokens.
> > One nice thing about working with the token stream versus a full AST
> > (Abstract Syntax Tree) is that it's easier to keep track of existing
> > whitespace to preserve it where appropriate.
> > >
> > > In addition to command line usage, this formatter is intended to
> > eventually be used by IDEs/editors, such as VSCode and Moonshine.
> > >
> > > You can find asformat in nightly builds for now. I'm still testing it
> > with existing codebases, but I wanted to share my progress so that others
> > could check it out, if interested.
> > >
> > > Usage:
> > >
> > > Format a file, and write it back to the file system:
> > >
> > > asformat --write-files src/com/example/MyClass.as
> > >
> > > Alternatively, format all .as files in a directory:
> > >
> > > asformat --write-files src
> > >
> > > Options:
> > >
> > > --write-files: Writes the formatting changes back to the original
> files.
> > If a file has no formatting changes, it will not be modified. Alias: -w.
> > Default: false.
> > >
> > > --list-files: Lists the files that have been changed by formatting. If
> a
> > file has no formatting changes, it won't be listed. Alias: -l. Default:
> > false.
> > >
> > > --insert-spaces: Indents with spaces instead of tabs. (Default: false)
> > >
> > > --tab-width: The width of tabs when insert-spaces is specified.
> > (Default: 4)
> > >
> > > --insert-final-new-line: Adds a final empty line at the end of the
> file,
> > if one doesn't exist already. (Default: false)
> > >
> > > --open-brace-new-line: Controls whether an opening curly brace is
> placed
> > on a new line, or is "cuddled" on the current line. (Default: true)
> > >
> > > --insert-space-for-loop-semicolon: Controls whether a space is inserted
> > after the semicolons in a for() loop. (Default: true)
> > >
> > > --insert-space-control-flow-keywords: Controls whether a space is
> > inserted between control flow keywords (like if, for, while) and the
> > following ( open parenthesis. (Default: true)
> > >
> > > --insert-space-anonymous-function-keyword: Controls whether a space is
> > inserted between the function keyword and the following ( open
> parenthesis,
> > if the function is anonymous (if it doesn't have a name). (Default:
> false)
> > >
> > > --insert-space-binary-operators: Controls whether a space is inserted
> > before and after binary operators (like +, -, *, /, &&, ||, etc.)
> (Default:
> > true)
> > >
> > > --insert-space-comma-delimiter: Controls whether a space is inserted
> > after comma delimiters in Object and Array literals. (Default: true)
> > >
> > > --collapse-empty-blocks: Controls whether empty blocks are collapsed so
> > that the opening and closing curly brace are both on the same line or
> not.
> > (Default: false)
> > >
> > > --max-preserve-new-lines: Specify the maximum number of new line
> > characters that are allowed to appear consecutively. (Default: 2)
> > >
> > > --semicolons: Controls how semicolons are handled. Valid values are
> > insert, remove, and ignore. Insert means that missing semicolons are
> > inserted. Remove means that all semicolons are removed, and ignore means
> > that there is no change to semicolons in the file. (Default: insert)
> > >
> > > Additional notes:
> > >
> > > If neither --write-files nor --list-files is specified, the formatted
> > source code is written to standard output instead.
> > >
> > > If no files are specified, asformat waits for standard input instead.
> > >
> > > --
> > > Josh Tynjala
> > > Bowler Hat LLC <https://bowlerhat.dev/>
> >
> >
>


-- 
Andrew Wetmore

Editor, Moose House Publications <https://moosehousepress.com/>
Editor-Writer, The Apache Software Foundation <https://apache.org/>

Re: Introducing asformat

Posted by co...@cristallium.com.
Hi all,

Congratulations, this is wonderful !

Le 2022-09-29 08:16, Harbs a écrit :

> Yes. Most of us have similar stories. As long as you're not afraid to 
> start learning something new you will be surprised how much you can 
> learn in small steps.
> 
> Harbs
> 
> On Sep 29, 2022, at 12:02 AM, Josh Tynjala <jo...@bowlerhat.dev> 
> wrote:
> 
> Around 2015 or so, I had never worked on a compiler, formatter, or 
> linter.
> 
> I started trying to use the Royale compiler (still called the FlexJS
> compiler at the time) to create the AS3/MXML extension for VSCode. 
> Soon, I
> found a bug in the compiler that prevented my VSCode extension from 
> working
> properly. I tried my best to understand a small section of the 
> compiler's
> code, and I was able to fix the bug and submit a pull request. 
> Eventually,
> I fixed some more bugs, and I was asked to join the project as a
> contributor. Since then, I've learned how larger and larger parts of 
> the
> compiler work. To be honest, it took probably 5-7 years before I really
> felt that I understood most of what the compiler was doing. It just 
> takes a
> lot of time and persistence.
> 
> Recently, I was able to recognize that I could reuse large parts of the
> compiler's code to create a formatter and a linter for ActionScript 
> (the
> ActionScript language name is where the "as" prefix of "asformat" and
> "aslint" comes from, of course). I had never created a formatter or a
> linter before, and it took some trial and error to figure out the best 
> way
> to do things. For the formatter, I tried to format one little thing 
> first,
> like `if (condition) {}` or something like that. Then, I slowly added 
> more
> and more (for, while, try/catch, class A extends B, etc.). It took 
> months
> of work, which was built on my previous years of work understanding and
> maintaining the compiler.
> 
> Honestly, like most of everything I've ever tried to learn, I started 
> with
> one small thing. Don't try to understand everything all at once. At 
> least
> not in detail. It's often fine to have a general idea of how something
> works at a high-level, even if you don't understand it completely. 
> Then,
> you can dive into the details later. Anyway, over the course of years
> working on the same thing, you can really learn a lot.
> 
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
> 
> On Wed, Sep 28, 2022 at 1:00 PM Maria Jose Esteve <mj...@iest.com> 
> wrote:
> 
> How can you know about so many things? asformat, aslint, linter... omg,
> you guys never cease to amaze me... I had to look up the meaning of 
> each of
> these words :(
> 
> I don't feel able to help you with any of this but, Yishay, if you 
> teach
> me I can be your backup for the releases.
> 
> Hiedra
> 
> -----Mensaje original-----
> De: Yishay Weiss <yi...@hotmail.com>
> Enviado el: miércoles, 28 de septiembre de 2022 20:16
> Para: dev@royale.apache.org
> Asunto: RE: Introducing asformat
> 
> It's great to see this progress. I expect to see as-linter replacing
> SonarQube in our current project. Do you think it would be hard to
> integrate it with GitHub actions?
> 
> The -watch option is already being used and is a big productivity 
> boost.
> 
> I expect I'll make use of asformat at some point as well. Thanks for 
> all
> this Josh.
> 
> I may get some time at the end of this month to work on a release, but 
> I
> would prefer to do it with another volunteer, to share knowledge and 
> add
> redundancy. Also, I want to use the new Azure VM I created (Apache 
> funded)
> instead of Alex's so we have redundancy in that respect as well.  The 
> VM
> isn't all set up yet so I will need to work on that.
> 
> From: Josh Tynjala<ma...@bowlerhat.dev>
> Sent: Wednesday, September 28, 2022 6:35 PM
> To: dev@royale.apache.org<ma...@royale.apache.org>
> Subject: Re: Introducing asformat
> 
> A new release sounds good to me! I just updated the compiler release
> notes, and there's a decent amount of stuff to be included. Not just 
> these
> formatter improvements, but also the new linter, headless JS RoyaleUnit
> tests with Playwright, and the --watch compiler option are all new 
> since
> the last release.
> 
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
> 
> On Wed, Sep 28, 2022 at 6:45 AM Harbs <ha...@gmail.com> wrote:
> 
> That's great!
> 
> This is a good reason to get another release out. :-)
> 
> Harbs
> 
> On Sep 28, 2022, at 12:24 AM, Josh Tynjala
> <jo...@bowlerhat.dev> wrote:
> I just wanted to follow up by mentioning that I recently added the 
> ability for the formatter load configuration files, in addition to the
> existing command line options. It will automatically detect an
> asformat-config.xml file in the current working directory, allowing
> you to easily specify configuration options for a specific project.
> You can also use a new -load-config option to load a configuration
> file from any path, not just the current working directory. You can
> use -skip-local-config-file to ignore the asformat-config.xml file.
> Once we release the next Royale update, I plan to make
> vscode-as3mxml automatically detect the asformat-config.xml file too, 
> so you will be
> able to configure formatting options for both the command line and
> VSCode at the same time.
> I also updated the Royale documentation to add a section for the 
> formatter:
> https://apache.github.io/royale-docs/formatter < 
> https://apache.github.io/royale-docs/formatter><https://apache.github.
> io/royale-docs/formatter%3e>
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev/>
> 
> On Wed, Sep 22, 2021 at 10:42 AM Josh Tynjala
> <joshtynjala@bowlerhat.dev <ma...@bowlerhat.dev>> wrote: 
> Hey everyone,
> 
> I recently created asformat, which is a formatter for ActionScript
  code.

> It is based on the Royale compiler's lexer that creates a stream of
  tokens.

> One nice thing about working with the token stream versus a full AST
> (Abstract Syntax Tree) is that it's easier to keep track of existing
> whitespace to preserve it where appropriate.
> 
>> In addition to command line usage, this formatter is intended to
> eventually be used by IDEs/editors, such as VSCode and Moonshine.
> 
>> You can find asformat in nightly builds for now. I'm still testing
>> it
> with existing codebases, but I wanted to share my progress so that
> others could check it out, if interested.
> 
>> Usage:
>> 
>> Format a file, and write it back to the file system:
>> 
>> asformat --write-files src/com/example/MyClass.as
>> 
>> Alternatively, format all .as files in a directory:
>> 
>> asformat --write-files src
>> 
>> Options:
>> 
>> --write-files: Writes the formatting changes back to the original
  files.

> If a file has no formatting changes, it will not be modified. Alias: 
> -w.
> Default: false.
> 
>> --list-files: Lists the files that have been changed by formatting.
>> If a
> file has no formatting changes, it won't be listed. Alias: -l. Default:
> false.
> 
>> --insert-spaces: Indents with spaces instead of tabs. (Default:
>> false)
>> 
>> --tab-width: The width of tabs when insert-spaces is specified.
> (Default: 4)
> 
>> --insert-final-new-line: Adds a final empty line at the end of the
>> file,
> if one doesn't exist already. (Default: false)
> 
>> --open-brace-new-line: Controls whether an opening curly brace is
>> placed
> on a new line, or is "cuddled" on the current line. (Default: true)
> 
>> --insert-space-for-loop-semicolon: Controls whether a space is
>> inserted
> after the semicolons in a for() loop. (Default: true)
> 
>> --insert-space-control-flow-keywords: Controls whether a space is
> inserted between control flow keywords (like if, for, while) and the
> following ( open parenthesis. (Default: true)
> 
>> --insert-space-anonymous-function-keyword: Controls whether a space
>> is
> inserted between the function keyword and the following ( open
> parenthesis, if the function is anonymous (if it doesn't have a name).
> (Default: false)
> 
>> --insert-space-binary-operators: Controls whether a space is
>> inserted
> before and after binary operators (like +, -, *, /, &&, ||, etc.)
  (Default:

> true)
> 
>> --insert-space-comma-delimiter: Controls whether a space is inserted
> after comma delimiters in Object and Array literals. (Default: true)
> 
>> --collapse-empty-blocks: Controls whether empty blocks are collapsed
>> so
> that the opening and closing curly brace are both on the same line or
  not.

> (Default: false)
> 
>> --max-preserve-new-lines: Specify the maximum number of new line
> characters that are allowed to appear consecutively. (Default: 2)
> 
>> --semicolons: Controls how semicolons are handled. Valid values are
> insert, remove, and ignore. Insert means that missing semicolons are
> inserted. Remove means that all semicolons are removed, and ignore
> means that there is no change to semicolons in the file. (Default:
> insert)
> 
>> Additional notes:
>> 
>> If neither --write-files nor --list-files is specified, the
>> formatted
> source code is written to standard output instead.
> 
>> If no files are specified, asformat waits for standard input instead.
>> 
>> --
>> Josh Tynjala
>> Bowler Hat LLC <https://bowlerhat.dev/>

Re: Introducing asformat

Posted by Harbs <ha...@gmail.com>.
Yes. Most of us have similar stories. As long as you’re not afraid to start learning something new you will be surprised how much you can learn in small steps.

Harbs

> On Sep 29, 2022, at 12:02 AM, Josh Tynjala <jo...@bowlerhat.dev> wrote:
> 
> Around 2015 or so, I had never worked on a compiler, formatter, or linter.
> 
> I started trying to use the Royale compiler (still called the FlexJS
> compiler at the time) to create the AS3/MXML extension for VSCode. Soon, I
> found a bug in the compiler that prevented my VSCode extension from working
> properly. I tried my best to understand a small section of the compiler's
> code, and I was able to fix the bug and submit a pull request. Eventually,
> I fixed some more bugs, and I was asked to join the project as a
> contributor. Since then, I've learned how larger and larger parts of the
> compiler work. To be honest, it took probably 5-7 years before I really
> felt that I understood most of what the compiler was doing. It just takes a
> lot of time and persistence.
> 
> Recently, I was able to recognize that I could reuse large parts of the
> compiler's code to create a formatter and a linter for ActionScript (the
> ActionScript language name is where the "as" prefix of "asformat" and
> "aslint" comes from, of course). I had never created a formatter or a
> linter before, and it took some trial and error to figure out the best way
> to do things. For the formatter, I tried to format one little thing first,
> like `if (condition) {}` or something like that. Then, I slowly added more
> and more (for, while, try/catch, class A extends B, etc.). It took months
> of work, which was built on my previous years of work understanding and
> maintaining the compiler.
> 
> Honestly, like most of everything I've ever tried to learn, I started with
> one small thing. Don't try to understand everything all at once. At least
> not in detail. It's often fine to have a general idea of how something
> works at a high-level, even if you don't understand it completely. Then,
> you can dive into the details later. Anyway, over the course of years
> working on the same thing, you can really learn a lot.
> 
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
> 
> 
> On Wed, Sep 28, 2022 at 1:00 PM Maria Jose Esteve <mj...@iest.com> wrote:
> 
>> How can you know about so many things? asformat, aslint, linter... omg,
>> you guys never cease to amaze me... I had to look up the meaning of each of
>> these words :(
>> 
>> I don't feel able to help you with any of this but, Yishay, if you teach
>> me I can be your backup for the releases.
>> 
>> Hiedra
>> 
>> -----Mensaje original-----
>> De: Yishay Weiss <yi...@hotmail.com>
>> Enviado el: miércoles, 28 de septiembre de 2022 20:16
>> Para: dev@royale.apache.org
>> Asunto: RE: Introducing asformat
>> 
>> It's great to see this progress. I expect to see as-linter replacing
>> SonarQube in our current project. Do you think it would be hard to
>> integrate it with GitHub actions?
>> 
>> The -watch option is already being used and is a big productivity boost.
>> 
>> I expect I'll make use of asformat at some point as well. Thanks for all
>> this Josh.
>> 
>> I may get some time at the end of this month to work on a release, but I
>> would prefer to do it with another volunteer, to share knowledge and add
>> redundancy. Also, I want to use the new Azure VM I created (Apache funded)
>> instead of Alex's so we have redundancy in that respect as well.  The VM
>> isn't all set up yet so I will need to work on that.
>> 
>> 
>> 
>> 
>> 
>> From: Josh Tynjala<ma...@bowlerhat.dev>
>> Sent: Wednesday, September 28, 2022 6:35 PM
>> To: dev@royale.apache.org<ma...@royale.apache.org>
>> Subject: Re: Introducing asformat
>> 
>> A new release sounds good to me! I just updated the compiler release
>> notes, and there's a decent amount of stuff to be included. Not just these
>> formatter improvements, but also the new linter, headless JS RoyaleUnit
>> tests with Playwright, and the --watch compiler option are all new since
>> the last release.
>> 
>> --
>> Josh Tynjala
>> Bowler Hat LLC <https://bowlerhat.dev>
>> 
>> 
>> On Wed, Sep 28, 2022 at 6:45 AM Harbs <ha...@gmail.com> wrote:
>> 
>>> That's great!
>>> 
>>> This is a good reason to get another release out. :-)
>>> 
>>> Harbs
>>> 
>>>> On Sep 28, 2022, at 12:24 AM, Josh Tynjala
>>>> <jo...@bowlerhat.dev>
>>> wrote:
>>>> 
>>>> I just wanted to follow up by mentioning that I recently added the
>>> ability for the formatter load configuration files, in addition to the
>>> existing command line options. It will automatically detect an
>>> asformat-config.xml file in the current working directory, allowing
>>> you to easily specify configuration options for a specific project.
>>> You can also use a new -load-config option to load a configuration
>>> file from any path, not just the current working directory. You can
>>> use -skip-local-config-file to ignore the asformat-config.xml file.
>>>> 
>>>> Once we release the next Royale update, I plan to make
>>>> vscode-as3mxml
>>> automatically detect the asformat-config.xml file too, so you will be
>>> able to configure formatting options for both the command line and
>>> VSCode at the same time.
>>>> 
>>>> I also updated the Royale documentation to add a section for the
>>> formatter:
>>>> 
>>>> https://apache.github.io/royale-docs/formatter <
>>> https://apache.github.io/royale-docs/formatter><https://apache.github.
>>> io/royale-docs/formatter%3e>
>>>> 
>>>> --
>>>> Josh Tynjala
>>>> Bowler Hat LLC <https://bowlerhat.dev/>
>>>> 
>>>> 
>>>> On Wed, Sep 22, 2021 at 10:42 AM Josh Tynjala
>>>> <joshtynjala@bowlerhat.dev
>>> <ma...@bowlerhat.dev>> wrote:
>>>> Hey everyone,
>>>> 
>>>> I recently created asformat, which is a formatter for ActionScript
>> code.
>>> It is based on the Royale compiler's lexer that creates a stream of
>> tokens.
>>> One nice thing about working with the token stream versus a full AST
>>> (Abstract Syntax Tree) is that it's easier to keep track of existing
>>> whitespace to preserve it where appropriate.
>>>> 
>>>> In addition to command line usage, this formatter is intended to
>>> eventually be used by IDEs/editors, such as VSCode and Moonshine.
>>>> 
>>>> You can find asformat in nightly builds for now. I'm still testing
>>>> it
>>> with existing codebases, but I wanted to share my progress so that
>>> others could check it out, if interested.
>>>> 
>>>> Usage:
>>>> 
>>>> Format a file, and write it back to the file system:
>>>> 
>>>> asformat --write-files src/com/example/MyClass.as
>>>> 
>>>> Alternatively, format all .as files in a directory:
>>>> 
>>>> asformat --write-files src
>>>> 
>>>> Options:
>>>> 
>>>> --write-files: Writes the formatting changes back to the original
>> files.
>>> If a file has no formatting changes, it will not be modified. Alias: -w.
>>> Default: false.
>>>> 
>>>> --list-files: Lists the files that have been changed by formatting.
>>>> If a
>>> file has no formatting changes, it won't be listed. Alias: -l. Default:
>>> false.
>>>> 
>>>> --insert-spaces: Indents with spaces instead of tabs. (Default:
>>>> false)
>>>> 
>>>> --tab-width: The width of tabs when insert-spaces is specified.
>>> (Default: 4)
>>>> 
>>>> --insert-final-new-line: Adds a final empty line at the end of the
>>>> file,
>>> if one doesn't exist already. (Default: false)
>>>> 
>>>> --open-brace-new-line: Controls whether an opening curly brace is
>>>> placed
>>> on a new line, or is "cuddled" on the current line. (Default: true)
>>>> 
>>>> --insert-space-for-loop-semicolon: Controls whether a space is
>>>> inserted
>>> after the semicolons in a for() loop. (Default: true)
>>>> 
>>>> --insert-space-control-flow-keywords: Controls whether a space is
>>> inserted between control flow keywords (like if, for, while) and the
>>> following ( open parenthesis. (Default: true)
>>>> 
>>>> --insert-space-anonymous-function-keyword: Controls whether a space
>>>> is
>>> inserted between the function keyword and the following ( open
>>> parenthesis, if the function is anonymous (if it doesn't have a name).
>>> (Default: false)
>>>> 
>>>> --insert-space-binary-operators: Controls whether a space is
>>>> inserted
>>> before and after binary operators (like +, -, *, /, &&, ||, etc.)
>> (Default:
>>> true)
>>>> 
>>>> --insert-space-comma-delimiter: Controls whether a space is inserted
>>> after comma delimiters in Object and Array literals. (Default: true)
>>>> 
>>>> --collapse-empty-blocks: Controls whether empty blocks are collapsed
>>>> so
>>> that the opening and closing curly brace are both on the same line or
>> not.
>>> (Default: false)
>>>> 
>>>> --max-preserve-new-lines: Specify the maximum number of new line
>>> characters that are allowed to appear consecutively. (Default: 2)
>>>> 
>>>> --semicolons: Controls how semicolons are handled. Valid values are
>>> insert, remove, and ignore. Insert means that missing semicolons are
>>> inserted. Remove means that all semicolons are removed, and ignore
>>> means that there is no change to semicolons in the file. (Default:
>>> insert)
>>>> 
>>>> Additional notes:
>>>> 
>>>> If neither --write-files nor --list-files is specified, the
>>>> formatted
>>> source code is written to standard output instead.
>>>> 
>>>> If no files are specified, asformat waits for standard input instead.
>>>> 
>>>> --
>>>> Josh Tynjala
>>>> Bowler Hat LLC <https://bowlerhat.dev/>
>>> 
>>> 
>> 
>> 


Re: Introducing asformat

Posted by Josh Tynjala <jo...@bowlerhat.dev>.
Around 2015 or so, I had never worked on a compiler, formatter, or linter.

I started trying to use the Royale compiler (still called the FlexJS
compiler at the time) to create the AS3/MXML extension for VSCode. Soon, I
found a bug in the compiler that prevented my VSCode extension from working
properly. I tried my best to understand a small section of the compiler's
code, and I was able to fix the bug and submit a pull request. Eventually,
I fixed some more bugs, and I was asked to join the project as a
contributor. Since then, I've learned how larger and larger parts of the
compiler work. To be honest, it took probably 5-7 years before I really
felt that I understood most of what the compiler was doing. It just takes a
lot of time and persistence.

Recently, I was able to recognize that I could reuse large parts of the
compiler's code to create a formatter and a linter for ActionScript (the
ActionScript language name is where the "as" prefix of "asformat" and
"aslint" comes from, of course). I had never created a formatter or a
linter before, and it took some trial and error to figure out the best way
to do things. For the formatter, I tried to format one little thing first,
like `if (condition) {}` or something like that. Then, I slowly added more
and more (for, while, try/catch, class A extends B, etc.). It took months
of work, which was built on my previous years of work understanding and
maintaining the compiler.

Honestly, like most of everything I've ever tried to learn, I started with
one small thing. Don't try to understand everything all at once. At least
not in detail. It's often fine to have a general idea of how something
works at a high-level, even if you don't understand it completely. Then,
you can dive into the details later. Anyway, over the course of years
working on the same thing, you can really learn a lot.

--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>


On Wed, Sep 28, 2022 at 1:00 PM Maria Jose Esteve <mj...@iest.com> wrote:

> How can you know about so many things? asformat, aslint, linter... omg,
> you guys never cease to amaze me... I had to look up the meaning of each of
> these words :(
>
> I don't feel able to help you with any of this but, Yishay, if you teach
> me I can be your backup for the releases.
>
> Hiedra
>
> -----Mensaje original-----
> De: Yishay Weiss <yi...@hotmail.com>
> Enviado el: miércoles, 28 de septiembre de 2022 20:16
> Para: dev@royale.apache.org
> Asunto: RE: Introducing asformat
>
> It's great to see this progress. I expect to see as-linter replacing
> SonarQube in our current project. Do you think it would be hard to
> integrate it with GitHub actions?
>
> The -watch option is already being used and is a big productivity boost.
>
> I expect I'll make use of asformat at some point as well. Thanks for all
> this Josh.
>
> I may get some time at the end of this month to work on a release, but I
> would prefer to do it with another volunteer, to share knowledge and add
> redundancy. Also, I want to use the new Azure VM I created (Apache funded)
> instead of Alex's so we have redundancy in that respect as well.  The VM
> isn't all set up yet so I will need to work on that.
>
>
>
>
>
> From: Josh Tynjala<ma...@bowlerhat.dev>
> Sent: Wednesday, September 28, 2022 6:35 PM
> To: dev@royale.apache.org<ma...@royale.apache.org>
> Subject: Re: Introducing asformat
>
> A new release sounds good to me! I just updated the compiler release
> notes, and there's a decent amount of stuff to be included. Not just these
> formatter improvements, but also the new linter, headless JS RoyaleUnit
> tests with Playwright, and the --watch compiler option are all new since
> the last release.
>
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
>
>
> On Wed, Sep 28, 2022 at 6:45 AM Harbs <ha...@gmail.com> wrote:
>
> > That's great!
> >
> > This is a good reason to get another release out. :-)
> >
> > Harbs
> >
> > > On Sep 28, 2022, at 12:24 AM, Josh Tynjala
> > > <jo...@bowlerhat.dev>
> > wrote:
> > >
> > > I just wanted to follow up by mentioning that I recently added the
> > ability for the formatter load configuration files, in addition to the
> > existing command line options. It will automatically detect an
> > asformat-config.xml file in the current working directory, allowing
> > you to easily specify configuration options for a specific project.
> > You can also use a new -load-config option to load a configuration
> > file from any path, not just the current working directory. You can
> > use -skip-local-config-file to ignore the asformat-config.xml file.
> > >
> > > Once we release the next Royale update, I plan to make
> > > vscode-as3mxml
> > automatically detect the asformat-config.xml file too, so you will be
> > able to configure formatting options for both the command line and
> > VSCode at the same time.
> > >
> > > I also updated the Royale documentation to add a section for the
> > formatter:
> > >
> > > https://apache.github.io/royale-docs/formatter <
> > https://apache.github.io/royale-docs/formatter><https://apache.github.
> > io/royale-docs/formatter%3e>
> > >
> > > --
> > > Josh Tynjala
> > > Bowler Hat LLC <https://bowlerhat.dev/>
> > >
> > >
> > > On Wed, Sep 22, 2021 at 10:42 AM Josh Tynjala
> > > <joshtynjala@bowlerhat.dev
> > <ma...@bowlerhat.dev>> wrote:
> > > Hey everyone,
> > >
> > > I recently created asformat, which is a formatter for ActionScript
> code.
> > It is based on the Royale compiler's lexer that creates a stream of
> tokens.
> > One nice thing about working with the token stream versus a full AST
> > (Abstract Syntax Tree) is that it's easier to keep track of existing
> > whitespace to preserve it where appropriate.
> > >
> > > In addition to command line usage, this formatter is intended to
> > eventually be used by IDEs/editors, such as VSCode and Moonshine.
> > >
> > > You can find asformat in nightly builds for now. I'm still testing
> > > it
> > with existing codebases, but I wanted to share my progress so that
> > others could check it out, if interested.
> > >
> > > Usage:
> > >
> > > Format a file, and write it back to the file system:
> > >
> > > asformat --write-files src/com/example/MyClass.as
> > >
> > > Alternatively, format all .as files in a directory:
> > >
> > > asformat --write-files src
> > >
> > > Options:
> > >
> > > --write-files: Writes the formatting changes back to the original
> files.
> > If a file has no formatting changes, it will not be modified. Alias: -w.
> > Default: false.
> > >
> > > --list-files: Lists the files that have been changed by formatting.
> > > If a
> > file has no formatting changes, it won't be listed. Alias: -l. Default:
> > false.
> > >
> > > --insert-spaces: Indents with spaces instead of tabs. (Default:
> > > false)
> > >
> > > --tab-width: The width of tabs when insert-spaces is specified.
> > (Default: 4)
> > >
> > > --insert-final-new-line: Adds a final empty line at the end of the
> > > file,
> > if one doesn't exist already. (Default: false)
> > >
> > > --open-brace-new-line: Controls whether an opening curly brace is
> > > placed
> > on a new line, or is "cuddled" on the current line. (Default: true)
> > >
> > > --insert-space-for-loop-semicolon: Controls whether a space is
> > > inserted
> > after the semicolons in a for() loop. (Default: true)
> > >
> > > --insert-space-control-flow-keywords: Controls whether a space is
> > inserted between control flow keywords (like if, for, while) and the
> > following ( open parenthesis. (Default: true)
> > >
> > > --insert-space-anonymous-function-keyword: Controls whether a space
> > > is
> > inserted between the function keyword and the following ( open
> > parenthesis, if the function is anonymous (if it doesn't have a name).
> > (Default: false)
> > >
> > > --insert-space-binary-operators: Controls whether a space is
> > > inserted
> > before and after binary operators (like +, -, *, /, &&, ||, etc.)
> (Default:
> > true)
> > >
> > > --insert-space-comma-delimiter: Controls whether a space is inserted
> > after comma delimiters in Object and Array literals. (Default: true)
> > >
> > > --collapse-empty-blocks: Controls whether empty blocks are collapsed
> > > so
> > that the opening and closing curly brace are both on the same line or
> not.
> > (Default: false)
> > >
> > > --max-preserve-new-lines: Specify the maximum number of new line
> > characters that are allowed to appear consecutively. (Default: 2)
> > >
> > > --semicolons: Controls how semicolons are handled. Valid values are
> > insert, remove, and ignore. Insert means that missing semicolons are
> > inserted. Remove means that all semicolons are removed, and ignore
> > means that there is no change to semicolons in the file. (Default:
> > insert)
> > >
> > > Additional notes:
> > >
> > > If neither --write-files nor --list-files is specified, the
> > > formatted
> > source code is written to standard output instead.
> > >
> > > If no files are specified, asformat waits for standard input instead.
> > >
> > > --
> > > Josh Tynjala
> > > Bowler Hat LLC <https://bowlerhat.dev/>
> >
> >
>
>

RE: Introducing asformat

Posted by Yishay Weiss <yi...@hotmail.com>.
  *   I don't feel able to help you with any of this but, Yishay, if you teach me I can be your backup for the releases.

@Maria Jose Esteve<ma...@iest.com>, the first step in getting a release done is making sure all builds on CI are running without issue. For that we will need the CI to be up and running.

@Alex Harui<ma...@adobe.com>, It looks like CI is down. Can you take a look? I hope to work on creating my own CI next week.

Thanks.

From: Maria Jose Esteve<ma...@iest.com>
Sent: Wednesday, September 28, 2022 11:00 PM
To: dev@royale.apache.org<ma...@royale.apache.org>
Subject: RE: Introducing asformat

How can you know about so many things? asformat, aslint, linter... omg, you guys never cease to amaze me... I had to look up the meaning of each of these words :(

I don't feel able to help you with any of this but, Yishay, if you teach me I can be your backup for the releases.

Hiedra

-----Mensaje original-----
De: Yishay Weiss <yi...@hotmail.com>
Enviado el: miércoles, 28 de septiembre de 2022 20:16
Para: dev@royale.apache.org
Asunto: RE: Introducing asformat

It's great to see this progress. I expect to see as-linter replacing SonarQube in our current project. Do you think it would be hard to integrate it with GitHub actions?

The -watch option is already being used and is a big productivity boost.

I expect I'll make use of asformat at some point as well. Thanks for all this Josh.

I may get some time at the end of this month to work on a release, but I would prefer to do it with another volunteer, to share knowledge and add redundancy. Also, I want to use the new Azure VM I created (Apache funded) instead of Alex's so we have redundancy in that respect as well.  The VM isn't all set up yet so I will need to work on that.





From: Josh Tynjala<ma...@bowlerhat.dev>
Sent: Wednesday, September 28, 2022 6:35 PM
To: dev@royale.apache.org<ma...@royale.apache.org>
Subject: Re: Introducing asformat

A new release sounds good to me! I just updated the compiler release notes, and there's a decent amount of stuff to be included. Not just these formatter improvements, but also the new linter, headless JS RoyaleUnit tests with Playwright, and the --watch compiler option are all new since the last release.

--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>


On Wed, Sep 28, 2022 at 6:45 AM Harbs <ha...@gmail.com> wrote:

> That's great!
>
> This is a good reason to get another release out. :-)
>
> Harbs
>
> > On Sep 28, 2022, at 12:24 AM, Josh Tynjala
> > <jo...@bowlerhat.dev>
> wrote:
> >
> > I just wanted to follow up by mentioning that I recently added the
> ability for the formatter load configuration files, in addition to the
> existing command line options. It will automatically detect an
> asformat-config.xml file in the current working directory, allowing
> you to easily specify configuration options for a specific project.
> You can also use a new -load-config option to load a configuration
> file from any path, not just the current working directory. You can
> use -skip-local-config-file to ignore the asformat-config.xml file.
> >
> > Once we release the next Royale update, I plan to make
> > vscode-as3mxml
> automatically detect the asformat-config.xml file too, so you will be
> able to configure formatting options for both the command line and
> VSCode at the same time.
> >
> > I also updated the Royale documentation to add a section for the
> formatter:
> >
> > https://apache.github.io/royale-docs/formatter <
> https://apache.github.io/royale-docs/formatter><https://apache.github<https://apache.github.io/royale-docs/formatter%3e%3chttps:/apache.github>.
> io/royale-docs/formatter%3e>
> >
> > --
> > Josh Tynjala
> > Bowler Hat LLC <https://bowlerhat.dev/>
> >
> >
> > On Wed, Sep 22, 2021 at 10:42 AM Josh Tynjala
> > <joshtynjala@bowlerhat.dev
> <ma...@bowlerhat.dev>> wrote:
> > Hey everyone,
> >
> > I recently created asformat, which is a formatter for ActionScript code.
> It is based on the Royale compiler's lexer that creates a stream of tokens.
> One nice thing about working with the token stream versus a full AST
> (Abstract Syntax Tree) is that it's easier to keep track of existing
> whitespace to preserve it where appropriate.
> >
> > In addition to command line usage, this formatter is intended to
> eventually be used by IDEs/editors, such as VSCode and Moonshine.
> >
> > You can find asformat in nightly builds for now. I'm still testing
> > it
> with existing codebases, but I wanted to share my progress so that
> others could check it out, if interested.
> >
> > Usage:
> >
> > Format a file, and write it back to the file system:
> >
> > asformat --write-files src/com/example/MyClass.as
> >
> > Alternatively, format all .as files in a directory:
> >
> > asformat --write-files src
> >
> > Options:
> >
> > --write-files: Writes the formatting changes back to the original files.
> If a file has no formatting changes, it will not be modified. Alias: -w.
> Default: false.
> >
> > --list-files: Lists the files that have been changed by formatting.
> > If a
> file has no formatting changes, it won't be listed. Alias: -l. Default:
> false.
> >
> > --insert-spaces: Indents with spaces instead of tabs. (Default:
> > false)
> >
> > --tab-width: The width of tabs when insert-spaces is specified.
> (Default: 4)
> >
> > --insert-final-new-line: Adds a final empty line at the end of the
> > file,
> if one doesn't exist already. (Default: false)
> >
> > --open-brace-new-line: Controls whether an opening curly brace is
> > placed
> on a new line, or is "cuddled" on the current line. (Default: true)
> >
> > --insert-space-for-loop-semicolon: Controls whether a space is
> > inserted
> after the semicolons in a for() loop. (Default: true)
> >
> > --insert-space-control-flow-keywords: Controls whether a space is
> inserted between control flow keywords (like if, for, while) and the
> following ( open parenthesis. (Default: true)
> >
> > --insert-space-anonymous-function-keyword: Controls whether a space
> > is
> inserted between the function keyword and the following ( open
> parenthesis, if the function is anonymous (if it doesn't have a name).
> (Default: false)
> >
> > --insert-space-binary-operators: Controls whether a space is
> > inserted
> before and after binary operators (like +, -, *, /, &&, ||, etc.) (Default:
> true)
> >
> > --insert-space-comma-delimiter: Controls whether a space is inserted
> after comma delimiters in Object and Array literals. (Default: true)
> >
> > --collapse-empty-blocks: Controls whether empty blocks are collapsed
> > so
> that the opening and closing curly brace are both on the same line or not.
> (Default: false)
> >
> > --max-preserve-new-lines: Specify the maximum number of new line
> characters that are allowed to appear consecutively. (Default: 2)
> >
> > --semicolons: Controls how semicolons are handled. Valid values are
> insert, remove, and ignore. Insert means that missing semicolons are
> inserted. Remove means that all semicolons are removed, and ignore
> means that there is no change to semicolons in the file. (Default:
> insert)
> >
> > Additional notes:
> >
> > If neither --write-files nor --list-files is specified, the
> > formatted
> source code is written to standard output instead.
> >
> > If no files are specified, asformat waits for standard input instead.
> >
> > --
> > Josh Tynjala
> > Bowler Hat LLC <https://bowlerhat.dev/>
>
>


RE: Introducing asformat

Posted by Maria Jose Esteve <mj...@iest.com>.
How can you know about so many things? asformat, aslint, linter... omg, you guys never cease to amaze me... I had to look up the meaning of each of these words :(

I don't feel able to help you with any of this but, Yishay, if you teach me I can be your backup for the releases.

Hiedra

-----Mensaje original-----
De: Yishay Weiss <yi...@hotmail.com> 
Enviado el: miércoles, 28 de septiembre de 2022 20:16
Para: dev@royale.apache.org
Asunto: RE: Introducing asformat

It's great to see this progress. I expect to see as-linter replacing SonarQube in our current project. Do you think it would be hard to integrate it with GitHub actions?

The -watch option is already being used and is a big productivity boost.

I expect I'll make use of asformat at some point as well. Thanks for all this Josh.

I may get some time at the end of this month to work on a release, but I would prefer to do it with another volunteer, to share knowledge and add redundancy. Also, I want to use the new Azure VM I created (Apache funded) instead of Alex's so we have redundancy in that respect as well.  The VM isn't all set up yet so I will need to work on that.





From: Josh Tynjala<ma...@bowlerhat.dev>
Sent: Wednesday, September 28, 2022 6:35 PM
To: dev@royale.apache.org<ma...@royale.apache.org>
Subject: Re: Introducing asformat

A new release sounds good to me! I just updated the compiler release notes, and there's a decent amount of stuff to be included. Not just these formatter improvements, but also the new linter, headless JS RoyaleUnit tests with Playwright, and the --watch compiler option are all new since the last release.

--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>


On Wed, Sep 28, 2022 at 6:45 AM Harbs <ha...@gmail.com> wrote:

> That's great!
>
> This is a good reason to get another release out. :-)
>
> Harbs
>
> > On Sep 28, 2022, at 12:24 AM, Josh Tynjala 
> > <jo...@bowlerhat.dev>
> wrote:
> >
> > I just wanted to follow up by mentioning that I recently added the
> ability for the formatter load configuration files, in addition to the 
> existing command line options. It will automatically detect an 
> asformat-config.xml file in the current working directory, allowing 
> you to easily specify configuration options for a specific project. 
> You can also use a new -load-config option to load a configuration 
> file from any path, not just the current working directory. You can 
> use -skip-local-config-file to ignore the asformat-config.xml file.
> >
> > Once we release the next Royale update, I plan to make 
> > vscode-as3mxml
> automatically detect the asformat-config.xml file too, so you will be 
> able to configure formatting options for both the command line and 
> VSCode at the same time.
> >
> > I also updated the Royale documentation to add a section for the
> formatter:
> >
> > https://apache.github.io/royale-docs/formatter <
> https://apache.github.io/royale-docs/formatter><https://apache.github.
> io/royale-docs/formatter%3e>
> >
> > --
> > Josh Tynjala
> > Bowler Hat LLC <https://bowlerhat.dev/>
> >
> >
> > On Wed, Sep 22, 2021 at 10:42 AM Josh Tynjala 
> > <joshtynjala@bowlerhat.dev
> <ma...@bowlerhat.dev>> wrote:
> > Hey everyone,
> >
> > I recently created asformat, which is a formatter for ActionScript code.
> It is based on the Royale compiler's lexer that creates a stream of tokens.
> One nice thing about working with the token stream versus a full AST 
> (Abstract Syntax Tree) is that it's easier to keep track of existing 
> whitespace to preserve it where appropriate.
> >
> > In addition to command line usage, this formatter is intended to
> eventually be used by IDEs/editors, such as VSCode and Moonshine.
> >
> > You can find asformat in nightly builds for now. I'm still testing 
> > it
> with existing codebases, but I wanted to share my progress so that 
> others could check it out, if interested.
> >
> > Usage:
> >
> > Format a file, and write it back to the file system:
> >
> > asformat --write-files src/com/example/MyClass.as
> >
> > Alternatively, format all .as files in a directory:
> >
> > asformat --write-files src
> >
> > Options:
> >
> > --write-files: Writes the formatting changes back to the original files.
> If a file has no formatting changes, it will not be modified. Alias: -w.
> Default: false.
> >
> > --list-files: Lists the files that have been changed by formatting. 
> > If a
> file has no formatting changes, it won't be listed. Alias: -l. Default:
> false.
> >
> > --insert-spaces: Indents with spaces instead of tabs. (Default: 
> > false)
> >
> > --tab-width: The width of tabs when insert-spaces is specified.
> (Default: 4)
> >
> > --insert-final-new-line: Adds a final empty line at the end of the 
> > file,
> if one doesn't exist already. (Default: false)
> >
> > --open-brace-new-line: Controls whether an opening curly brace is 
> > placed
> on a new line, or is "cuddled" on the current line. (Default: true)
> >
> > --insert-space-for-loop-semicolon: Controls whether a space is 
> > inserted
> after the semicolons in a for() loop. (Default: true)
> >
> > --insert-space-control-flow-keywords: Controls whether a space is
> inserted between control flow keywords (like if, for, while) and the 
> following ( open parenthesis. (Default: true)
> >
> > --insert-space-anonymous-function-keyword: Controls whether a space 
> > is
> inserted between the function keyword and the following ( open 
> parenthesis, if the function is anonymous (if it doesn't have a name). 
> (Default: false)
> >
> > --insert-space-binary-operators: Controls whether a space is 
> > inserted
> before and after binary operators (like +, -, *, /, &&, ||, etc.) (Default:
> true)
> >
> > --insert-space-comma-delimiter: Controls whether a space is inserted
> after comma delimiters in Object and Array literals. (Default: true)
> >
> > --collapse-empty-blocks: Controls whether empty blocks are collapsed 
> > so
> that the opening and closing curly brace are both on the same line or not.
> (Default: false)
> >
> > --max-preserve-new-lines: Specify the maximum number of new line
> characters that are allowed to appear consecutively. (Default: 2)
> >
> > --semicolons: Controls how semicolons are handled. Valid values are
> insert, remove, and ignore. Insert means that missing semicolons are 
> inserted. Remove means that all semicolons are removed, and ignore 
> means that there is no change to semicolons in the file. (Default: 
> insert)
> >
> > Additional notes:
> >
> > If neither --write-files nor --list-files is specified, the 
> > formatted
> source code is written to standard output instead.
> >
> > If no files are specified, asformat waits for standard input instead.
> >
> > --
> > Josh Tynjala
> > Bowler Hat LLC <https://bowlerhat.dev/>
>
>


RE: Introducing asformat

Posted by Yishay Weiss <yi...@hotmail.com>.
Hopefully we will have something next week to work with.

From: Harbs<ma...@gmail.com>
Sent: Wednesday, September 28, 2022 9:21 PM
To: Apache Royale Development<ma...@royale.apache.org>
Subject: Re: Introducing asformat

Yishay,

I can work on it with you after Sukkot.

Harbs

> On Sep 28, 2022, at 9:16 PM, Yishay Weiss <yi...@hotmail.com> wrote:
>
> It’s great to see this progress. I expect to see as-linter replacing SonarQube in our current project. Do you think it would be hard to integrate it with GitHub actions?
>
> The –watch option is already being used and is a big productivity boost.
>
> I expect I’ll make use of asformat at some point as well. Thanks for all this Josh.
>
> I may get some time at the end of this month to work on a release, but I would prefer to do it with another volunteer, to share knowledge and add redundancy. Also, I want to use the new Azure VM I created (Apache funded) instead of Alex’s so we have redundancy in that respect as well.  The VM isn’t all set up yet so I will need to work on that.
>
>
>
>
>
> From: Josh Tynjala<mailto:joshtynjala@bowlerhat.dev <ma...@bowlerhat.dev>>
> Sent: Wednesday, September 28, 2022 6:35 PM
> To: dev@royale.apache.org <ma...@royale.apache.org><mailto:dev@royale.apache.org <ma...@royale.apache.org>>
> Subject: Re: Introducing asformat
>
> A new release sounds good to me! I just updated the compiler release notes,
> and there's a decent amount of stuff to be included. Not just these
> formatter improvements, but also the new linter, headless JS RoyaleUnit
> tests with Playwright, and the --watch compiler option are all new since
> the last release.
>
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
>
>
> On Wed, Sep 28, 2022 at 6:45 AM Harbs <ha...@gmail.com> wrote:
>
>> That’s great!
>>
>> This is a good reason to get another release out… :-)
>>
>> Harbs
>>
>>> On Sep 28, 2022, at 12:24 AM, Josh Tynjala <jo...@bowlerhat.dev>
>> wrote:
>>>
>>> I just wanted to follow up by mentioning that I recently added the
>> ability for the formatter load configuration files, in addition to the
>> existing command line options. It will automatically detect an
>> asformat-config.xml file in the current working directory, allowing you to
>> easily specify configuration options for a specific project. You can also
>> use a new -load-config option to load a configuration file from any path,
>> not just the current working directory. You can use -skip-local-config-file
>> to ignore the asformat-config.xml file.
>>>
>>> Once we release the next Royale update, I plan to make vscode-as3mxml
>> automatically detect the asformat-config.xml file too, so you will be able
>> to configure formatting options for both the command line and VSCode at the
>> same time.
>>>
>>> I also updated the Royale documentation to add a section for the
>> formatter:
>>>
>>> https://apache.github.io/royale-docs/formatter <
>> https://apache.github.io/royale-docs/formatter <https://apache.github.io/royale-docs/formatter>><https://apache.github.io/royale-docs/formatter%3e <https://apache.github.io/royale-docs/formatter%3e>>
>>>
>>> --
>>> Josh Tynjala
>>> Bowler Hat LLC <https://bowlerhat.dev/>
>>>
>>>
>>> On Wed, Sep 22, 2021 at 10:42 AM Josh Tynjala <joshtynjala@bowlerhat.dev
>> <ma...@bowlerhat.dev>> wrote:
>>> Hey everyone,
>>>
>>> I recently created asformat, which is a formatter for ActionScript code.
>> It is based on the Royale compiler's lexer that creates a stream of tokens.
>> One nice thing about working with the token stream versus a full AST
>> (Abstract Syntax Tree) is that it's easier to keep track of existing
>> whitespace to preserve it where appropriate.
>>>
>>> In addition to command line usage, this formatter is intended to
>> eventually be used by IDEs/editors, such as VSCode and Moonshine.
>>>
>>> You can find asformat in nightly builds for now. I'm still testing it
>> with existing codebases, but I wanted to share my progress so that others
>> could check it out, if interested.
>>>
>>> Usage:
>>>
>>> Format a file, and write it back to the file system:
>>>
>>> asformat --write-files src/com/example/MyClass.as
>>>
>>> Alternatively, format all .as files in a directory:
>>>
>>> asformat --write-files src
>>>
>>> Options:
>>>
>>> --write-files: Writes the formatting changes back to the original files.
>> If a file has no formatting changes, it will not be modified. Alias: -w.
>> Default: false.
>>>
>>> --list-files: Lists the files that have been changed by formatting. If a
>> file has no formatting changes, it won't be listed. Alias: -l. Default:
>> false.
>>>
>>> --insert-spaces: Indents with spaces instead of tabs. (Default: false)
>>>
>>> --tab-width: The width of tabs when insert-spaces is specified.
>> (Default: 4)
>>>
>>> --insert-final-new-line: Adds a final empty line at the end of the file,
>> if one doesn't exist already. (Default: false)
>>>
>>> --open-brace-new-line: Controls whether an opening curly brace is placed
>> on a new line, or is "cuddled" on the current line. (Default: true)
>>>
>>> --insert-space-for-loop-semicolon: Controls whether a space is inserted
>> after the semicolons in a for() loop. (Default: true)
>>>
>>> --insert-space-control-flow-keywords: Controls whether a space is
>> inserted between control flow keywords (like if, for, while) and the
>> following ( open parenthesis. (Default: true)
>>>
>>> --insert-space-anonymous-function-keyword: Controls whether a space is
>> inserted between the function keyword and the following ( open parenthesis,
>> if the function is anonymous (if it doesn't have a name). (Default: false)
>>>
>>> --insert-space-binary-operators: Controls whether a space is inserted
>> before and after binary operators (like +, -, *, /, &&, ||, etc.) (Default:
>> true)
>>>
>>> --insert-space-comma-delimiter: Controls whether a space is inserted
>> after comma delimiters in Object and Array literals. (Default: true)
>>>
>>> --collapse-empty-blocks: Controls whether empty blocks are collapsed so
>> that the opening and closing curly brace are both on the same line or not.
>> (Default: false)
>>>
>>> --max-preserve-new-lines: Specify the maximum number of new line
>> characters that are allowed to appear consecutively. (Default: 2)
>>>
>>> --semicolons: Controls how semicolons are handled. Valid values are
>> insert, remove, and ignore. Insert means that missing semicolons are
>> inserted. Remove means that all semicolons are removed, and ignore means
>> that there is no change to semicolons in the file. (Default: insert)
>>>
>>> Additional notes:
>>>
>>> If neither --write-files nor --list-files is specified, the formatted
>> source code is written to standard output instead.
>>>
>>> If no files are specified, asformat waits for standard input instead.
>>>
>>> --
>>> Josh Tynjala
>>> Bowler Hat LLC <https://bowlerhat.dev/>


RE: Introducing asformat

Posted by Yishay Weiss <yi...@hotmail.com>.
Sounds like a plan

From: Harbs<ma...@gmail.com>
Sent: Wednesday, September 28, 2022 9:21 PM
To: Apache Royale Development<ma...@royale.apache.org>
Subject: Re: Introducing asformat

Yishay,

I can work on it with you after Sukkot.

Harbs

> On Sep 28, 2022, at 9:16 PM, Yishay Weiss <yi...@hotmail.com> wrote:
>
> It’s great to see this progress. I expect to see as-linter replacing SonarQube in our current project. Do you think it would be hard to integrate it with GitHub actions?
>
> The –watch option is already being used and is a big productivity boost.
>
> I expect I’ll make use of asformat at some point as well. Thanks for all this Josh.
>
> I may get some time at the end of this month to work on a release, but I would prefer to do it with another volunteer, to share knowledge and add redundancy. Also, I want to use the new Azure VM I created (Apache funded) instead of Alex’s so we have redundancy in that respect as well.  The VM isn’t all set up yet so I will need to work on that.
>
>
>
>
>
> From: Josh Tynjala<mailto:joshtynjala@bowlerhat.dev <ma...@bowlerhat.dev>>
> Sent: Wednesday, September 28, 2022 6:35 PM
> To: dev@royale.apache.org <ma...@royale.apache.org><mailto:dev@royale.apache.org <ma...@royale.apache.org>>
> Subject: Re: Introducing asformat
>
> A new release sounds good to me! I just updated the compiler release notes,
> and there's a decent amount of stuff to be included. Not just these
> formatter improvements, but also the new linter, headless JS RoyaleUnit
> tests with Playwright, and the --watch compiler option are all new since
> the last release.
>
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
>
>
> On Wed, Sep 28, 2022 at 6:45 AM Harbs <ha...@gmail.com> wrote:
>
>> That’s great!
>>
>> This is a good reason to get another release out… :-)
>>
>> Harbs
>>
>>> On Sep 28, 2022, at 12:24 AM, Josh Tynjala <jo...@bowlerhat.dev>
>> wrote:
>>>
>>> I just wanted to follow up by mentioning that I recently added the
>> ability for the formatter load configuration files, in addition to the
>> existing command line options. It will automatically detect an
>> asformat-config.xml file in the current working directory, allowing you to
>> easily specify configuration options for a specific project. You can also
>> use a new -load-config option to load a configuration file from any path,
>> not just the current working directory. You can use -skip-local-config-file
>> to ignore the asformat-config.xml file.
>>>
>>> Once we release the next Royale update, I plan to make vscode-as3mxml
>> automatically detect the asformat-config.xml file too, so you will be able
>> to configure formatting options for both the command line and VSCode at the
>> same time.
>>>
>>> I also updated the Royale documentation to add a section for the
>> formatter:
>>>
>>> https://apache.github.io/royale-docs/formatter <
>> https://apache.github.io/royale-docs/formatter <https://apache.github.io/royale-docs/formatter>><https://apache.github.io/royale-docs/formatter%3e <https://apache.github.io/royale-docs/formatter%3e>>
>>>
>>> --
>>> Josh Tynjala
>>> Bowler Hat LLC <https://bowlerhat.dev/>
>>>
>>>
>>> On Wed, Sep 22, 2021 at 10:42 AM Josh Tynjala <joshtynjala@bowlerhat.dev
>> <ma...@bowlerhat.dev>> wrote:
>>> Hey everyone,
>>>
>>> I recently created asformat, which is a formatter for ActionScript code.
>> It is based on the Royale compiler's lexer that creates a stream of tokens.
>> One nice thing about working with the token stream versus a full AST
>> (Abstract Syntax Tree) is that it's easier to keep track of existing
>> whitespace to preserve it where appropriate.
>>>
>>> In addition to command line usage, this formatter is intended to
>> eventually be used by IDEs/editors, such as VSCode and Moonshine.
>>>
>>> You can find asformat in nightly builds for now. I'm still testing it
>> with existing codebases, but I wanted to share my progress so that others
>> could check it out, if interested.
>>>
>>> Usage:
>>>
>>> Format a file, and write it back to the file system:
>>>
>>> asformat --write-files src/com/example/MyClass.as
>>>
>>> Alternatively, format all .as files in a directory:
>>>
>>> asformat --write-files src
>>>
>>> Options:
>>>
>>> --write-files: Writes the formatting changes back to the original files.
>> If a file has no formatting changes, it will not be modified. Alias: -w.
>> Default: false.
>>>
>>> --list-files: Lists the files that have been changed by formatting. If a
>> file has no formatting changes, it won't be listed. Alias: -l. Default:
>> false.
>>>
>>> --insert-spaces: Indents with spaces instead of tabs. (Default: false)
>>>
>>> --tab-width: The width of tabs when insert-spaces is specified.
>> (Default: 4)
>>>
>>> --insert-final-new-line: Adds a final empty line at the end of the file,
>> if one doesn't exist already. (Default: false)
>>>
>>> --open-brace-new-line: Controls whether an opening curly brace is placed
>> on a new line, or is "cuddled" on the current line. (Default: true)
>>>
>>> --insert-space-for-loop-semicolon: Controls whether a space is inserted
>> after the semicolons in a for() loop. (Default: true)
>>>
>>> --insert-space-control-flow-keywords: Controls whether a space is
>> inserted between control flow keywords (like if, for, while) and the
>> following ( open parenthesis. (Default: true)
>>>
>>> --insert-space-anonymous-function-keyword: Controls whether a space is
>> inserted between the function keyword and the following ( open parenthesis,
>> if the function is anonymous (if it doesn't have a name). (Default: false)
>>>
>>> --insert-space-binary-operators: Controls whether a space is inserted
>> before and after binary operators (like +, -, *, /, &&, ||, etc.) (Default:
>> true)
>>>
>>> --insert-space-comma-delimiter: Controls whether a space is inserted
>> after comma delimiters in Object and Array literals. (Default: true)
>>>
>>> --collapse-empty-blocks: Controls whether empty blocks are collapsed so
>> that the opening and closing curly brace are both on the same line or not.
>> (Default: false)
>>>
>>> --max-preserve-new-lines: Specify the maximum number of new line
>> characters that are allowed to appear consecutively. (Default: 2)
>>>
>>> --semicolons: Controls how semicolons are handled. Valid values are
>> insert, remove, and ignore. Insert means that missing semicolons are
>> inserted. Remove means that all semicolons are removed, and ignore means
>> that there is no change to semicolons in the file. (Default: insert)
>>>
>>> Additional notes:
>>>
>>> If neither --write-files nor --list-files is specified, the formatted
>> source code is written to standard output instead.
>>>
>>> If no files are specified, asformat waits for standard input instead.
>>>
>>> --
>>> Josh Tynjala
>>> Bowler Hat LLC <https://bowlerhat.dev/>


Re: Introducing asformat

Posted by Harbs <ha...@gmail.com>.
Yishay,

I can work on it with you after Sukkot.

Harbs

> On Sep 28, 2022, at 9:16 PM, Yishay Weiss <yi...@hotmail.com> wrote:
> 
> It’s great to see this progress. I expect to see as-linter replacing SonarQube in our current project. Do you think it would be hard to integrate it with GitHub actions?
> 
> The –watch option is already being used and is a big productivity boost.
> 
> I expect I’ll make use of asformat at some point as well. Thanks for all this Josh.
> 
> I may get some time at the end of this month to work on a release, but I would prefer to do it with another volunteer, to share knowledge and add redundancy. Also, I want to use the new Azure VM I created (Apache funded) instead of Alex’s so we have redundancy in that respect as well.  The VM isn’t all set up yet so I will need to work on that.
> 
> 
> 
> 
> 
> From: Josh Tynjala<mailto:joshtynjala@bowlerhat.dev <ma...@bowlerhat.dev>>
> Sent: Wednesday, September 28, 2022 6:35 PM
> To: dev@royale.apache.org <ma...@royale.apache.org><mailto:dev@royale.apache.org <ma...@royale.apache.org>>
> Subject: Re: Introducing asformat
> 
> A new release sounds good to me! I just updated the compiler release notes,
> and there's a decent amount of stuff to be included. Not just these
> formatter improvements, but also the new linter, headless JS RoyaleUnit
> tests with Playwright, and the --watch compiler option are all new since
> the last release.
> 
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
> 
> 
> On Wed, Sep 28, 2022 at 6:45 AM Harbs <ha...@gmail.com> wrote:
> 
>> That’s great!
>> 
>> This is a good reason to get another release out… :-)
>> 
>> Harbs
>> 
>>> On Sep 28, 2022, at 12:24 AM, Josh Tynjala <jo...@bowlerhat.dev>
>> wrote:
>>> 
>>> I just wanted to follow up by mentioning that I recently added the
>> ability for the formatter load configuration files, in addition to the
>> existing command line options. It will automatically detect an
>> asformat-config.xml file in the current working directory, allowing you to
>> easily specify configuration options for a specific project. You can also
>> use a new -load-config option to load a configuration file from any path,
>> not just the current working directory. You can use -skip-local-config-file
>> to ignore the asformat-config.xml file.
>>> 
>>> Once we release the next Royale update, I plan to make vscode-as3mxml
>> automatically detect the asformat-config.xml file too, so you will be able
>> to configure formatting options for both the command line and VSCode at the
>> same time.
>>> 
>>> I also updated the Royale documentation to add a section for the
>> formatter:
>>> 
>>> https://apache.github.io/royale-docs/formatter <
>> https://apache.github.io/royale-docs/formatter <https://apache.github.io/royale-docs/formatter>><https://apache.github.io/royale-docs/formatter%3e <https://apache.github.io/royale-docs/formatter%3e>>
>>> 
>>> --
>>> Josh Tynjala
>>> Bowler Hat LLC <https://bowlerhat.dev/>
>>> 
>>> 
>>> On Wed, Sep 22, 2021 at 10:42 AM Josh Tynjala <joshtynjala@bowlerhat.dev
>> <ma...@bowlerhat.dev>> wrote:
>>> Hey everyone,
>>> 
>>> I recently created asformat, which is a formatter for ActionScript code.
>> It is based on the Royale compiler's lexer that creates a stream of tokens.
>> One nice thing about working with the token stream versus a full AST
>> (Abstract Syntax Tree) is that it's easier to keep track of existing
>> whitespace to preserve it where appropriate.
>>> 
>>> In addition to command line usage, this formatter is intended to
>> eventually be used by IDEs/editors, such as VSCode and Moonshine.
>>> 
>>> You can find asformat in nightly builds for now. I'm still testing it
>> with existing codebases, but I wanted to share my progress so that others
>> could check it out, if interested.
>>> 
>>> Usage:
>>> 
>>> Format a file, and write it back to the file system:
>>> 
>>> asformat --write-files src/com/example/MyClass.as
>>> 
>>> Alternatively, format all .as files in a directory:
>>> 
>>> asformat --write-files src
>>> 
>>> Options:
>>> 
>>> --write-files: Writes the formatting changes back to the original files.
>> If a file has no formatting changes, it will not be modified. Alias: -w.
>> Default: false.
>>> 
>>> --list-files: Lists the files that have been changed by formatting. If a
>> file has no formatting changes, it won't be listed. Alias: -l. Default:
>> false.
>>> 
>>> --insert-spaces: Indents with spaces instead of tabs. (Default: false)
>>> 
>>> --tab-width: The width of tabs when insert-spaces is specified.
>> (Default: 4)
>>> 
>>> --insert-final-new-line: Adds a final empty line at the end of the file,
>> if one doesn't exist already. (Default: false)
>>> 
>>> --open-brace-new-line: Controls whether an opening curly brace is placed
>> on a new line, or is "cuddled" on the current line. (Default: true)
>>> 
>>> --insert-space-for-loop-semicolon: Controls whether a space is inserted
>> after the semicolons in a for() loop. (Default: true)
>>> 
>>> --insert-space-control-flow-keywords: Controls whether a space is
>> inserted between control flow keywords (like if, for, while) and the
>> following ( open parenthesis. (Default: true)
>>> 
>>> --insert-space-anonymous-function-keyword: Controls whether a space is
>> inserted between the function keyword and the following ( open parenthesis,
>> if the function is anonymous (if it doesn't have a name). (Default: false)
>>> 
>>> --insert-space-binary-operators: Controls whether a space is inserted
>> before and after binary operators (like +, -, *, /, &&, ||, etc.) (Default:
>> true)
>>> 
>>> --insert-space-comma-delimiter: Controls whether a space is inserted
>> after comma delimiters in Object and Array literals. (Default: true)
>>> 
>>> --collapse-empty-blocks: Controls whether empty blocks are collapsed so
>> that the opening and closing curly brace are both on the same line or not.
>> (Default: false)
>>> 
>>> --max-preserve-new-lines: Specify the maximum number of new line
>> characters that are allowed to appear consecutively. (Default: 2)
>>> 
>>> --semicolons: Controls how semicolons are handled. Valid values are
>> insert, remove, and ignore. Insert means that missing semicolons are
>> inserted. Remove means that all semicolons are removed, and ignore means
>> that there is no change to semicolons in the file. (Default: insert)
>>> 
>>> Additional notes:
>>> 
>>> If neither --write-files nor --list-files is specified, the formatted
>> source code is written to standard output instead.
>>> 
>>> If no files are specified, asformat waits for standard input instead.
>>> 
>>> --
>>> Josh Tynjala
>>> Bowler Hat LLC <https://bowlerhat.dev/>


Re: Introducing asformat

Posted by Josh Tynjala <jo...@bowlerhat.dev>.
If the aslint command line linter doesn't find issues, its exit code will
be 0. If it finds issues, the exit code will be non-zero, and that should
automatically cause the build to fail on Github Actions. Basically the same
as running the compiler.

--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>


On Wed, Sep 28, 2022 at 11:16 AM Yishay Weiss <yi...@hotmail.com>
wrote:

> It’s great to see this progress. I expect to see as-linter replacing
> SonarQube in our current project. Do you think it would be hard to
> integrate it with GitHub actions?
>
> The –watch option is already being used and is a big productivity boost.
>
> I expect I’ll make use of asformat at some point as well. Thanks for all
> this Josh.
>
> I may get some time at the end of this month to work on a release, but I
> would prefer to do it with another volunteer, to share knowledge and add
> redundancy. Also, I want to use the new Azure VM I created (Apache funded)
> instead of Alex’s so we have redundancy in that respect as well.  The VM
> isn’t all set up yet so I will need to work on that.
>
>
>
>
>
> From: Josh Tynjala<ma...@bowlerhat.dev>
> Sent: Wednesday, September 28, 2022 6:35 PM
> To: dev@royale.apache.org<ma...@royale.apache.org>
> Subject: Re: Introducing asformat
>
> A new release sounds good to me! I just updated the compiler release notes,
> and there's a decent amount of stuff to be included. Not just these
> formatter improvements, but also the new linter, headless JS RoyaleUnit
> tests with Playwright, and the --watch compiler option are all new since
> the last release.
>
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
>
>
> On Wed, Sep 28, 2022 at 6:45 AM Harbs <ha...@gmail.com> wrote:
>
> > That’s great!
> >
> > This is a good reason to get another release out… :-)
> >
> > Harbs
> >
> > > On Sep 28, 2022, at 12:24 AM, Josh Tynjala <jo...@bowlerhat.dev>
> > wrote:
> > >
> > > I just wanted to follow up by mentioning that I recently added the
> > ability for the formatter load configuration files, in addition to the
> > existing command line options. It will automatically detect an
> > asformat-config.xml file in the current working directory, allowing you
> to
> > easily specify configuration options for a specific project. You can also
> > use a new -load-config option to load a configuration file from any path,
> > not just the current working directory. You can use
> -skip-local-config-file
> > to ignore the asformat-config.xml file.
> > >
> > > Once we release the next Royale update, I plan to make vscode-as3mxml
> > automatically detect the asformat-config.xml file too, so you will be
> able
> > to configure formatting options for both the command line and VSCode at
> the
> > same time.
> > >
> > > I also updated the Royale documentation to add a section for the
> > formatter:
> > >
> > > https://apache.github.io/royale-docs/formatter <
> > https://apache.github.io/royale-docs/formatter><
> https://apache.github.io/royale-docs/formatter%3e>
> > >
> > > --
> > > Josh Tynjala
> > > Bowler Hat LLC <https://bowlerhat.dev/>
> > >
> > >
> > > On Wed, Sep 22, 2021 at 10:42 AM Josh Tynjala <
> joshtynjala@bowlerhat.dev
> > <ma...@bowlerhat.dev>> wrote:
> > > Hey everyone,
> > >
> > > I recently created asformat, which is a formatter for ActionScript
> code.
> > It is based on the Royale compiler's lexer that creates a stream of
> tokens.
> > One nice thing about working with the token stream versus a full AST
> > (Abstract Syntax Tree) is that it's easier to keep track of existing
> > whitespace to preserve it where appropriate.
> > >
> > > In addition to command line usage, this formatter is intended to
> > eventually be used by IDEs/editors, such as VSCode and Moonshine.
> > >
> > > You can find asformat in nightly builds for now. I'm still testing it
> > with existing codebases, but I wanted to share my progress so that others
> > could check it out, if interested.
> > >
> > > Usage:
> > >
> > > Format a file, and write it back to the file system:
> > >
> > > asformat --write-files src/com/example/MyClass.as
> > >
> > > Alternatively, format all .as files in a directory:
> > >
> > > asformat --write-files src
> > >
> > > Options:
> > >
> > > --write-files: Writes the formatting changes back to the original
> files.
> > If a file has no formatting changes, it will not be modified. Alias: -w.
> > Default: false.
> > >
> > > --list-files: Lists the files that have been changed by formatting. If
> a
> > file has no formatting changes, it won't be listed. Alias: -l. Default:
> > false.
> > >
> > > --insert-spaces: Indents with spaces instead of tabs. (Default: false)
> > >
> > > --tab-width: The width of tabs when insert-spaces is specified.
> > (Default: 4)
> > >
> > > --insert-final-new-line: Adds a final empty line at the end of the
> file,
> > if one doesn't exist already. (Default: false)
> > >
> > > --open-brace-new-line: Controls whether an opening curly brace is
> placed
> > on a new line, or is "cuddled" on the current line. (Default: true)
> > >
> > > --insert-space-for-loop-semicolon: Controls whether a space is inserted
> > after the semicolons in a for() loop. (Default: true)
> > >
> > > --insert-space-control-flow-keywords: Controls whether a space is
> > inserted between control flow keywords (like if, for, while) and the
> > following ( open parenthesis. (Default: true)
> > >
> > > --insert-space-anonymous-function-keyword: Controls whether a space is
> > inserted between the function keyword and the following ( open
> parenthesis,
> > if the function is anonymous (if it doesn't have a name). (Default:
> false)
> > >
> > > --insert-space-binary-operators: Controls whether a space is inserted
> > before and after binary operators (like +, -, *, /, &&, ||, etc.)
> (Default:
> > true)
> > >
> > > --insert-space-comma-delimiter: Controls whether a space is inserted
> > after comma delimiters in Object and Array literals. (Default: true)
> > >
> > > --collapse-empty-blocks: Controls whether empty blocks are collapsed so
> > that the opening and closing curly brace are both on the same line or
> not.
> > (Default: false)
> > >
> > > --max-preserve-new-lines: Specify the maximum number of new line
> > characters that are allowed to appear consecutively. (Default: 2)
> > >
> > > --semicolons: Controls how semicolons are handled. Valid values are
> > insert, remove, and ignore. Insert means that missing semicolons are
> > inserted. Remove means that all semicolons are removed, and ignore means
> > that there is no change to semicolons in the file. (Default: insert)
> > >
> > > Additional notes:
> > >
> > > If neither --write-files nor --list-files is specified, the formatted
> > source code is written to standard output instead.
> > >
> > > If no files are specified, asformat waits for standard input instead.
> > >
> > > --
> > > Josh Tynjala
> > > Bowler Hat LLC <https://bowlerhat.dev/>
> >
> >
>
>

Re: Introducing asformat

Posted by Harbs <ha...@gmail.com>.
Yep. We’re using it too!

> On Sep 28, 2022, at 9:16 PM, Yishay Weiss <yi...@hotmail.com> wrote:
> 
> The –watch option is already being used and is a big productivity boost.


RE: Introducing asformat

Posted by Yishay Weiss <yi...@hotmail.com>.
It’s great to see this progress. I expect to see as-linter replacing SonarQube in our current project. Do you think it would be hard to integrate it with GitHub actions?

The –watch option is already being used and is a big productivity boost.

I expect I’ll make use of asformat at some point as well. Thanks for all this Josh.

I may get some time at the end of this month to work on a release, but I would prefer to do it with another volunteer, to share knowledge and add redundancy. Also, I want to use the new Azure VM I created (Apache funded) instead of Alex’s so we have redundancy in that respect as well.  The VM isn’t all set up yet so I will need to work on that.





From: Josh Tynjala<ma...@bowlerhat.dev>
Sent: Wednesday, September 28, 2022 6:35 PM
To: dev@royale.apache.org<ma...@royale.apache.org>
Subject: Re: Introducing asformat

A new release sounds good to me! I just updated the compiler release notes,
and there's a decent amount of stuff to be included. Not just these
formatter improvements, but also the new linter, headless JS RoyaleUnit
tests with Playwright, and the --watch compiler option are all new since
the last release.

--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>


On Wed, Sep 28, 2022 at 6:45 AM Harbs <ha...@gmail.com> wrote:

> That’s great!
>
> This is a good reason to get another release out… :-)
>
> Harbs
>
> > On Sep 28, 2022, at 12:24 AM, Josh Tynjala <jo...@bowlerhat.dev>
> wrote:
> >
> > I just wanted to follow up by mentioning that I recently added the
> ability for the formatter load configuration files, in addition to the
> existing command line options. It will automatically detect an
> asformat-config.xml file in the current working directory, allowing you to
> easily specify configuration options for a specific project. You can also
> use a new -load-config option to load a configuration file from any path,
> not just the current working directory. You can use -skip-local-config-file
> to ignore the asformat-config.xml file.
> >
> > Once we release the next Royale update, I plan to make vscode-as3mxml
> automatically detect the asformat-config.xml file too, so you will be able
> to configure formatting options for both the command line and VSCode at the
> same time.
> >
> > I also updated the Royale documentation to add a section for the
> formatter:
> >
> > https://apache.github.io/royale-docs/formatter <
> https://apache.github.io/royale-docs/formatter><https://apache.github.io/royale-docs/formatter%3e>
> >
> > --
> > Josh Tynjala
> > Bowler Hat LLC <https://bowlerhat.dev/>
> >
> >
> > On Wed, Sep 22, 2021 at 10:42 AM Josh Tynjala <joshtynjala@bowlerhat.dev
> <ma...@bowlerhat.dev>> wrote:
> > Hey everyone,
> >
> > I recently created asformat, which is a formatter for ActionScript code.
> It is based on the Royale compiler's lexer that creates a stream of tokens.
> One nice thing about working with the token stream versus a full AST
> (Abstract Syntax Tree) is that it's easier to keep track of existing
> whitespace to preserve it where appropriate.
> >
> > In addition to command line usage, this formatter is intended to
> eventually be used by IDEs/editors, such as VSCode and Moonshine.
> >
> > You can find asformat in nightly builds for now. I'm still testing it
> with existing codebases, but I wanted to share my progress so that others
> could check it out, if interested.
> >
> > Usage:
> >
> > Format a file, and write it back to the file system:
> >
> > asformat --write-files src/com/example/MyClass.as
> >
> > Alternatively, format all .as files in a directory:
> >
> > asformat --write-files src
> >
> > Options:
> >
> > --write-files: Writes the formatting changes back to the original files.
> If a file has no formatting changes, it will not be modified. Alias: -w.
> Default: false.
> >
> > --list-files: Lists the files that have been changed by formatting. If a
> file has no formatting changes, it won't be listed. Alias: -l. Default:
> false.
> >
> > --insert-spaces: Indents with spaces instead of tabs. (Default: false)
> >
> > --tab-width: The width of tabs when insert-spaces is specified.
> (Default: 4)
> >
> > --insert-final-new-line: Adds a final empty line at the end of the file,
> if one doesn't exist already. (Default: false)
> >
> > --open-brace-new-line: Controls whether an opening curly brace is placed
> on a new line, or is "cuddled" on the current line. (Default: true)
> >
> > --insert-space-for-loop-semicolon: Controls whether a space is inserted
> after the semicolons in a for() loop. (Default: true)
> >
> > --insert-space-control-flow-keywords: Controls whether a space is
> inserted between control flow keywords (like if, for, while) and the
> following ( open parenthesis. (Default: true)
> >
> > --insert-space-anonymous-function-keyword: Controls whether a space is
> inserted between the function keyword and the following ( open parenthesis,
> if the function is anonymous (if it doesn't have a name). (Default: false)
> >
> > --insert-space-binary-operators: Controls whether a space is inserted
> before and after binary operators (like +, -, *, /, &&, ||, etc.) (Default:
> true)
> >
> > --insert-space-comma-delimiter: Controls whether a space is inserted
> after comma delimiters in Object and Array literals. (Default: true)
> >
> > --collapse-empty-blocks: Controls whether empty blocks are collapsed so
> that the opening and closing curly brace are both on the same line or not.
> (Default: false)
> >
> > --max-preserve-new-lines: Specify the maximum number of new line
> characters that are allowed to appear consecutively. (Default: 2)
> >
> > --semicolons: Controls how semicolons are handled. Valid values are
> insert, remove, and ignore. Insert means that missing semicolons are
> inserted. Remove means that all semicolons are removed, and ignore means
> that there is no change to semicolons in the file. (Default: insert)
> >
> > Additional notes:
> >
> > If neither --write-files nor --list-files is specified, the formatted
> source code is written to standard output instead.
> >
> > If no files are specified, asformat waits for standard input instead.
> >
> > --
> > Josh Tynjala
> > Bowler Hat LLC <https://bowlerhat.dev/>
>
>


Re: Introducing asformat

Posted by Josh Tynjala <jo...@bowlerhat.dev>.
A new release sounds good to me! I just updated the compiler release notes,
and there's a decent amount of stuff to be included. Not just these
formatter improvements, but also the new linter, headless JS RoyaleUnit
tests with Playwright, and the --watch compiler option are all new since
the last release.

--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>


On Wed, Sep 28, 2022 at 6:45 AM Harbs <ha...@gmail.com> wrote:

> That’s great!
>
> This is a good reason to get another release out… :-)
>
> Harbs
>
> > On Sep 28, 2022, at 12:24 AM, Josh Tynjala <jo...@bowlerhat.dev>
> wrote:
> >
> > I just wanted to follow up by mentioning that I recently added the
> ability for the formatter load configuration files, in addition to the
> existing command line options. It will automatically detect an
> asformat-config.xml file in the current working directory, allowing you to
> easily specify configuration options for a specific project. You can also
> use a new -load-config option to load a configuration file from any path,
> not just the current working directory. You can use -skip-local-config-file
> to ignore the asformat-config.xml file.
> >
> > Once we release the next Royale update, I plan to make vscode-as3mxml
> automatically detect the asformat-config.xml file too, so you will be able
> to configure formatting options for both the command line and VSCode at the
> same time.
> >
> > I also updated the Royale documentation to add a section for the
> formatter:
> >
> > https://apache.github.io/royale-docs/formatter <
> https://apache.github.io/royale-docs/formatter>
> >
> > --
> > Josh Tynjala
> > Bowler Hat LLC <https://bowlerhat.dev/>
> >
> >
> > On Wed, Sep 22, 2021 at 10:42 AM Josh Tynjala <joshtynjala@bowlerhat.dev
> <ma...@bowlerhat.dev>> wrote:
> > Hey everyone,
> >
> > I recently created asformat, which is a formatter for ActionScript code.
> It is based on the Royale compiler's lexer that creates a stream of tokens.
> One nice thing about working with the token stream versus a full AST
> (Abstract Syntax Tree) is that it's easier to keep track of existing
> whitespace to preserve it where appropriate.
> >
> > In addition to command line usage, this formatter is intended to
> eventually be used by IDEs/editors, such as VSCode and Moonshine.
> >
> > You can find asformat in nightly builds for now. I'm still testing it
> with existing codebases, but I wanted to share my progress so that others
> could check it out, if interested.
> >
> > Usage:
> >
> > Format a file, and write it back to the file system:
> >
> > asformat --write-files src/com/example/MyClass.as
> >
> > Alternatively, format all .as files in a directory:
> >
> > asformat --write-files src
> >
> > Options:
> >
> > --write-files: Writes the formatting changes back to the original files.
> If a file has no formatting changes, it will not be modified. Alias: -w.
> Default: false.
> >
> > --list-files: Lists the files that have been changed by formatting. If a
> file has no formatting changes, it won't be listed. Alias: -l. Default:
> false.
> >
> > --insert-spaces: Indents with spaces instead of tabs. (Default: false)
> >
> > --tab-width: The width of tabs when insert-spaces is specified.
> (Default: 4)
> >
> > --insert-final-new-line: Adds a final empty line at the end of the file,
> if one doesn't exist already. (Default: false)
> >
> > --open-brace-new-line: Controls whether an opening curly brace is placed
> on a new line, or is "cuddled" on the current line. (Default: true)
> >
> > --insert-space-for-loop-semicolon: Controls whether a space is inserted
> after the semicolons in a for() loop. (Default: true)
> >
> > --insert-space-control-flow-keywords: Controls whether a space is
> inserted between control flow keywords (like if, for, while) and the
> following ( open parenthesis. (Default: true)
> >
> > --insert-space-anonymous-function-keyword: Controls whether a space is
> inserted between the function keyword and the following ( open parenthesis,
> if the function is anonymous (if it doesn't have a name). (Default: false)
> >
> > --insert-space-binary-operators: Controls whether a space is inserted
> before and after binary operators (like +, -, *, /, &&, ||, etc.) (Default:
> true)
> >
> > --insert-space-comma-delimiter: Controls whether a space is inserted
> after comma delimiters in Object and Array literals. (Default: true)
> >
> > --collapse-empty-blocks: Controls whether empty blocks are collapsed so
> that the opening and closing curly brace are both on the same line or not.
> (Default: false)
> >
> > --max-preserve-new-lines: Specify the maximum number of new line
> characters that are allowed to appear consecutively. (Default: 2)
> >
> > --semicolons: Controls how semicolons are handled. Valid values are
> insert, remove, and ignore. Insert means that missing semicolons are
> inserted. Remove means that all semicolons are removed, and ignore means
> that there is no change to semicolons in the file. (Default: insert)
> >
> > Additional notes:
> >
> > If neither --write-files nor --list-files is specified, the formatted
> source code is written to standard output instead.
> >
> > If no files are specified, asformat waits for standard input instead.
> >
> > --
> > Josh Tynjala
> > Bowler Hat LLC <https://bowlerhat.dev/>
>
>

Re: Introducing asformat

Posted by Harbs <ha...@gmail.com>.
That’s great!

This is a good reason to get another release out… :-)

Harbs

> On Sep 28, 2022, at 12:24 AM, Josh Tynjala <jo...@bowlerhat.dev> wrote:
> 
> I just wanted to follow up by mentioning that I recently added the ability for the formatter load configuration files, in addition to the existing command line options. It will automatically detect an asformat-config.xml file in the current working directory, allowing you to easily specify configuration options for a specific project. You can also use a new -load-config option to load a configuration file from any path, not just the current working directory. You can use -skip-local-config-file to ignore the asformat-config.xml file.
> 
> Once we release the next Royale update, I plan to make vscode-as3mxml automatically detect the asformat-config.xml file too, so you will be able to configure formatting options for both the command line and VSCode at the same time.
> 
> I also updated the Royale documentation to add a section for the formatter:
> 
> https://apache.github.io/royale-docs/formatter <https://apache.github.io/royale-docs/formatter>
> 
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev/>
> 
> 
> On Wed, Sep 22, 2021 at 10:42 AM Josh Tynjala <joshtynjala@bowlerhat.dev <ma...@bowlerhat.dev>> wrote:
> Hey everyone,
> 
> I recently created asformat, which is a formatter for ActionScript code. It is based on the Royale compiler's lexer that creates a stream of tokens. One nice thing about working with the token stream versus a full AST (Abstract Syntax Tree) is that it's easier to keep track of existing whitespace to preserve it where appropriate.
> 
> In addition to command line usage, this formatter is intended to eventually be used by IDEs/editors, such as VSCode and Moonshine.
> 
> You can find asformat in nightly builds for now. I'm still testing it with existing codebases, but I wanted to share my progress so that others could check it out, if interested.
> 
> Usage:
> 
> Format a file, and write it back to the file system:
> 
> asformat --write-files src/com/example/MyClass.as
> 
> Alternatively, format all .as files in a directory:
> 
> asformat --write-files src
> 
> Options:
> 
> --write-files: Writes the formatting changes back to the original files. If a file has no formatting changes, it will not be modified. Alias: -w. Default: false.
> 
> --list-files: Lists the files that have been changed by formatting. If a file has no formatting changes, it won't be listed. Alias: -l. Default: false.
> 
> --insert-spaces: Indents with spaces instead of tabs. (Default: false)
> 
> --tab-width: The width of tabs when insert-spaces is specified. (Default: 4)
> 
> --insert-final-new-line: Adds a final empty line at the end of the file, if one doesn't exist already. (Default: false)
> 
> --open-brace-new-line: Controls whether an opening curly brace is placed on a new line, or is "cuddled" on the current line. (Default: true)
> 
> --insert-space-for-loop-semicolon: Controls whether a space is inserted after the semicolons in a for() loop. (Default: true)
> 
> --insert-space-control-flow-keywords: Controls whether a space is inserted between control flow keywords (like if, for, while) and the following ( open parenthesis. (Default: true)
> 
> --insert-space-anonymous-function-keyword: Controls whether a space is inserted between the function keyword and the following ( open parenthesis, if the function is anonymous (if it doesn't have a name). (Default: false)
> 
> --insert-space-binary-operators: Controls whether a space is inserted before and after binary operators (like +, -, *, /, &&, ||, etc.) (Default: true)
> 
> --insert-space-comma-delimiter: Controls whether a space is inserted after comma delimiters in Object and Array literals. (Default: true)
> 
> --collapse-empty-blocks: Controls whether empty blocks are collapsed so that the opening and closing curly brace are both on the same line or not. (Default: false)
> 
> --max-preserve-new-lines: Specify the maximum number of new line characters that are allowed to appear consecutively. (Default: 2)
> 
> --semicolons: Controls how semicolons are handled. Valid values are insert, remove, and ignore. Insert means that missing semicolons are inserted. Remove means that all semicolons are removed, and ignore means that there is no change to semicolons in the file. (Default: insert)
> 
> Additional notes:
> 
> If neither --write-files nor --list-files is specified, the formatted source code is written to standard output instead.
> 
> If no files are specified, asformat waits for standard input instead.
> 
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev/>


Re: Introducing asformat

Posted by Harbs <ha...@gmail.com>.
That’s great!

This is a good reason to get another release out… :-)

Harbs

> On Sep 28, 2022, at 12:24 AM, Josh Tynjala <jo...@bowlerhat.dev> wrote:
> 
> I just wanted to follow up by mentioning that I recently added the ability for the formatter load configuration files, in addition to the existing command line options. It will automatically detect an asformat-config.xml file in the current working directory, allowing you to easily specify configuration options for a specific project. You can also use a new -load-config option to load a configuration file from any path, not just the current working directory. You can use -skip-local-config-file to ignore the asformat-config.xml file.
> 
> Once we release the next Royale update, I plan to make vscode-as3mxml automatically detect the asformat-config.xml file too, so you will be able to configure formatting options for both the command line and VSCode at the same time.
> 
> I also updated the Royale documentation to add a section for the formatter:
> 
> https://apache.github.io/royale-docs/formatter <https://apache.github.io/royale-docs/formatter>
> 
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev/>
> 
> 
> On Wed, Sep 22, 2021 at 10:42 AM Josh Tynjala <joshtynjala@bowlerhat.dev <ma...@bowlerhat.dev>> wrote:
> Hey everyone,
> 
> I recently created asformat, which is a formatter for ActionScript code. It is based on the Royale compiler's lexer that creates a stream of tokens. One nice thing about working with the token stream versus a full AST (Abstract Syntax Tree) is that it's easier to keep track of existing whitespace to preserve it where appropriate.
> 
> In addition to command line usage, this formatter is intended to eventually be used by IDEs/editors, such as VSCode and Moonshine.
> 
> You can find asformat in nightly builds for now. I'm still testing it with existing codebases, but I wanted to share my progress so that others could check it out, if interested.
> 
> Usage:
> 
> Format a file, and write it back to the file system:
> 
> asformat --write-files src/com/example/MyClass.as
> 
> Alternatively, format all .as files in a directory:
> 
> asformat --write-files src
> 
> Options:
> 
> --write-files: Writes the formatting changes back to the original files. If a file has no formatting changes, it will not be modified. Alias: -w. Default: false.
> 
> --list-files: Lists the files that have been changed by formatting. If a file has no formatting changes, it won't be listed. Alias: -l. Default: false.
> 
> --insert-spaces: Indents with spaces instead of tabs. (Default: false)
> 
> --tab-width: The width of tabs when insert-spaces is specified. (Default: 4)
> 
> --insert-final-new-line: Adds a final empty line at the end of the file, if one doesn't exist already. (Default: false)
> 
> --open-brace-new-line: Controls whether an opening curly brace is placed on a new line, or is "cuddled" on the current line. (Default: true)
> 
> --insert-space-for-loop-semicolon: Controls whether a space is inserted after the semicolons in a for() loop. (Default: true)
> 
> --insert-space-control-flow-keywords: Controls whether a space is inserted between control flow keywords (like if, for, while) and the following ( open parenthesis. (Default: true)
> 
> --insert-space-anonymous-function-keyword: Controls whether a space is inserted between the function keyword and the following ( open parenthesis, if the function is anonymous (if it doesn't have a name). (Default: false)
> 
> --insert-space-binary-operators: Controls whether a space is inserted before and after binary operators (like +, -, *, /, &&, ||, etc.) (Default: true)
> 
> --insert-space-comma-delimiter: Controls whether a space is inserted after comma delimiters in Object and Array literals. (Default: true)
> 
> --collapse-empty-blocks: Controls whether empty blocks are collapsed so that the opening and closing curly brace are both on the same line or not. (Default: false)
> 
> --max-preserve-new-lines: Specify the maximum number of new line characters that are allowed to appear consecutively. (Default: 2)
> 
> --semicolons: Controls how semicolons are handled. Valid values are insert, remove, and ignore. Insert means that missing semicolons are inserted. Remove means that all semicolons are removed, and ignore means that there is no change to semicolons in the file. (Default: insert)
> 
> Additional notes:
> 
> If neither --write-files nor --list-files is specified, the formatted source code is written to standard output instead.
> 
> If no files are specified, asformat waits for standard input instead.
> 
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev/>


Re: Introducing asformat

Posted by Josh Tynjala <jo...@bowlerhat.dev>.
I just wanted to follow up by mentioning that I recently added the ability
for the formatter load configuration files, in addition to the existing
command line options. It will automatically detect an asformat-config.xml
file in the current working directory, allowing you to easily specify
configuration options for a specific project. You can also use a new
-load-config option to load a configuration file from any path, not just
the current working directory. You can use -skip-local-config-file to
ignore the asformat-config.xml file.

Once we release the next Royale update, I plan to make
vscode-as3mxml automatically detect the asformat-config.xml file too, so
you will be able to configure formatting options for both the command line
and VSCode at the same time.

I also updated the Royale documentation to add a section for the formatter:

https://apache.github.io/royale-docs/formatter

--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>


On Wed, Sep 22, 2021 at 10:42 AM Josh Tynjala <jo...@bowlerhat.dev>
wrote:

> Hey everyone,
>
> I recently created asformat, which is a formatter for ActionScript code.
> It is based on the Royale compiler's lexer that creates a stream of tokens.
> One nice thing about working with the token stream versus a full AST
> (Abstract Syntax Tree) is that it's easier to keep track of existing
> whitespace to preserve it where appropriate.
>
> In addition to command line usage, this formatter is intended to
> eventually be used by IDEs/editors, such as VSCode and Moonshine.
>
> You can find asformat in nightly builds for now. I'm still testing it with
> existing codebases, but I wanted to share my progress so that others could
> check it out, if interested.
>
> Usage:
>
> Format a file, and write it back to the file system:
>
> asformat --write-files src/com/example/MyClass.as
>
> Alternatively, format all .as files in a directory:
>
> asformat --write-files src
>
> Options:
>
> --write-files: Writes the formatting changes back to the original files.
> If a file has no formatting changes, it will not be modified. Alias: -w.
> Default: false.
>
> --list-files: Lists the files that have been changed by formatting. If a
> file has no formatting changes, it won't be listed. Alias: -l. Default:
> false.
>
> --insert-spaces: Indents with spaces instead of tabs. (Default: false)
>
> --tab-width: The width of tabs when insert-spaces is specified. (Default:
> 4)
>
> --insert-final-new-line: Adds a final empty line at the end of the file,
> if one doesn't exist already. (Default: false)
>
> --open-brace-new-line: Controls whether an opening curly brace is placed
> on a new line, or is "cuddled" on the current line. (Default: true)
>
> --insert-space-for-loop-semicolon: Controls whether a space is inserted
> after the semicolons in a for() loop. (Default: true)
>
> --insert-space-control-flow-keywords: Controls whether a space is inserted
> between control flow keywords (like if, for, while) and the following (
> open parenthesis. (Default: true)
>
> --insert-space-anonymous-function-keyword: Controls whether a space is
> inserted between the function keyword and the following ( open parenthesis,
> if the function is anonymous (if it doesn't have a name). (Default: false)
>
> --insert-space-binary-operators: Controls whether a space is inserted
> before and after binary operators (like +, -, *, /, &&, ||, etc.) (Default:
> true)
>
> --insert-space-comma-delimiter: Controls whether a space is inserted after
> comma delimiters in Object and Array literals. (Default: true)
>
> --collapse-empty-blocks: Controls whether empty blocks are collapsed so
> that the opening and closing curly brace are both on the same line or not.
>  (Default: false)
>
> --max-preserve-new-lines: Specify the maximum number of new line
> characters that are allowed to appear consecutively. (Default: 2)
>
> --semicolons: Controls how semicolons are handled. Valid values are
> insert, remove, and ignore. Insert means that missing semicolons are
> inserted. Remove means that all semicolons are removed, and ignore means
> that there is no change to semicolons in the file. (Default: insert)
>
> Additional notes:
>
> If neither --write-files nor --list-files is specified, the formatted
> source code is written to standard output instead.
>
> If no files are specified, asformat waits for standard input instead.
>
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
>

Re: Introducing asformat

Posted by Josh Tynjala <jo...@bowlerhat.dev>.
I just wanted to follow up by mentioning that I recently added the ability
for the formatter load configuration files, in addition to the existing
command line options. It will automatically detect an asformat-config.xml
file in the current working directory, allowing you to easily specify
configuration options for a specific project. You can also use a new
-load-config option to load a configuration file from any path, not just
the current working directory. You can use -skip-local-config-file to
ignore the asformat-config.xml file.

Once we release the next Royale update, I plan to make
vscode-as3mxml automatically detect the asformat-config.xml file too, so
you will be able to configure formatting options for both the command line
and VSCode at the same time.

I also updated the Royale documentation to add a section for the formatter:

https://apache.github.io/royale-docs/formatter

--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>


On Wed, Sep 22, 2021 at 10:42 AM Josh Tynjala <jo...@bowlerhat.dev>
wrote:

> Hey everyone,
>
> I recently created asformat, which is a formatter for ActionScript code.
> It is based on the Royale compiler's lexer that creates a stream of tokens.
> One nice thing about working with the token stream versus a full AST
> (Abstract Syntax Tree) is that it's easier to keep track of existing
> whitespace to preserve it where appropriate.
>
> In addition to command line usage, this formatter is intended to
> eventually be used by IDEs/editors, such as VSCode and Moonshine.
>
> You can find asformat in nightly builds for now. I'm still testing it with
> existing codebases, but I wanted to share my progress so that others could
> check it out, if interested.
>
> Usage:
>
> Format a file, and write it back to the file system:
>
> asformat --write-files src/com/example/MyClass.as
>
> Alternatively, format all .as files in a directory:
>
> asformat --write-files src
>
> Options:
>
> --write-files: Writes the formatting changes back to the original files.
> If a file has no formatting changes, it will not be modified. Alias: -w.
> Default: false.
>
> --list-files: Lists the files that have been changed by formatting. If a
> file has no formatting changes, it won't be listed. Alias: -l. Default:
> false.
>
> --insert-spaces: Indents with spaces instead of tabs. (Default: false)
>
> --tab-width: The width of tabs when insert-spaces is specified. (Default:
> 4)
>
> --insert-final-new-line: Adds a final empty line at the end of the file,
> if one doesn't exist already. (Default: false)
>
> --open-brace-new-line: Controls whether an opening curly brace is placed
> on a new line, or is "cuddled" on the current line. (Default: true)
>
> --insert-space-for-loop-semicolon: Controls whether a space is inserted
> after the semicolons in a for() loop. (Default: true)
>
> --insert-space-control-flow-keywords: Controls whether a space is inserted
> between control flow keywords (like if, for, while) and the following (
> open parenthesis. (Default: true)
>
> --insert-space-anonymous-function-keyword: Controls whether a space is
> inserted between the function keyword and the following ( open parenthesis,
> if the function is anonymous (if it doesn't have a name). (Default: false)
>
> --insert-space-binary-operators: Controls whether a space is inserted
> before and after binary operators (like +, -, *, /, &&, ||, etc.) (Default:
> true)
>
> --insert-space-comma-delimiter: Controls whether a space is inserted after
> comma delimiters in Object and Array literals. (Default: true)
>
> --collapse-empty-blocks: Controls whether empty blocks are collapsed so
> that the opening and closing curly brace are both on the same line or not.
>  (Default: false)
>
> --max-preserve-new-lines: Specify the maximum number of new line
> characters that are allowed to appear consecutively. (Default: 2)
>
> --semicolons: Controls how semicolons are handled. Valid values are
> insert, remove, and ignore. Insert means that missing semicolons are
> inserted. Remove means that all semicolons are removed, and ignore means
> that there is no change to semicolons in the file. (Default: insert)
>
> Additional notes:
>
> If neither --write-files nor --list-files is specified, the formatted
> source code is written to standard output instead.
>
> If no files are specified, asformat waits for standard input instead.
>
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
>

Re: Introducing asformat

Posted by Harbs <ha...@gmail.com>.
Totally agree! B-)

> On Sep 22, 2021, at 8:54 PM, Andrew Wetmore <co...@gmail.com> wrote:
> 
> totally cool.
> 
> On Wed, Sep 22, 2021 at 2:43 PM Josh Tynjala <joshtynjala@bowlerhat.dev <ma...@bowlerhat.dev>> wrote:
> Hey everyone,
> 
> I recently created asformat, which is a formatter for ActionScript code. It is based on the Royale compiler's lexer that creates a stream of tokens. One nice thing about working with the token stream versus a full AST (Abstract Syntax Tree) is that it's easier to keep track of existing whitespace to preserve it where appropriate.
> 
> In addition to command line usage, this formatter is intended to eventually be used by IDEs/editors, such as VSCode and Moonshine.
> 
> You can find asformat in nightly builds for now. I'm still testing it with existing codebases, but I wanted to share my progress so that others could check it out, if interested.
> 
> Usage:
> 
> Format a file, and write it back to the file system:
> 
> asformat --write-files src/com/example/MyClass.as
> 
> Alternatively, format all .as files in a directory:
> 
> asformat --write-files src
> 
> Options:
> 
> --write-files: Writes the formatting changes back to the original files. If a file has no formatting changes, it will not be modified. Alias: -w. Default: false.
> 
> --list-files: Lists the files that have been changed by formatting. If a file has no formatting changes, it won't be listed. Alias: -l. Default: false.
> 
> --insert-spaces: Indents with spaces instead of tabs. (Default: false)
> 
> --tab-width: The width of tabs when insert-spaces is specified. (Default: 4)
> 
> --insert-final-new-line: Adds a final empty line at the end of the file, if one doesn't exist already. (Default: false)
> 
> --open-brace-new-line: Controls whether an opening curly brace is placed on a new line, or is "cuddled" on the current line. (Default: true)
> 
> --insert-space-for-loop-semicolon: Controls whether a space is inserted after the semicolons in a for() loop. (Default: true)
> 
> --insert-space-control-flow-keywords: Controls whether a space is inserted between control flow keywords (like if, for, while) and the following ( open parenthesis. (Default: true)
> 
> --insert-space-anonymous-function-keyword: Controls whether a space is inserted between the function keyword and the following ( open parenthesis, if the function is anonymous (if it doesn't have a name). (Default: false)
> 
> --insert-space-binary-operators: Controls whether a space is inserted before and after binary operators (like +, -, *, /, &&, ||, etc.) (Default: true)
> 
> --insert-space-comma-delimiter: Controls whether a space is inserted after comma delimiters in Object and Array literals. (Default: true)
> 
> --collapse-empty-blocks: Controls whether empty blocks are collapsed so that the opening and closing curly brace are both on the same line or not. (Default: false)
> 
> --max-preserve-new-lines: Specify the maximum number of new line characters that are allowed to appear consecutively. (Default: 2)
> 
> --semicolons: Controls how semicolons are handled. Valid values are insert, remove, and ignore. Insert means that missing semicolons are inserted. Remove means that all semicolons are removed, and ignore means that there is no change to semicolons in the file. (Default: insert)
> 
> Additional notes:
> 
> If neither --write-files nor --list-files is specified, the formatted source code is written to standard output instead.
> 
> If no files are specified, asformat waits for standard input instead.
> 
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev/>
> 
> 
> -- 
> Andrew Wetmore
> 
> http://cottage14.blogspot.com/ <http://cottage14.blogspot.com/>
> 
> 
> 
> 


Re: Introducing asformat

Posted by Andrew Wetmore <co...@gmail.com>.
totally cool.

On Wed, Sep 22, 2021 at 2:43 PM Josh Tynjala <jo...@bowlerhat.dev>
wrote:

> Hey everyone,
>
> I recently created asformat, which is a formatter for ActionScript code.
> It is based on the Royale compiler's lexer that creates a stream of tokens.
> One nice thing about working with the token stream versus a full AST
> (Abstract Syntax Tree) is that it's easier to keep track of existing
> whitespace to preserve it where appropriate.
>
> In addition to command line usage, this formatter is intended to
> eventually be used by IDEs/editors, such as VSCode and Moonshine.
>
> You can find asformat in nightly builds for now. I'm still testing it with
> existing codebases, but I wanted to share my progress so that others could
> check it out, if interested.
>
> Usage:
>
> Format a file, and write it back to the file system:
>
> asformat --write-files src/com/example/MyClass.as
>
> Alternatively, format all .as files in a directory:
>
> asformat --write-files src
>
> Options:
>
> --write-files: Writes the formatting changes back to the original files.
> If a file has no formatting changes, it will not be modified. Alias: -w.
> Default: false.
>
> --list-files: Lists the files that have been changed by formatting. If a
> file has no formatting changes, it won't be listed. Alias: -l. Default:
> false.
>
> --insert-spaces: Indents with spaces instead of tabs. (Default: false)
>
> --tab-width: The width of tabs when insert-spaces is specified. (Default:
> 4)
>
> --insert-final-new-line: Adds a final empty line at the end of the file,
> if one doesn't exist already. (Default: false)
>
> --open-brace-new-line: Controls whether an opening curly brace is placed
> on a new line, or is "cuddled" on the current line. (Default: true)
>
> --insert-space-for-loop-semicolon: Controls whether a space is inserted
> after the semicolons in a for() loop. (Default: true)
>
> --insert-space-control-flow-keywords: Controls whether a space is inserted
> between control flow keywords (like if, for, while) and the following (
> open parenthesis. (Default: true)
>
> --insert-space-anonymous-function-keyword: Controls whether a space is
> inserted between the function keyword and the following ( open parenthesis,
> if the function is anonymous (if it doesn't have a name). (Default: false)
>
> --insert-space-binary-operators: Controls whether a space is inserted
> before and after binary operators (like +, -, *, /, &&, ||, etc.) (Default:
> true)
>
> --insert-space-comma-delimiter: Controls whether a space is inserted after
> comma delimiters in Object and Array literals. (Default: true)
>
> --collapse-empty-blocks: Controls whether empty blocks are collapsed so
> that the opening and closing curly brace are both on the same line or not.
>  (Default: false)
>
> --max-preserve-new-lines: Specify the maximum number of new line
> characters that are allowed to appear consecutively. (Default: 2)
>
> --semicolons: Controls how semicolons are handled. Valid values are
> insert, remove, and ignore. Insert means that missing semicolons are
> inserted. Remove means that all semicolons are removed, and ignore means
> that there is no change to semicolons in the file. (Default: insert)
>
> Additional notes:
>
> If neither --write-files nor --list-files is specified, the formatted
> source code is written to standard output instead.
>
> If no files are specified, asformat waits for standard input instead.
>
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
>


-- 
Andrew Wetmore

http://cottage14.blogspot.com/