Skip to content

Commit 294147b

Browse files
moxleychristopheradams
authored andcommitted
Add guideline for @SPEC + @doc
1 parent 1f5da5b commit 294147b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,10 +1073,14 @@ directives (see [Modules](#modules)).
10731073

10741074
* <a name="spec-spacing"></a>
10751075
Place specifications right before the function definition,
1076+
after the `@doc`,
10761077
without separating them by a blank line.
10771078
<sup>[[link](#spec-spacing)]</sup>
10781079

10791080
```elixir
1081+
@doc """
1082+
Some function description.
1083+
"""
10801084
@spec some_function(term) :: result
10811085
def some_function(some_data) do
10821086
{:ok, some_data}

0 commit comments

Comments
 (0)