diff options
| author | John Ericson <John.Ericson@Obsidian.Systems> | 2024-04-08 10:38:11 -0400 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2024-04-23 18:15:34 +0300 |
| commit | be62df7fc72b02f7a7c5a4c513299458b45374f5 (patch) | |
| tree | fd2ae60988a41d0c58c4f53c5695a6cae98599f8 /docs/markdown/Style-guide.md | |
| parent | 0ed78cf6fa6d87c0738f67ae43525e661b50a8a2 (diff) | |
| download | meson-be62df7fc72b02f7a7c5a4c513299458b45374f5.tar.gz | |
Add a few more notes to the style guide
- Mention 2 space indent seems to be the most idiomatic
- Mention trailing commas are good
- Update example to use trailing commas
Diffstat (limited to 'docs/markdown/Style-guide.md')
| -rw-r--r-- | docs/markdown/Style-guide.md | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/docs/markdown/Style-guide.md b/docs/markdown/Style-guide.md index f204a9a70..da827c9ba 100644 --- a/docs/markdown/Style-guide.md +++ b/docs/markdown/Style-guide.md @@ -9,7 +9,11 @@ Meson build files. ## Tabs or spaces? -Always spaces. +Always spaces. Two spaces is the most common. + +## Trailing commas? + +Yes, where possible. They help make nicer diffs in version control systems. ## Naming Variable @@ -70,7 +74,7 @@ normal files. This rule also applies recursively for subdirectories. The following example shows correct source list definition: ```meson -sources = files([ +sources = files( 'aaa/a1.c', 'aaa/a2.c', 'bbb/subdir1/b1.c', @@ -82,6 +86,6 @@ sources = files([ 'f1.c', 'f2.c', 'f10.c', - 'f20.c' -]) + 'f20.c', +) ``` |
