Debian Codegraph @

test cases/format/5 transform/default.expected.meson

raw
1 project('a') # should be on one line
2
3
4 # List should be removed, and should be on one line
5 options_ini = 'options.ini'
6 f = files('expected.meson', 'source.meson', options_ini)
7
8 # This array should fit on one line
9 a1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]
10
11 # This array is too long and should be split
12 a2 = [
13 2,
14 3,
15 4,
16 5,
17 6,
18 7,
19 8,
20 9,
21 10,
22 11,
23 12,
24 13,
25 14,
26 15,
27 16,
28 17,
29 18,
30 19,
31 20,
32 21,
33 22,
34 ]
35
36 # space array
37 a3 = [1, 2, 3]
38
39 # multi line expression
40 is_foo = (
41 true
42 and false
43 and true
44 and false
45 and true
46 and false
47 and true
48 and false
49 and true
50 and false
51 )
52
53 # no single comma function
54 fct = files(
55 'meson.build', # force multiline
56 )
57
58 # wide colon
59 d = {'a': 1, 'b': 2, 'c': 3}
60
61 # string conversion
62 'This is not a multiline'
63 'This is not a fstring'
64 '''This isn't convertible'''
65
66 # group arg value
67 arguments = [
68 'a',
69 '--opt_a',
70 'opt_a_value',
71 'b',
72 'c',
73 '--opt_d',
74 '--opt_e',
75 'opt_e_value',
76 '--opt_f',
77 '--opt_g',
78 'opt_g_value',
79 'other_value',
80 'again',
81 '--x',
82 ]
83
84 # issue #15032
85 if true
86 if true
87 if (
88 true
89 and true
90 and false
91 )
92 message('Hello, world!')
93 endif
94 endif
95 endif
96
97 # issue #15019
98 if get_option('client')
99 sources += files(
100 'pypaste/client/__init__.py',
101 'pypaste/client/__main__.py',
102 'pypaste/client/plugins/__init__.py',
103 'pypaste/client/plugins/zen/__init__.py',
104 'pypaste/client/plugins/pgz/__init__.py',
105 )
106
107 dependencies += ['requests']
108 endif
109
110 # no final endline