# What does the format command change?

**URL:** <https://forum.crystal-lang.org/t/what-does-the-format-command-change/830>\
**Category:** Help & Support\
**Created:** [June 4, 2019, 3:29am UTC](https://forum.crystal-lang.org/t/what-does-the-format-command-change/830 "2019-06-04T03:29:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Takaaki](https://avatars.discourse-cdn.com/v4/letter/t/43a26b/32.png) [@Takaaki](https://forum.crystal-lang.org/u/Takaaki)\
**Post date:** [June 4, 2019, 3:29am UTC](https://forum.crystal-lang.org/t/what-does-the-format-command-change/830/1 "2019-06-04T03:29:28Z")

</div>

Hello, I develop [a plug-in](http://astah.net/features/mplus-plugin) that generates code from UML model with modeling tool Astah. It supports Crystal Language code generation.  
In future plug-in updates, I want to make the code generated by my plug-in correspond to the code formatted by the `crystal tool format` command.

My question: Is there a document that describes what the `crystal tool format` command changes?

It’s fine If there is not. I run the format command to check the changes.

Thank you.

---

<div class="post-metadata">

**Author:** ![nsuchy](https://avatars.discourse-cdn.com/v4/letter/n/c0e974/32.png) [@nsuchy](https://forum.crystal-lang.org/u/nsuchy)\
**Post date:** [June 5, 2019, 3:33am UTC](https://forum.crystal-lang.org/t/what-does-the-format-command-change/830/2 "2019-06-05T03:33:20Z")

</div>

I’d recommend reading the source code to see what it does, how it does it, and plan accordingly.

> <https://github.com/crystal-lang/crystal/blob/master/src/compiler/crystal/tools/formatter.cr>

---

<div class="post-metadata">

**Author:** ![Takaaki](https://avatars.discourse-cdn.com/v4/letter/t/43a26b/32.png) [@Takaaki](https://forum.crystal-lang.org/u/Takaaki)\
**Post date:** [June 5, 2019, 4:28am UTC](https://forum.crystal-lang.org/t/what-does-the-format-command-change/830/3 "2019-06-05T04:28:22Z")

</div>

Hi @nsuchy  
Thanks for your advice. I will read the source code.

---

<div class="post-metadata">

**Author:** ![asterite](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/asterite/32/60_2.png) [@asterite](https://forum.crystal-lang.org/u/asterite)\
**Post date:** [June 5, 2019, 5:24am UTC](https://forum.crystal-lang.org/t/what-does-the-format-command-change/830/4 "2019-06-05T05:24:53Z")

</div>

It’s probably better to read the specs

---

<div class="post-metadata">

**Author:** ![Takaaki](https://avatars.discourse-cdn.com/v4/letter/t/43a26b/32.png) [@Takaaki](https://forum.crystal-lang.org/u/Takaaki)\
**Post date:** [June 5, 2019, 6:40am UTC](https://forum.crystal-lang.org/t/what-does-the-format-command-change/830/5 "2019-06-05T06:40:59Z")

</div>

Thanks @asterite . I will refer to this together.  
[crystal-lang/crystal/blob/master/spec/compiler/crystal/tools/format\_spec.cr](https://github.com/crystal-lang/crystal/blob/master/spec/compiler/crystal/tools/format_spec.cr)

---

<div class="post-metadata">

**Author:** ![nsuchy](https://avatars.discourse-cdn.com/v4/letter/n/c0e974/32.png) [@nsuchy](https://forum.crystal-lang.org/u/nsuchy)\
**Post date:** [June 5, 2019, 12:25pm UTC](https://forum.crystal-lang.org/t/what-does-the-format-command-change/830/6 "2019-06-05T12:25:59Z")

</div>

> [@asterite](#):
>
> It’s probably better to read the specs

The reason I suggested reading the formatter and not its specs was to see how it does it, not necessarily just the results of the task (those are important as well).
