Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:19
erlang
4101-dialyzer-Add-warning_options-missing_retur...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 4101-dialyzer-Add-warning_options-missing_return-and-extr.patch of Package erlang
From 389a3e05c96cec3295a63df60f29b4c2f9c44213 Mon Sep 17 00:00:00 2001 From: vtm9 <vtmilyakov@gmail.com> Date: Tue, 2 Aug 2022 09:11:08 +0300 Subject: [PATCH] dialyzer: Add warning_options `missing_return` and `extra_return` --- lib/dialyzer/src/dialyzer.hrl | 2 ++ lib/dialyzer/src/dialyzer_cl_parse.erl | 6 ++++++ lib/stdlib/src/erl_lint.erl | 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/dialyzer/src/dialyzer_cl_parse.erl b/lib/dialyzer/src/dialyzer_cl_parse.erl index c249d3b52b..444831efcc 100644 --- a/lib/dialyzer/src/dialyzer_cl_parse.erl +++ b/lib/dialyzer/src/dialyzer_cl_parse.erl @@ -547,6 +547,12 @@ warning_options_msg() -> -Wunderspecs *** Warn about underspecified functions (those whose -spec is strictly more allowing than the success typing). + -Wextra_return *** + Warn about functions whose specification includes types that the + function cannot return. + -Wmissing_return *** + Warn about functions that return values that are not part + of the specification. -Wunknown *** Let warnings about unknown functions and types affect the exit status of the command line version. The default is to ignore diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl index c2f9ad3703..84cbab7dfd 100644 --- a/lib/stdlib/src/erl_lint.erl +++ b/lib/stdlib/src/erl_lint.erl @@ -3472,7 +3472,8 @@ is_module_dialyzer_option(Option) -> no_behaviours,no_undefined_callbacks,unmatched_returns, error_handling,race_conditions,no_missing_calls, specdiffs,overspecs,underspecs,unknown, - no_underspecs, no_extra_return, no_missing_return + no_underspecs,extra_return,no_extra_return, + missing_return,no_missing_return ]). %% try_catch_clauses(Scs, Ccs, In, ImportVarTable, State) -> -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor