Skip to content

Commit 514d208

Browse files
authored
Merge pull request #8167 from garazdawi/lukas/stdlib/update_warn_missing_spec_doc
Add warn_missing_spec_documented to ignore functions with -doc false.
2 parents 5e5e218 + d575f44 commit 514d208

File tree

321 files changed

+274
-194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

321 files changed

+274
-194
lines changed
0 Bytes
Binary file not shown.
-4 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
508 Bytes
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
312 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-4 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
264 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
576 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
560 Bytes
Binary file not shown.
12 Bytes
Binary file not shown.

bootstrap/lib/compiler/ebin/cerl.beam

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
48 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-4 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
4 Bytes
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

bootstrap/lib/kernel/ebin/auth.beam

0 Bytes
Binary file not shown.

bootstrap/lib/kernel/ebin/code.beam

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-28 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-4 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.

bootstrap/lib/kernel/ebin/erpc.beam

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

bootstrap/lib/kernel/ebin/file.beam

0 Bytes
Binary file not shown.
-32 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

bootstrap/lib/kernel/ebin/global.beam

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

bootstrap/lib/kernel/ebin/group.beam

48 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

bootstrap/lib/kernel/ebin/heart.beam

0 Bytes
Binary file not shown.

bootstrap/lib/kernel/ebin/inet.beam

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-4 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

bootstrap/lib/kernel/ebin/kernel.beam

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

bootstrap/lib/kernel/ebin/logger.beam

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
92 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

bootstrap/lib/kernel/ebin/net.beam

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

bootstrap/lib/kernel/ebin/os.beam

0 Bytes
Binary file not shown.

bootstrap/lib/kernel/ebin/pg.beam

0 Bytes
Binary file not shown.

bootstrap/lib/kernel/ebin/pg2.beam

0 Bytes
Binary file not shown.
168 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.

bootstrap/lib/kernel/ebin/rpc.beam

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

bootstrap/lib/kernel/ebin/socket.beam

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
452 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/array.beam

0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/base64.beam

0 Bytes
Binary file not shown.
8 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/binary.beam

-24 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/c.beam

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/dets.beam

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-12 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/dict.beam

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/edlin.beam

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.

bootstrap/lib/stdlib/ebin/epp.beam

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
796 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/erl_pp.beam

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-8 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/ets.beam

172 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/gen.beam

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/io.beam

0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/io_lib.beam

-16 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-4 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/lists.beam

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/maps.beam

0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/math.beam

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/peer.beam

0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/pool.beam

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/qlc.beam

-20 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/qlc_pt.beam

0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/queue.beam

0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/rand.beam

0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/random.beam

0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/re.beam

-12 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/sets.beam

0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/shell.beam

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/slave.beam

0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/sofs.beam

0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/string.beam

-36 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/sys.beam

0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/timer.beam

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

bootstrap/lib/stdlib/ebin/zip.beam

-8 Bytes
Binary file not shown.

erts/emulator/test/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ RELSYSDIR = $(RELEASE_PATH)/emulator_test
216216
# ----------------------------------------------------
217217
# FLAGS
218218
# ----------------------------------------------------
219-
ERL_MAKE_FLAGS +=
219+
ERL_MAKE_FLAGS +=
220+
ERL_COMPILE_FLAGS += +nowarn_missing_spec_documented
220221
ERL_COMPILE_FLAGS := $(filter-out +deterministic,$($(ERL_COMPILE_FLAGS)))
221222

222223
# ----------------------------------------------------

erts/epmd/test/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ RELEPMDDIR = $(RELEASE_PATH)/epmd_test
4646
# FLAGS
4747
# ----------------------------------------------------
4848

49-
ERL_COMPILE_FLAGS += $(EPMD_FLAGS)
49+
ERL_COMPILE_FLAGS += $(EPMD_FLAGS) +nowarn_missing_spec_documented
5050

5151
# ----------------------------------------------------
5252
# Targets

erts/preloaded/src/erlang.erl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9988,13 +9988,16 @@ Failure: `badarg` if `List` is an empty list `[]`.
99889988
tl(_List) ->
99899989
erlang:nif_error(undefined).
99909990

9991+
-spec trace_session_create(Opts :: [{tracer, pid() | port()} |
9992+
{tracer, module(), term()}]) -> trace_session().
99919993
-doc #{ since => <<"OTP-27">>, group => trace }.
99929994
trace_session_create(Opts) ->
99939995
try erts_internal:trace_session_create(Opts) of
99949996
Ref -> Ref
99959997
catch error:R:Stk ->
99969998
error_with_inherited_info(R, [Opts], Stk)
99979999
end.
10000+
-spec trace_session_destroy(trace_session()) -> ok.
999810001
-doc #{ since => <<"OTP-27">>, group => trace }.
999910002
trace_session_destroy(Ref) ->
1000010003
try erts_internal:trace_session_destroy(Ref) of

