Debian Codegraph @

test/fixtures/formatting-before/fmt-1.yml

raw
1 ---
2
3
4
5 # ^ too many newlines before
6 foo: bar # This is a comment has extra spaces preceding it
7
8 fruits: # unindented sequence:
9 - apple
10 - orange
11 vegetables: # indented sequence:
12 - onion
13 - carrot
14
15 quoting:
16 - 'that should have double quotes'
17 - 'that should remain in single quotes'
18 - 'a string with " inside'
19 # next line has some undesired trailing spaces:
20 - "a string with ' inside"
21 - can't be sure!
22 # next line should be converted to use double quotes:
23 - ['foo', 'bar']
24
25 inline-dictionary:
26 - {foo: bar} # should add some spacing between curly braces and content
27 - { foo2: bar2 } # should reduce spacing between curly braces and content
28
29 # YAML 1.1 Boolean-hell: https://yaml.org/type/bool.html
30 booleans-true:
31 preferred: true # YAML 1.2 compatible!
32 answer-1.1: YES
33 canonical-1.1: y
34 canonical-upper-1.1: Y
35 logical-1.1: True
36 option-1.1: on
37 booleans-false:
38 preferred: false # YAML 1.2 compatible!
39 answer-1.1: NO
40 canonical-1.1: n
41 canonical-upper-1.1: N
42 logical-1.1: False
43 option-1.1: off
44
45
46 # ^ double newline should be removed
47 overly-indented-vault-value: !vault |
48 $ANSIBLE_VAULT;1.1;AES256
49 123466303630313
50
51 # this file also has 3 newlines at end-of-file instead of one
52
53