Skip to content

Commit 1bbb5ec

Browse files
committed
Merge pull request #89 from basho/rz-add-dialyzer-targets
add dialyzer targets
2 parents 885b3e0 + dcff19d commit 1bbb5ec

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,16 @@ pkgclean:
6565
$(MAKE) -C package pkgclean
6666

6767
export BITCASK_TAG PKG_VERSION REPO REVISION
68+
69+
APPS = kernel stdlib sasl erts ssl tools os_mon runtime_tools crypto inets \
70+
xmerl webtool snmp public_key mnesia eunit syntax_tools compiler
71+
PLT = $(HOME)/.bitcask_dialyzer_plt
72+
73+
build_plt: deps compile
74+
dialyzer --build_plt --output_plt $(PLT) --apps $(APPS) deps/*/ebin
75+
76+
dialyzer: deps compile
77+
dialyzer -Wno_return --plt $(PLT) ebin
78+
79+
clean_plt:
80+
rm $(PLT)

src/bitcask.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ fold_keys(Ref, Fun, Acc0, MaxAge, MaxPut) ->
312312

313313
%% @doc fold over all K/V pairs in a bitcask datastore.
314314
%% Fun is expected to take F(K,V,Acc0) -> Acc
315-
-spec fold(reference() | record(),
315+
-spec fold(reference() | tuple(),
316316
fun((binary(), binary(), any()) -> any()),
317317
any()) -> any() | {error, any()}.
318318
fold(Ref, Fun, Acc0) when is_reference(Ref)->
@@ -326,7 +326,7 @@ fold(State, Fun, Acc0) ->
326326
%% @doc fold over all K/V pairs in a bitcask datastore specifying max age/updates of
327327
%% the frozen keystore.
328328
%% Fun is expected to take F(K,V,Acc0) -> Acc
329-
-spec fold(reference() | record(), fun((binary(), binary(), any()) -> any()), any(),
329+
-spec fold(reference() | tuple(), fun((binary(), binary(), any()) -> any()), any(),
330330
non_neg_integer() | undefined, non_neg_integer() | undefined) ->
331331
any() | {error, any()}.
332332
fold(Ref, Fun, Acc0, MaxAge, MaxPut) when is_reference(Ref)->

0 commit comments

Comments
 (0)