erts/test/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ RELSYSDIR = $(RELEASE_PATH)/system_test
5858
# ----------------------------------------------------
5959
# FLAGS
6060
# ----------------------------------------------------
61-
ERL_COMPILE_FLAGS +=
61+
ERL_COMPILE_FLAGS += +nowarn_missing_spec_documented
6262

6363
# ----------------------------------------------------
6464
# Targets

lib/asn1/test/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ RELSYSDIR = $(RELEASE_PATH)/asn1_test
138138
# ----------------------------------------------------
139139
# FLAGS
140140
# ----------------------------------------------------
141-
ERL_COMPILE_FLAGS += +warnings_as_errors +nowarn_export_all
141+
ERL_COMPILE_FLAGS += +warnings_as_errors +nowarn_export_all +nowarn_missing_spec_documented
142142
ERL_COMPILE_FLAGS := $(filter-out +deterministic,$(ERL_COMPILE_FLAGS))
143143
EBIN = .
144144

lib/common_test/src/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ DTD_FILES = \
115115
# FLAGS
116116
# ----------------------------------------------------
117117
ERL_COMPILE_FLAGS += -pa ../ebin -I../include -I $(ERL_TOP)/lib/snmp/include/ \
118-
-I../../xmerl/inc/ -I $(ERL_TOP)/lib/kernel/include -Werror
118+
-I../../xmerl/inc/ -I $(ERL_TOP)/lib/kernel/include -Werror \
119+
+nowarn_missing_spec_documented
119120

120121
# ----------------------------------------------------
121122
# Targets

lib/common_test/test/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ RELSYSDIR = $(RELEASE_PATH)/common_test_test
9898
# ----------------------------------------------------
9999

100100
ERL_MAKE_FLAGS +=
101-
ERL_COMPILE_FLAGS +=
101+
ERL_COMPILE_FLAGS += +nowarn_missing_spec_documented
102102
ERL_COMPILE_FLAGS := $(filter-out +deterministic,$(ERL_COMPILE_FLAGS))
103103

104104
EBIN = .

lib/common_test/test_server/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ TS_TARGETS = $(TS_MODULES:%=$(EBIN)/%.$(EMULATOR))
5858
# ----------------------------------------------------
5959
# FLAGS
6060
# ----------------------------------------------------
61-
ERL_COMPILE_FLAGS += -I../include -Werror
61+
ERL_COMPILE_FLAGS += -I../include -Werror +nowarn_missing_spec_documented
6262

6363
# ----------------------------------------------------
6464
# Targets

lib/compiler/src/beam_doc.erl

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@
3636

3737
-include_lib("kernel/include/eep48.hrl").
3838

39-
-moduledoc false.
40-
4139
-define(DEFAULT_MODULE_DOC_LOC, 1).
4240
-define(DEFAULT_FORMAT, <<"text/markdown">>).
4341

@@ -313,18 +311,18 @@ preprocessing(AST, State) ->
313311
Funs = [% Order matters
314312
fun has_docs/2,
315313
fun extract_deprecated/2,
316-
fun extract_exported_types0/2, % done
317-
fun extract_signature_from_spec0/2,%done
314+
fun extract_exported_types0/2,
315+
fun extract_signature_from_spec0/2,
318316
fun track_documentation/2, %must be before upsert_documentation_from_terminal_item/2
319317
fun upsert_documentation_from_terminal_item/2,
320-
fun extract_docformat0/2, %done
321-
fun extract_moduledoc0/2, %done
322-
fun extract_module_meta/2, %done
323-
fun extract_exported_funs/2, %done
324-
fun extract_file/2, %done
318+
fun extract_docformat0/2,
319+
fun extract_moduledoc0/2,
320+
fun extract_module_meta/2,
321+
fun extract_exported_funs/2,
322+
fun extract_file/2,
325323
fun extract_record/2,
326-
fun extract_hidden_types0/2, %done
327-
fun extract_type_defs0/2, %done
324+
fun extract_hidden_types0/2,
325+
fun extract_type_defs0/2,
328326
fun extract_type_dependencies/2],
329327
foldl(fun (F, State1) -> F(AST0, State1) end, State0, Funs)
330328
end,

