Skip to content

Commit f513b4e

Browse files
committed
Add example badly-handled comments
1 parent 42d1319 commit f513b4e

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

goldens/trailing_commas.in

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,29 @@ Trailing comma except for last
77

88

99
Trailing comma and a comment
10-
TODO: https://github.com/google/keep-sorted/issues/33 - Fix this
1110
keep-sorted-test start
1211
3, # three
1312
1,
1413
2
1514
keep-sorted-test end
1615

1716
Trailing comma except for last, last has a comment
18-
TODO: https://github.com/google/keep-sorted/issues/33 - Fix this
1917
keep-sorted-test start
2018
3,
2119
1,
2220
2 # two
2321
keep-sorted-test end
2422

2523
Trailing comma and a comment, last has a comment
26-
TODO: https://github.com/google/keep-sorted/issues/33 - Fix this
2724
keep-sorted-test start
2825
3, # three
2926
1,
3027
2 # two
3128
keep-sorted-test end
29+
30+
Trailing commas with quoted comment characters
31+
keep-sorted-test start
32+
"c",
33+
"b, //",
34+
"a, #"
35+
keep-sorted-test end

goldens/trailing_commas.out

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,29 @@ Trailing comma except for last
77

88

99
Trailing comma and a comment
10-
TODO: https://github.com/google/keep-sorted/issues/33 - Fix this
1110
keep-sorted-test start
1211
1,
1312
2,
1413
3 # three
1514
keep-sorted-test end
1615

1716
Trailing comma except for last, last has a comment
18-
TODO: https://github.com/google/keep-sorted/issues/33 - Fix this
1917
keep-sorted-test start
2018
1,
2119
2, # two
2220
3
2321
keep-sorted-test end
2422

2523
Trailing comma and a comment, last has a comment
26-
TODO: https://github.com/google/keep-sorted/issues/33 - Fix this
2724
keep-sorted-test start
2825
1,
2926
2, # two
3027
3 # three
3128
keep-sorted-test end
29+
30+
Trailing commas with quoted comment characters
31+
keep-sorted-test start
32+
"a, #"
33+
"b, //",
34+
"c",
35+
keep-sorted-test end

0 commit comments

Comments
 (0)