Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Commit 9ae08af

Browse files
haulethtsloughter
authored andcommitted
fix: typo in type exports and dialyzer fixes (#122)
It was `export_types` instead of proper `export_type`, also there were some Dialyzer errors out there.
1 parent b37772e commit 9ae08af

File tree

7 files changed

+14
-17
lines changed

7 files changed

+14
-17
lines changed

src/oc_stat.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ record(Ctx, Measures) ->
7171
record(Tags, Measures).
7272

7373
%% @doc Exports view_data of all subscribed views
74-
-spec export() -> oc_stat_view:view_data().
74+
-spec export() -> [oc_stat_view:view_data()].
7575
export() ->
7676
[oc_stat_view:export(View) || View <- oc_stat_view:all_subscribed_()].
7777

src/oc_stat_aggregation.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
-export([convert/3]).
2323

24-
-export_types(data/0).
24+
-export_type([data/0]).
2525

2626
-type data_rows(AggregationValue) :: [#{tags := tv(),
2727
value := AggregationValue}].

src/oc_stat_aggregation_count.erl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
export/2,
3131
clear_rows/2]).
3232

33-
-export_types([value/0]).
34-
3533
init(_Name, _Keys, Options) ->
3634
Options.
3735

src/oc_stat_exporter.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
code_change/3,
2626
terminate/2]).
2727

28-
-export_types([exporter/0]).
28+
-export_type([exporter/0]).
2929

3030
-compile({no_auto_import, [register/2]}).
3131

src/oc_stat_measure.erl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@
5151

5252
-export(['__init_backend__'/0]).
5353

54-
-export_types([name/0,
55-
description/0,
56-
unit/0,
57-
measure/0]).
54+
-export_type([name/0,
55+
description/0,
56+
unit/0,
57+
measure/0]).
5858

5959
-record(measure, {name :: name(),
6060
module :: module(),

src/oc_stat_view.erl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,10 @@
4848
tag_values_/2,
4949
all_subscribed_/0]).
5050

51-
-export_types([name/0,
52-
description/0,
53-
view/0,
54-
view_data/0,
55-
measure/0]).
51+
-export_type([name/0,
52+
description/0,
53+
view/0,
54+
view_data/0]).
5655

5756
-export(['__init_backend__'/0]).
5857

src/oc_tags.erl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
verify_value/1,
3030
format_error/1]).
3131

32-
-export_types([key/0,
33-
value/0,
34-
tags/0]).
32+
-export_type([key/0,
33+
value/0,
34+
tags/0]).
3535

3636
-include("opencensus.hrl").
3737

0 commit comments

Comments
 (0)