forked from erlang/otp
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dialyzer: make -Wunknown a default; add -Wno_unknown flag
Dialyzer's warnings about unknown functions and types are enabled by default. Prior to this PR, Dialyzer used to have disabled (by default) warnings about unknown types and functions. This default value has been overwritten; Dialyzer now warns about unknown types and functions (as requested by the community in erlangGH-5695). Thus, the following two examples are equivalent, i.e., passing the `-Wunknown` function is enabled by default: ```bash dialyzer moduler.erl -Wunknown -Wmissing_return dialyzer moduler.erl -Wmissing_return ``` Dialyzer has a new flag, `-Wno_unknown`. Its purpose is to supress warnings about unknown functions and types (erlangGH-5995). Users who wish to suppress these warnings can invoke Dialyzer using this flag. Example: ```bash dialyzer module.erl -Wno_unknown ```
- Loading branch information
1 parent
8b67a15
commit 94a7dfb
Showing
20 changed files
with
90 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{dialyzer_options, [{warnings, [no_unused, no_return, specdiffs]}]}. | ||
{dialyzer_options, [{warnings, [no_unused, no_return, no_unknown, specdiffs]}]}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{dialyzer_options, [{warnings, [no_unused, no_return, overlapping_contract]}]}. | ||
{dialyzer_options, [{warnings, [no_unused, no_return, no_unknown, overlapping_contract]}]}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{dialyzer_options, [{error_location, line}, {warnings, [no_return]}]}. | ||
{dialyzer_options, [{error_location, line}, {warnings, [no_return, no_unknown]}]}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
{dialyzer_options, [{indent_opt, false}]}. | ||
{dialyzer_options, [{indent_opt, false}, {warnings, [no_unknown]}]}. | ||
{time_limit, 30}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
{dialyzer_options, [{indent_opt, false}, {warnings, [no_unused, no_return]}]}. | ||
{dialyzer_options, [{indent_opt, false}, {warnings, [no_unused, no_return, no_unknown]}]}. | ||
{time_limit, 40}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
{dialyzer_options, [{indent_opt, false}, {include_dirs, ["my_include"]}, {defines, [{'COMPILER_VSN', 42}]}, {warnings, [no_improper_lists]}]}. | ||
{dialyzer_options, [{indent_opt, false}, {include_dirs, ["my_include"]}, {defines, [{'COMPILER_VSN', 42}]}, {warnings, [no_improper_lists, no_unknown]}]}. | ||
{time_limit, 30}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{dialyzer_options, [{indent_opt, false}, {defines, [{'vsn', 4}]}, {warnings, [unknown, no_return]}]}. | ||
{dialyzer_options, [{indent_opt, false}, {defines, [{'vsn', 4}]}, {warnings, [no_return]}]}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
{dialyzer_options, [{indent_opt, false}, {defines, [{vsn, 42}]}]}. | ||
{dialyzer_options, [{indent_opt, false}, {defines, [{vsn, 42}]}, {warnings, [no_unknown]}]}. | ||
{time_limit, 20}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{dialyzer_options, [{indent_opt, false}, {error_location, column}, {warnings, [overlapping_contract]}]}. | ||
{dialyzer_options, [{indent_opt, false}, {error_location, column}, {warnings, [no_unknown, overlapping_contract]}]}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{dialyzer_options, [{indent_opt, false}, {warnings, [underspecs]}]}. | ||
{dialyzer_options, [{indent_opt, false}, {warnings, [no_unknown, underspecs]}]}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
{dialyzer_options, [{indent_opt, false}]}. | ||
{time_limit, 3}. | ||
{dialyzer_options, [{indent_opt, false}, {warnings, [no_unknown]}]}. | ||
{time_limit, 3}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters