aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2016-07-04 13:24:35 +0200
committerHans Bolinder <[email protected]>2016-07-04 13:24:35 +0200
commit7ec57c5e01c5a826467a324610c668ae4a5128ae (patch)
tree7bde4edd7e4769e255244182cf11ea068ec61434 /lib
parent30e1d890e37ffd57bfbcf043b3b982c781139418 (diff)
parent35b35e975bf744385484cafd76029163d67d5086 (diff)
downloadotp-7ec57c5e01c5a826467a324610c668ae4a5128ae.tar.gz
otp-7ec57c5e01c5a826467a324610c668ae4a5128ae.tar.bz2
otp-7ec57c5e01c5a826467a324610c668ae4a5128ae.zip
Merge branch 'kostis/edoc/minor_changes' into maint
* kostis/edoc/minor_changes: edoc: Provide a slightly better fix for unmatched returns
Diffstat (limited to 'lib')
-rw-r--r--lib/edoc/src/edoc_tags.erl11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/edoc/src/edoc_tags.erl b/lib/edoc/src/edoc_tags.erl
index 9e2e41e902..93f423b906 100644
--- a/lib/edoc/src/edoc_tags.erl
+++ b/lib/edoc/src/edoc_tags.erl
@@ -213,8 +213,10 @@ filter_tags([#tag{name = N, line = L} = T | Ts], Tags, Where, Ts1) ->
true ->
filter_tags(Ts, Tags, Where, [T | Ts1]);
false ->
- [warning(L, Where, "tag @~s not recognized.", [N]) ||
- Where =/= no],
+ case Where of
+ no -> ok;
+ _ -> warning(L, Where, "tag @~s not recognized.", [N])
+ end,
filter_tags(Ts, Tags, Where, Ts1)
end;
filter_tags([], _, _, Ts) ->
@@ -451,7 +453,7 @@ check_type(#tag{line = L, data = Data}, P0, Ls, Ts) ->
check_type(#t_def{type = Type}, P, Ls, Ts) ->
check_type(Type, P, Ls, Ts);
check_type(#t_type{name = Name, args = Args}, P, Ls, Ts) ->
- _ = check_used_type(Name, Args, P, Ls),
+ check_used_type(Name, Args, P, Ls),
check_types3(Args++Ts, P, Ls);
check_type(#t_var{}, P, Ls, Ts) ->
check_types3(Ts, P, Ls);
@@ -503,7 +505,8 @@ check_used_type(#t_name{name = N, module = Mod}=Name, Args, P, LocalTypes) ->
false ->
#parms{warn = W, line = L, file = File} = P,
%% true = ets:insert(DT, TypeName),
- [type_warning(L, File, "missing type", N, NArgs) || W]
+ _ = [type_warning(L, File, "missing type", N, NArgs) || W],
+ ok
end.
type_warning(Line, File, S, N, NArgs) ->