Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
0547-stdlib-Fix-format-linting-of-B-and-X.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0547-stdlib-Fix-format-linting-of-B-and-X.patch of Package erlang
From fb7d8f0066427a78533545259a3c151878560934 Mon Sep 17 00:00:00 2001 From: Lukas Larsson <lukas@erlang.org> Date: Wed, 21 Apr 2021 13:57:59 +0200 Subject: [PATCH] stdlib: Fix format linting of ~B and ~X --- lib/stdlib/src/erl_lint.erl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl index 6fdedbc1a4..f03e190516 100644 --- a/lib/stdlib/src/erl_lint.erl +++ b/lib/stdlib/src/erl_lint.erl @@ -4221,6 +4221,7 @@ extract_sequence(1, [$*|Fmt], Need) -> extract_sequence(2, Fmt, [int|Need]); extract_sequence(1, Fmt, Need) -> extract_sequence(2, Fmt, Need); + extract_sequence(2, [$.,C|Fmt], Need) when C >= $0, C =< $9 -> extract_sequence_digits(2, Fmt, Need); extract_sequence(2, [$.,$*|Fmt], Need) -> @@ -4229,12 +4230,14 @@ extract_sequence(2, [$.|Fmt], Need) -> extract_sequence(3, Fmt, Need); extract_sequence(2, Fmt, Need) -> extract_sequence(4, Fmt, Need); + extract_sequence(3, [$.,$*|Fmt], Need) -> extract_sequence(4, Fmt, [int|Need]); extract_sequence(3, [$.,_|Fmt], Need) -> extract_sequence(4, Fmt, Need); extract_sequence(3, Fmt, Need) -> extract_sequence(4, Fmt, Need); + extract_sequence(4, [$t, $l | Fmt], Need) -> extract_sequence(4, [$l, $t | Fmt], Need); extract_sequence(4, [$t, $c | Fmt], Need) -> @@ -4265,6 +4268,7 @@ extract_sequence(4, [$l, C | _Fmt], _Need) -> {error,"invalid control ~l" ++ [C]}; extract_sequence(4, Fmt, Need) -> extract_sequence(5, Fmt, Need); + extract_sequence(5, [C|Fmt], Need0) -> case control_type(C, Need0) of error -> {error,"invalid control ~" ++ [C]}; @@ -4287,10 +4291,10 @@ control_type($w, Need) -> [term|Need]; control_type($p, Need) -> [term|Need]; control_type($W, Need) -> [int,term|Need]; %% Note: reversed control_type($P, Need) -> [int,term|Need]; %% Note: reversed -control_type($b, Need) -> [term|Need]; -control_type($B, Need) -> [term|Need]; -control_type($x, Need) -> [string,term|Need]; %% Note: reversed -control_type($X, Need) -> [string,term|Need]; %% Note: reversed +control_type($b, Need) -> [int|Need]; +control_type($B, Need) -> [int|Need]; +control_type($x, Need) -> [string,int|Need]; %% Note: reversed +control_type($X, Need) -> [string,int|Need]; %% Note: reversed control_type($+, Need) -> [term|Need]; control_type($#, Need) -> [term|Need]; control_type($n, Need) -> Need; -- 2.26.2
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