Skip to content

Commit

Permalink
Merge branch 'kiko/dialyzer/fixes-license-on-test-files/OTP-19434' in…
Browse files Browse the repository at this point in the history
…to maint

* kiko/dialyzer/fixes-license-on-test-files:
  dialyzer: remove license from expected result

OTP-19434
  • Loading branch information
kikofernandez committed Jan 16, 2025
2 parents a2c9c99 + 7bf07d3 commit d14f825
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/dialyzer/test/file_utils.erl
Original file line number Diff line number Diff line change
Expand Up @@ -151,5 +151,13 @@ file_to_lines(File, Acc) ->
case io:get_line(File, "") of
{error, _}=Error -> Error;
eof -> Acc;
A -> file_to_lines(File, [A|Acc])
A ->
case A of
"%% SPDX-License-Identifier:"++_ ->
file_to_lines(File, Acc);
"%% SPDX-FileCopyrightText:"++_ ->
file_to_lines(File, Acc);
_ ->
file_to_lines(File, [A|Acc])
end
end.
2 changes: 2 additions & 0 deletions lib/dialyzer/test/small_SUITE_data/results/abs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
%% SPDX-License-Identifier: Apache-2.0
%% SPDX-FileCopyrightText: 2024 Erlang/OTP and its contributors

abs.erl:12:1: Function i1/0 has no local return
abs.erl:16:5: The pattern 'true' can never match the type 'false'
Expand Down
3 changes: 3 additions & 0 deletions lib/dialyzer/test/small_SUITE_data/src/abs.erl
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,6 @@ int() ->

float() ->
math:sqrt(1.0).

%% SPDX-License-Identifier: Apache-2.0
%% SPDX-FileCopyrightText: 2024 Erlang/OTP and its contributors

0 comments on commit d14f825

Please sign in to comment.