-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add more specs #8014
add more specs #8014
Conversation
CT Test Results 5 files 67 suites 31m 20s ⏱️ Results for commit d460406. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts
// Erlang/OTP Github Action Bot |
790aea0
to
6ff049d
Compare
@github-actions disable-cache |
6a1f4eb
to
8d25910
Compare
lib/et/src/et_collector.erl
Outdated
-spec save_event_file(CollectorPid, FileName, [Option]) -> ok | {error, term()} when | ||
CollectorPid :: pid(), | ||
FileName :: file:filename(), | ||
Option :: existing | write | append | keep | clear. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that the manual options in the old documentation had some structure (that may not be worth keeping) but that helped in understanding the current documentation. So maybe we need to updated the description if we want this spec and current description not confusing people.
lib/et/src/et_collector.erl
Outdated
Backward :: neg_integer() | '-infinity', | ||
Fun :: fun((event(), Acc) -> NewAcc) | undefined, | ||
Acc :: term(), | ||
NewAcc :: term(). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be good to adopt the description to say equivalent to instead of short for to adhere to the rest of the documentation and make a link to iterate/5. I see that you only addressed the spec part in this PR so I do not know if your intention is to fix these kind of improvements in a second round after conversion?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a spec only update, the docs will have to be fixed in a future PR.
lib/et/src/et_selector.erl
Outdated
@@ -31,6 +31,10 @@ | |||
|
|||
-include("../include/et.hrl"). | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this module it would also be nice with links in the descriptions!
lib/et/src/et.erl
Outdated
@@ -89,6 +89,10 @@ | |||
trace_me/5, phone_home/5, report_event/5 | |||
]). | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This modules descriptions could also use links.
lib/et/src/et_viewer.erl
Outdated
@@ -139,12 +164,17 @@ start(Options, GUI) -> | |||
%% A filter_fun() takes an event record as sole argument | |||
%% and returns false | true | {true, NewEvent}. | |||
%%---------------------------------------------------------------------- | |||
|
|||
-spec start_link(GUIorOptions) -> {ok, Viewer::pid()} | {error, term()} when |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we keep default as documented option? wx is only possibility now! Users guide still mentions GS, which it should not!
lib/mnesia/src/mnesia_registry.erl
Outdated
%% Optionally creates the Mnesia table Tab with suitable default values. | ||
%% Returns ok or EXIT's | ||
create_table(Tab) -> | ||
Storage = mnesia:table_info(schema, storage_type), | ||
create_table(Tab, [{Storage, [node()]}]). | ||
|
||
-spec create_table(Tab :: atom(), Opt :: [{atom(), term()}]) -> ok. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these spec not refer to mensia module spec?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to export them for a module that should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are they not exported as they are input types of the mnesia module?
lib/observer/src/etop.erl
Outdated
start() -> | ||
start([]). | ||
|
||
|
||
-spec start(Options) -> ok when |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
etop:help() I think creates the documentation that we would want here too!
lib/observer/src/etop.erl
Outdated
@@ -30,6 +30,7 @@ | |||
|
|||
-define(change_at_runtime_config,[lines,interval,sort,accumulate]). | |||
|
|||
-spec help() -> ok. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description of this module refers to types without proper references that can link to actual description.
Add specs for more applications.