Skip to content

Commit

Permalink
reword warning to list examples of breakages
Browse files Browse the repository at this point in the history
  • Loading branch information
novaugust committed Aug 27, 2024
1 parent c29d10d commit 3a66e42
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ Ultimately Styler is @adobe's internal tool that we're happy to share with the w
## WARNING: Styler can change the behaviour of your program!

In some cases, this can introduce bugs. It goes without saying, but look over your changes before committing to main :)
(Here's an [example issue](https://github.com/adobe/elixir-styler/issues/186) where Styler unexpectedly changed the behaviour of a user's program.)

A simple example of a way Styler changes the behaviour of code is the following rewrite:

Expand Down Expand Up @@ -115,6 +114,12 @@ end

Also good style! But Styler assumes that most of the time people just meant the `if` equivalent of the code, and so makes that change. If issues like this bother you, Styler probably isn't the tool you're looking for.

Other ways Styler can change your program:

- [`with` statement rewrites](https://github.com/adobe/elixir-styler/issues/186)
- [config file sorting](https://hexdocs.pm/styler/mix_configs.html#this-can-break-your-program)
- and likely other ways. stay safe out there!

## Thanks & Inspiration

### [Sourceror](https://github.com/doorgan/sourceror/)
Expand Down

0 comments on commit 3a66e42

Please sign in to comment.