Skip to content

Commit 1128a85

Browse files
authoredMar 4, 2024··
Set up DoctestFormatter (#1440)
* Set up DoctestFormatter * Run mix format * Update DoctestFormatter
1 parent fd09c87 commit 1128a85

File tree

7 files changed

+10
-8
lines changed

7 files changed

+10
-8
lines changed
 

‎.formatter.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[
2-
plugins: [MarkdownCodeBlockFormatter],
2+
plugins: [MarkdownCodeBlockFormatter, DoctestFormatter],
33
inputs: ["mix.exs", "{exercises,bin}/**/*.{ex,exs}", "{concepts,exercises,docs,reference}/**/*.md", "*.md"]
44
]

‎exercises/practice/accumulate/.meta/example.ex

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ defmodule Accumulate do
77
88
## Examples
99
10-
iex> Accumulate.accumulate([], fn(x) -> x * 2 end)
10+
iex> Accumulate.accumulate([], fn x -> x * 2 end)
1111
[]
1212
13-
iex> Accumulate.accumulate([1, 2, 3], fn(x) -> x * 2 end)
13+
iex> Accumulate.accumulate([1, 2, 3], fn x -> x * 2 end)
1414
[2, 4, 6]
1515
1616
"""

‎exercises/practice/accumulate/lib/accumulate.ex

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ defmodule Accumulate do
77
88
## Examples
99
10-
iex> Accumulate.accumulate([], fn(x) -> x * 2 end)
10+
iex> Accumulate.accumulate([], fn x -> x * 2 end)
1111
[]
1212
13-
iex> Accumulate.accumulate([1, 2, 3], fn(x) -> x * 2 end)
13+
iex> Accumulate.accumulate([1, 2, 3], fn x -> x * 2 end)
1414
[2, 4, 6]
1515
1616
"""

‎exercises/practice/flatten-array/.meta/example.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ defmodule FlattenArray do
55
## Examples
66
77
iex> FlattenArray.flatten([1, [2], 3, nil])
8-
[1,2,3]
8+
[1, 2, 3]
99
1010
iex> FlattenArray.flatten([nil, nil])
1111
[]

‎exercises/practice/flatten-array/lib/flatten_array.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ defmodule FlattenArray do
55
## Examples
66
77
iex> FlattenArray.flatten([1, [2], 3, nil])
8-
[1,2,3]
8+
[1, 2, 3]
99
1010
iex> FlattenArray.flatten([nil, nil])
1111
[]

‎mix.exs

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ defmodule ExercismTestRunner.Mixfile do
2525
defp deps do
2626
[
2727
{:dialyxir, "~> 1.3.0", runtime: false},
28-
{:markdown_code_block_formatter, "~> 0.1.0", runtime: false}
28+
{:markdown_code_block_formatter, "~> 0.1.0", runtime: false},
29+
{:doctest_formatter, "~> 0.2.0", runtime: false}
2930
]
3031
end
3132
end

‎mix.lock

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
%{
22
"dialyxir": {:hex, :dialyxir, "1.3.0", "fd1672f0922b7648ff9ce7b1b26fcf0ef56dda964a459892ad15f6b4410b5284", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "00b2a4bcd6aa8db9dcb0b38c1225b7277dca9bc370b6438715667071a304696f"},
3+
"doctest_formatter": {:hex, :doctest_formatter, "0.2.0", "fe6198e8d81d833269314696b5bb55c0db0e16f609de53cdcafe1758f53ecf6c", [:mix], [], "hexpm", "34fb0da7cbb704d5caf477e77268fcf7ee9c87e13d94a04ea1865afb9e82e3f5"},
34
"erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"},
45
"markdown_code_block_formatter": {:hex, :markdown_code_block_formatter, "0.1.0", "1eb35408f0ce2cbd40086fea5bbb2aebbb4805ffc2c967f9e54aa724fa4bd222", [:mix], [], "hexpm", "ce27a7c7497074c48941c1d74ab9c39a08db31f2875b867c6d5671d7d70682b0"},
56
}

0 commit comments

Comments
 (0)
Please sign in to comment.