lib/compiler/src/compile.erl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,10 @@ value are listed.
692692
specification (or contract) for an exported function is not given. Use this
693693
option to turn on this kind of warning.
694694
695+
- **`warn_missing_spec_documented`** - By default, warnings are not emitted when a
696+
specification (or contract) for a documented function is not given. Use this
697+
option to turn on this kind of warning.
698+
695699
- **`warn_missing_spec_all`** - By default, warnings are not emitted when a
696700
specification (or contract) for an exported or unexported function is not
697701
given. Use this option to turn on this kind of warning.

lib/compiler/test/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ RELSYSDIR = $(RELEASE_PATH)/compiler_test
181181
# ----------------------------------------------------
182182

183183
ERL_MAKE_FLAGS +=
184-
ERL_COMPILE_FLAGS += +clint +clint0 +ssalint
184+
ERL_COMPILE_FLAGS += +clint +clint0 +ssalint +nowarn_missing_spec_documented
185185
ERL_COMPILE_FLAGS := $(filter-out +deterministic,$(ERL_COMPILE_FLAGS))
186186

187187
EBIN = .

lib/compiler/test/beam_doc_SUITE.erl

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ hide_moduledoc2(Conf) ->
118118
ModuleName = ?get_name(),
119119
{ok, ModName} = default_compile_file(Conf, ModuleName),
120120
{ok, {docs_v1, _,_, _Mime, hidden, _,
121-
[{{function,handle_call,1},{19,2},[<<"handle_call/1">>],hidden,#{}},
121+
[{{function,handle_call,1},{16,2},[<<"handle_call/1">>],hidden,#{}},
122122
{{function, main, 0}, _, [<<"main()">>], hidden, #{}}]}} = code:get_doc(ModName),
123123
ok.
124124

@@ -201,10 +201,10 @@ types_and_opaques(Conf) ->
201201
UsesPublic, Ignore, MapFun, PrivateEncoding, Foo
202202
]}} = code:get_doc(ModName),
203203

204-
{{type,public,0},{128,2},[<<"public()">>],none,#{exported := true}} = Public,
205-
{{type,intermediate,0},{127,2},[<<"intermediate()">>],none,#{exported := false}} = Intermediate,
206-
{{type,hidden_nowarn_type,0},{123,2},[<<"hidden_nowarn_type()">>],hidden,#{exported := false}} = HiddenNoWarnType,
207-
{{type,hidden_type,0},{120,2},[<<"hidden_type()">>],hidden,#{exported := false}} = HiddenType,
204+
{{type,public,0},{125,2},[<<"public()">>],none,#{exported := true}} = Public,
205+
{{type,intermediate,0},{124,2},[<<"intermediate()">>],none,#{exported := false}} = Intermediate,
206+
{{type,hidden_nowarn_type,0},{120,2},[<<"hidden_nowarn_type()">>],hidden,#{exported := false}} = HiddenNoWarnType,
207+
{{type,hidden_type,0},{117,2},[<<"hidden_type()">>],hidden,#{exported := false}} = HiddenType,
208208
{{type,my_other_private_type,0},MyOtherPrivateTypeLine,
209209
[<<"my_other_private_type()">>],none,#{exported := false}} = OtherPrivateType,
210210
{{type,my_private_type,0},MyPrivateTypeLine,
@@ -230,22 +230,22 @@ types_and_opaques(Conf) ->
230230
{{type, name,1},_,[<<"name(_)">>], TypeDoc, #{exported := true}} = Name,
231231
{{type, hidden_included_type, 0}, _, _, hidden, #{exported := false }} = HiddenIncludedType,
232232

233-
{{function,uses_public,0},{131,1},[<<"uses_public()">>],none,#{}} = UsesPublic,
233+
{{function,uses_public,0},{128,1},[<<"uses_public()">>],none,#{}} = UsesPublic,
234234
{{function,ignore_type_from_hidden_fun,0},_,[<<"ignore_type_from_hidden_fun()">>],hidden,#{}} = Ignore,
235235
{{function,map_fun,0},_,[<<"map_fun()">>],none,#{}} = MapFun,
236236
{{function,private_encoding_func,2},_,[<<"private_encoding_func(Data, Options)">>],none,#{}} = PrivateEncoding,
237237
{{function,foo,0},_,[<<"foo()">>],none,#{}} = Foo,
238238

239-
?assertEqual(106, erl_anno:line(MyOtherPrivateTypeLine)),
240-
?assertEqual(105, erl_anno:line(MyPrivateTypeLine)),
241-
?assertEqual(102, erl_anno:line(MyMapLine)),
242-
?assertEqual(99, erl_anno:line(StateEnterLine)),
243-
?assertEqual(98, erl_anno:line(CallbackModeLine)),
244-
?assertEqual(96, erl_anno:line(CallbackResultLine)),
239+
?assertEqual(103, erl_anno:line(MyOtherPrivateTypeLine)),
240+
?assertEqual(102, erl_anno:line(MyPrivateTypeLine)),
241+
?assertEqual(99, erl_anno:line(MyMapLine)),
242+
?assertEqual(96, erl_anno:line(StateEnterLine)),
243+
?assertEqual(95, erl_anno:line(CallbackModeLine)),
244+
?assertEqual(93, erl_anno:line(CallbackResultLine)),
245245

246246
[{File, Ws}, {HrlFile, HrlWs}] = Warnings,
247247
?assertEqual("types_and_opaques.erl", filename:basename(File)),
248-
?assertEqual({{120,2}, beam_doc,
248+
?assertEqual({{117,2}, beam_doc,
249249
{hidden_type_used_in_exported_fun,{hidden_type,0}}}, lists:nth(4, Ws)),
250250

251251
?assertEqual("types_and_opaques.hrl", filename:basename(HrlFile)),
@@ -550,10 +550,10 @@ spec_switch_order(Conf) ->
550550

551551
{ok, {docs_v1, _ModuleAnno,_, _, _, _,
552552
[NotFalse, Other, Bar, Foo]}} = code:get_doc(ModName),
553-
{{function,not_false,0}, {53,1}, [<<"not_false()">>], none,#{}} = NotFalse,
554-
{{function,other,0},{37,2},[<<"other()">>],hidden,#{}} = Other,
555-
{{function,bar,1},{31,2},[<<"bar(X)">>],hidden,#{}} = Bar,
556-
{{function,foo,1}, {23, 2}, [<<"foo(Var)">>], #{ <<"en">> := <<"Foo does X">> }, #{}} = Foo.
553+
{{function,not_false,0}, {52,1}, [<<"not_false()">>], none,#{}} = NotFalse,
554+
{{function,other,0},{36,2},[<<"other()">>],hidden,#{}} = Other,
555+
{{function,bar,1},{30,2},[<<"bar(X)">>],hidden,#{}} = Bar,
556+
{{function,foo,1}, {22, 2}, [<<"foo(Var)">>], #{ <<"en">> := <<"Foo does X">> }, #{}} = Foo.
557557

558558
skip_doc(Conf) ->
559559
ModuleName =?get_name(),

lib/compiler/test/beam_doc_SUITE_data/hide_moduledoc2.erl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
-moduledoc hidden.
66

7-
-doc "
8-
Doc test module
9-
".
107
-doc hidden.
118
main() ->
129
ok().

lib/compiler/test/beam_doc_SUITE_data/spec_switch_order.erl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
-export([foo/1, bar/1, other/0, not_false/0]).
44

5-
-doc hidden.
65
-spec foo(integer()) -> mytype().
76

87

lib/compiler/test/beam_doc_SUITE_data/types_and_opaques.erl

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ Represents a maybe type.
5757
-type hidden_false() :: atom().
5858

5959
-doc false.
60-
-doc "
61-
Here is ok.
62-
".
6360
-type hidden() :: hidden_false().
6461

6562

@@ -131,17 +128,8 @@ ignore_type_from_hidden_fun() ->
131128
uses_public() ->
132129
qux().
133130

134-
-doc false.
135131
-doc "
136-
Hidden function with doc attribute
132+
Un-exported function with doc attribute
137133
".
138134
qux() ->
139-
qux2().
140-
141-
142-
-doc "
143-
Hidden function with doc attribute
144-
".
145-
-doc false.
146-
qux2() ->
147135
ok.

lib/debugger/test/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ RELSYSDIR = $(RELEASE_PATH)/debugger_test
7272
# ----------------------------------------------------
7373

7474
ERL_MAKE_FLAGS +=
75-
ERL_COMPILE_FLAGS +=
75+
ERL_COMPILE_FLAGS += +nowarn_missing_spec_documented
7676
ERL_COMPILE_FLAGS := $(filter-out +deterministic,$(ERL_COMPILE_FLAGS))
7777

7878
EBIN = .

lib/dialyzer/src/dialyzer.erl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -593,18 +593,17 @@ run(Opts) ->
593593
Warnings :: [dial_warning()],
594594
ModulesAnalyzed :: [module()].
595595

596+
run_report_modules_analyzed(Opts) ->
597+
{Warnings, _ModulesChanged, ModulesAnalyzed} = run_report_modules_changed_and_analyzed(Opts),
598+
{Warnings, ModulesAnalyzed}.
599+
596600
-doc false.
597601
-spec run_report_modules_changed_and_analyzed(Options) -> {Warnings, ModulesChanged, ModulesAnalyzed} when
598602
Options :: [dial_option()],
599603
Warnings :: [dial_warning()],
600604
ModulesChanged :: undefined | [module()],
601605
ModulesAnalyzed :: [module()].
602606

603-
run_report_modules_analyzed(Opts) ->
604-
{Warnings, _ModulesChanged, ModulesAnalyzed} = run_report_modules_changed_and_analyzed(Opts),
605-
{Warnings, ModulesAnalyzed}.
606-
607-
-doc false.
608607
run_report_modules_changed_and_analyzed(Opts) ->
609608
try dialyzer_options:build([{report_mode, quiet},
610609
{erlang_mode, true}|Opts]) of

lib/diameter/src/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ ERL_COMPILE_FLAGS += \
115115
+'{attribute,insert,app_vsn,"$(APP_VSN)"}' \
116116
+warn_export_vars \
117117
+warn_unused_vars \
118+
+nowarn_missing_spec_documented \
118119
-pa $(ABS_EBIN) \
119120
-I $(INCDIR) \
120121
-I gen \

lib/diameter/test/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ DATA_DIRS = $(sort $(dir $(DATA)))
5555
# This is only used to compile suite locally when running with a
5656
# target like 'all' below. Target release_tests only installs source.
5757
ERL_COMPILE_FLAGS += +warn_export_vars \
58+
+nowarn_missing_spec_documented \
5859
+warn_unused_vars \
5960
-I ../include \
6061
-I ../src/gen \

lib/edoc/src/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ RELSYSDIR = $(RELEASE_PATH)/lib/edoc-$(VSN)
2323

2424
EBIN = ../ebin
2525
XMERL = ../../xmerl
26-
ERL_COMPILE_FLAGS += -pa $(XMERL) -I../include -I$(XMERL)/include +warn_unused_vars +nowarn_shadow_vars +warn_unused_import +warn_deprecated_guard +no_docs
26+
ERL_COMPILE_FLAGS += -pa $(XMERL) -I../include -I$(XMERL)/include +warn_unused_vars +nowarn_shadow_vars +warn_unused_import +warn_deprecated_guard +no_docs +nowarn_missing_spec_documented
2727

2828
include files.mk
2929

lib/edoc/test/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ RELSYSDIR = $(RELEASE_PATH)/edoc_test
2626
# ----------------------------------------------------
2727

2828
ERL_MAKE_FLAGS +=
29-
ERL_COMPILE_FLAGS +=
29+
ERL_COMPILE_FLAGS += +nowarn_missing_spec_documented
3030
ERL_COMPILE_FLAGS := $(filter-out +deterministic,$(ERL_COMPILE_FLAGS))
3131

3232
EBIN = .

lib/eldap/src/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ APP_TARGET = $(EBIN)/$(APP_FILE)
6060
# ----------------------------------------------------
6161
# FLAGS
6262
# ----------------------------------------------------
63-
ERL_COMPILE_FLAGS += -I../include -I../ebin -Werror
63+
ERL_COMPILE_FLAGS += -I../include -I../ebin -Werror +nowarn_missing_spec_documented
6464

6565
# ----------------------------------------------------
6666
# Targets

lib/eldap/test/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ RELSYSDIR = $(RELEASE_PATH)/eldap_test
5454
# ----------------------------------------------------
5555
# FLAGS
5656
# ----------------------------------------------------
57-
ERL_COMPILE_FLAGS += $(INCLUDES) -pa $(ERL_TOP)/lib/eldap/ebin
57+
ERL_COMPILE_FLAGS += $(INCLUDES) -pa $(ERL_TOP)/lib/eldap/ebin +nowarn_missing_spec_documented
5858
ERL_COMPILE_FLAGS := $(filter-out +deterministic,$(ERL_COMPILE_FLAGS))
5959

6060
EBIN = .

lib/et/examples/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
5555
# ----------------------------------------------------
5656
# FLAGS
5757
# ----------------------------------------------------
58-
ERL_COMPILE_FLAGS += -pa ../../et/ebin +nowarn_missing_doc
58+
ERL_COMPILE_FLAGS += -pa ../../et/ebin +nowarn_missing_doc +nowarn_missing_spec_documented
5959
EBIN = .
6060

6161
# ----------------------------------------------------

0 commit comments

Comments
 (0)