Skip to content

Conversation

@garazdawi
Copy link
Contributor

Before this change a spec looking like this:

-spec foo(integer()) -> ok;
         (atom()) -> ok.

would be transformed to:

-spec foo(integer()) -> ok;
    (atom()) -> ok.

that is the second clause would be indented incorrectly.

binary_part(line, offset, byte_size(line) - offset)
end)
|> Enum.join("\n")
|> then(&binary_part(&1, offset, byte_size(&1) - offset))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove this function then and call String.trim_leading(string, "-type ") instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed I think

Before this change a spec looking like this:

```
-spec foo(integer()) -> ok;
         (atom()) -> ok.
```

would be transformed to:

```
-spec foo(integer()) -> ok;
    (atom()) -> ok.
```

that is the second clause would be indented incorrectly.
@josevalim josevalim merged commit 72bb758 into elixir-lang:main Apr 17, 2024
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

@garazdawi garazdawi mentioned this pull request May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants