| 1 |
# For format see editorconfig.org |
| 2 |
# Copyright 2022 Collabora Ltd. |
| 3 |
# SPDX-License-Identifier: MIT |
| 4 |
|
| 5 |
root = true |
| 6 |
|
| 7 |
[*] |
| 8 |
# In general all dbus code is in Unix text format, encoded as UTF-8 |
| 9 |
charset = utf-8 |
| 10 |
end_of_line = lf |
| 11 |
insert_final_newline = true |
| 12 |
# Hard tabs (if used, but please don't) are worth 8 spaces, even if we |
| 13 |
# are indenting by 2 or 4 spaces per indent level |
| 14 |
tab_width = 8 |
| 15 |
|
| 16 |
[{*.py,*.sh,meson.build,CMakeLists.txt,*.cmake}] |
| 17 |
# Most scripts are 4-space indented |
| 18 |
indent_size = 4 |
| 19 |
indent_style = space |
| 20 |
|
| 21 |
[{*.c,*.cpp,*.h,*.h.in,Version.in,*.h.cmake}] |
| 22 |
# C/C++ code is GNU-style, see CONTRIBUTING.md |
| 23 |
# Note that order is important: *.h.cmake appears after *.cmake so that |
| 24 |
# the more specific rule takes precedence |
| 25 |
indent_size = 2 |
| 26 |
indent_style = space |
| 27 |
|
| 28 |
[{*.xml,*.xml.in}] |
| 29 |
# As a special case, XML is 2-space indented |
| 30 |
indent_size = 2 |
| 31 |
indent_style = space |
| 32 |
|
| 33 |
[configure.ac] |
| 34 |
# Inconsistently 2, 4 or arbitrary, so choose the lowest common denominator |
| 35 |
indent_size = 2 |
| 36 |
indent_style = space |
| 37 |
|
| 38 |
[Makefile.am] |
| 39 |
# Hard tabs are syntactically significant in Make |
| 40 |
indent_size = 8 |
| 41 |
indent_style = tab |
| 42 |
|
| 43 |
[*.md] |
| 44 |
indent_size = 4 |
| 45 |
indent_style = space |
| 46 |
# The Markdown spec assumes tabs are only worth 4 spaces, so if hard tabs |
| 47 |
# exist, treat them as a 4-space indent |
| 48 |
tab_width = 4 |
| 49 |
|
| 50 |
[test/name-test/*.sh] |
| 51 |
# As a special case, these older scripts are 2-space indented |
| 52 |
indent_size = 2 |
| 53 |
indent_style = space |
| 54 |
|
| 55 |
[*.reg.in] |
| 56 |
# As a special case, this has Windows line-endings |
| 57 |
end_of_line = crlf |