Skip to content

Commit

Permalink
Add example to fix codecov report upload (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
aifrak authored Aug 10, 2021
1 parent add52f8 commit 5a0f2d2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
11 changes: 2 additions & 9 deletions .credo.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,11 @@
"config/",
"lib/",
"test/",
"mix.exs",
".check*.exs",
".credo.exs",
".dialyzer_ignore.exs",
".formatter.exs",
"*.exs",
".sobelow-conf",
"apps/*/lib/",
"apps/*/test/",
"apps/*/.check*.exs",
"apps/*/.credo.exs",
"apps/*/.dialyzer_ignore.exs",
"apps/*/.formatter.exs",
"apps/*/*.exs",
"apps/*/.sobelow-conf",
"apps/*/mix.exs"
],
Expand Down
13 changes: 13 additions & 0 deletions lib/app.ex
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,17 @@ defmodule App do
def hello do
:world
end

@doc """
Add a to b.
## Examples
iex> App.add(10, 15)
25
"""
@spec add(integer, integer) :: integer
def add(a, b) do
a + b
end
end
4 changes: 4 additions & 0 deletions test/app_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@ defmodule AppTest do
test "greets the world" do
assert App.hello() == :world
end

test "adds a and b" do
assert App.add(4, 5) == 9
end
end

0 comments on commit 5a0f2d2

Please sign in to comment.