The current code fails to exclude correctly for patterns like "%%%X"
lint/format-strings: Correctly exclude escaped percent symbols #14960
pull luke-jr wants to merge 1 commits into bitcoin:master from luke-jr:bugfix_lint_fmtstr changing 1 files +2 −3-
luke-jr commented at 3:44 PM on December 14, 2018: member
-
lint/format-strings: Correctly exclude escaped percent symbols 57281199b8
- MarcoFalke requested review from practicalswift on Dec 14, 2018
- MarcoFalke added the label Tests on Dec 14, 2018
-
practicalswift commented at 8:22 AM on December 15, 2018: contributor
Concept ACK. Thanks for finding and fixing this. @luke-jr, could you add a
doctesttest that fails before the fix and passes after the fix? -
in test/lint/lint-format-strings.py:247 in 57281199b8
240 | @@ -241,12 +241,11 @@ def count_format_specifiers(format_string): 241 | 4 242 | """ 243 | assert(type(format_string) is str) 244 | + format_string = format_string.replace('%%', 'X') 245 | n = 0 246 | in_specifier = False 247 | for i, char in enumerate(format_string):
practicalswift commented at 5:35 PM on December 16, 2018:ibecomes unused after this change. Removeenumerate(...):-)for char in format_string:laanwj commented at 2:15 PM on December 18, 2018: memberutACK, but yes no longer need
iin test/lint/lint-format-strings.py:242 in 57281199b8
240 | @@ -241,12 +241,11 @@ def count_format_specifiers(format_string): 241 | 4 242 | """
promag commented at 3:23 PM on December 18, 2018:Could add an example here.
promag commented at 3:23 PM on December 18, 2018: membertACK 5728119 — also tested @practicalswift suggestion.
MarcoFalke merged this on Dec 22, 2018MarcoFalke closed this on Dec 22, 2018MarcoFalke referenced this in commit 18857b4c40 on Dec 22, 2018PastaPastaPasta referenced this in commit 41bae818d7 on Jun 27, 2021PastaPastaPasta referenced this in commit 6657074db5 on Jun 28, 2021PastaPastaPasta referenced this in commit 0e84e74988 on Jun 29, 2021PastaPastaPasta referenced this in commit e8b3522039 on Jul 1, 2021PastaPastaPasta referenced this in commit 3dbd54d945 on Jul 1, 2021PastaPastaPasta referenced this in commit 8194129b6f on Jul 1, 2021UdjinM6 referenced this in commit 3e408557bf on Jul 5, 2021PastaPastaPasta referenced this in commit f10236c2bd on Jul 8, 2021DrahtBot locked this on Sep 8, 2021ContributorsLabels
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 15:15 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 15:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me