Skip to content

Commit b928e39

Browse files
authored
Merge pull request #527 from maennchen/jm/warning_record_match
Fix Formatting of `:record_match`
2 parents 0091928 + f8e2ad9 commit b928e39

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

Diff for: lib/dialyxir/warnings.ex

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ defmodule Dialyxir.Warnings do
4141
Dialyxir.Warnings.PatternMatch,
4242
Dialyxir.Warnings.PatternMatchCovered,
4343
Dialyxir.Warnings.RecordConstruction,
44+
Dialyxir.Warnings.RecordMatch,
4445
Dialyxir.Warnings.RecordMatching,
4546
Dialyxir.Warnings.UnknownBehaviour,
4647
Dialyxir.Warnings.UnknownFunction,

Diff for: lib/dialyxir/warnings/record_match.ex

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
defmodule Dialyxir.Warnings.RecordMatch do
2+
@behaviour Dialyxir.Warning
3+
4+
@impl Dialyxir.Warning
5+
@spec warning() :: :record_match
6+
def warning(), do: :record_match
7+
8+
@impl Dialyxir.Warning
9+
@spec format_short([String.t()]) :: String.t()
10+
defdelegate format_short(args), to: Dialyxir.Warnings.RecordMatching
11+
12+
@impl Dialyxir.Warning
13+
defdelegate format_long(args), to: Dialyxir.Warnings.RecordMatching
14+
15+
@impl Dialyxir.Warning
16+
defdelegate explain(), to: Dialyxir.Warnings.RecordMatching
17+
end

0 commit comments

Comments
 (0)