diff options
| author | Charles Brunet <charles.brunet@optelgroup.com> | 2024-08-06 10:15:33 -0400 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2024-08-20 09:38:27 -0700 |
| commit | d9ba42217f49c4bd4caeac9050cc475e3453f75e (patch) | |
| tree | 3c3bbc263fa8cde298236bfb7c9e58aeb4d4d490 /test cases/format | |
| parent | 18f4a058bf7e4b7eb32553b10fe3a37e1c22aa15 (diff) | |
| download | meson-d9ba42217f49c4bd4caeac9050cc475e3453f75e.tar.gz | |
format: fix indentation of comments
Fixes #13508
- Fix indentation of comments in arrays
- Fix indentation of comments in dicts
- Fix indentation of comments in if clauses
- Fix indentation of comments in foreach clauses
Diffstat (limited to 'test cases/format')
| -rw-r--r-- | test cases/format/1 default/indentation.meson | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test cases/format/1 default/indentation.meson b/test cases/format/1 default/indentation.meson index b1edc3a16..fe78847f7 100644 --- a/test cases/format/1 default/indentation.meson +++ b/test cases/format/1 default/indentation.meson @@ -11,7 +11,10 @@ project( ) a = [ + # comment + # comment 1, + # comment 2, 3, [ @@ -36,8 +39,13 @@ a = [ d = {} if meson.project_version().version_compare('>1.2') + # comment + # comment if meson.version().version_compare('>1.0') + # comment + # comment foreach i : a + # comment e = { 'a': 'a', 'b': 'b', @@ -69,9 +77,18 @@ if meson.project_version().version_compare('>1.2') ], } endforeach + + foreach j : a + # comment + # comment + # comment + endforeach elif 42 in d d += {'foo': 43} else # ensure else is correctly indented (issue #13316) + # comment k = 'k' + # comment + # comment endif endif |
