Skip to content

dialyzer: fix unmatched return warning tag#11321

Open
bchassoul wants to merge 2 commits into
erlang:maintfrom
bchassoul:dialyzer/fix-unmatched-return-tag
Open

dialyzer: fix unmatched return warning tag#11321
bchassoul wants to merge 2 commits into
erlang:maintfrom
bchassoul:dialyzer/fix-unmatched-return-tag

Conversation

@bchassoul

Copy link
Copy Markdown

Fixes #11320

Dialyzer currently returns the misspelled warning tag
warn_umatched_return for unmatched-return warnings from
dialyzer:run/1.

This changes the tag to warn_unmatched_return.

The warning option (unmatched_returns) and the warning payload
(unmatched_return) are already spelled correctly, so this only
affects the warning tag returned in the raw warning tuple.

This also adds a test that checks the raw warning tuple returned by
dialyzer:run/1, since the existing unmatched-return coverage mainly
checks formatted warning text.

@CLAassistant

CLAassistant commented Jul 1, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

CT Test Results

  2 files   42 suites   16m 9s ⏱️
485 tests 481 ✅ 4 💤 0 ❌
573 runs  569 ✅ 4 💤 0 ❌

Results for commit 3c16044.

♻️ 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

@bchassoul bchassoul force-pushed the dialyzer/fix-unmatched-return-tag branch from 8472ce2 to 94f9aff Compare July 1, 2026 19:53
@lucioleKi lucioleKi self-assigned this Jul 2, 2026
@lucioleKi

Copy link
Copy Markdown
Contributor

Thank you for the contribution. You can add the following license to abstract_SUITE.erl to suppress the warning. Please also try to fix the test case failure. I haven't looked closely. Does the test case succeed for you locally?

%%
%% %CopyrightBegin%
%%
%% SPDX-License-Identifier: Apache-2.0
%%
%% Copyright Ericsson AB 2016-2026. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%%     http://www.apache.org/licenses/LICENSE-2.0
%%
%% Unless required by applicable law or agreed to in writing, software
%% distributed under the License is distributed on an "AS IS" BASIS,
%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
%% See the License for the specific language governing permissions and
%% limitations under the License.
%%
%% %CopyrightEnd%
%%

@IngelaAndin IngelaAndin added the team:VM Assigned to OTP team VM label Jul 6, 2026
@bchassoul

Copy link
Copy Markdown
Author

Oh no, I think I committed an older version of the test 😞
It should be fixed now, and it passes locally:

TEST INFO: 1 test(s), 1 case(s) in 1 suite(s)

Testing tests.dialyzer_test.abstract_SUITE.unmatched_return_tag: Starting test, 1 test cases
Testing tests.dialyzer_test.abstract_SUITE.unmatched_return_tag: TEST COMPLETE, 1 ok, 0 failed of 1 test cases

@lucioleKi lucioleKi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix. Hopefully we only need to fix the license header in this file, and then everything would work :)

@@ -1,2 +1,2 @@
%%% This is an -*- Erlang -*- file.
%%%

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
%%%
%%% %CopyrightBegin%
%%%
%%% SPDX-License-Identifier: Apache-2.0
%%%
%%% Copyright 2004-2010 held by the authors. All Rights Reserved.
%%% Copyright Ericsson AB 2009-2026. All Rights Reserved.
%%%

%%% distributed under the License is distributed on an "AS IS" BASIS,
%%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
%%% See the License for the specific language governing permissions and
%%% limitations under the License.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
%%% limitations under the License.
%%%
%%% %CopyrightEnd%
%%%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team:VM Assigned to OTP team VM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants