Whole file

David-Wobrock/sqlvalidator

The author described this change as Fix some newline problems. It counts as a record because the check below fails on the code as it stood at e48827a36 and passes on 554746350, with nothing else changed between the two runs.

Fix saved2020-05-29
Sharing licenceMIT · LICENSE
Change size+15 10

What the code was meant to do, written into the code itself as a save note

Fix some newline problems

The change

6262 yield elem3
6363 else:
6464 for w1 in elem3.split(" "):
65- for w2 in split_with_sep(w1, ","):
66- for w3 in split_with_sep(w2, ";"):
67- for w4 in split_with_sep(w3, "("):
68- for w5 in split_with_sep(w4, ")"):
69- for w6 in split_with_sep(w5, "+"):
70- for w7 in split_with_sep(w6, "-"):
65+ for w2 in w1.split("\n"):
66+ for w3 in split_with_sep(w2, ","):
67+ for w4 in split_with_sep(w3, ";"):
68+ for w5 in split_with_sep(w4, "("):
69+ for w6 in split_with_sep(w5, ")"):
70+ for w7 in split_with_sep(w6, "+"):
7171 for w8 in split_with_sep(
72- w7, "*"
72+ w7, "-"
7373 ):
7474 for w9 in split_with_sep(
75- w8, "/"
75+ w8, "*"
7676 ):
7777 for (
7878 w10
7979 ) in split_with_sep(
80- w9, "="
80+ w9, "/"
8181 ):
82- yield w10.lower()
82+ for (
83+ w11
84+ ) in split_with_sep(
85+ w10, "="
86+ ):
87+ yield w11.lower()
8388

The check that tells the two apart

failpass·tests/integration/test_file_formatting.py::test_format_file_multiline_sql

Check file tests/integration/test_file_formatting.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before ite48827a3682ce9c82c75f967df207939c8c8ce31
Broken version dated2020-05-29
Modulesqlvalidator.grammar.tokeniser
Units changedto_tokens
Fingerprintc53da84f3bc20211
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in David-Wobrock/sqlvalidator