| 1 | # EditorConfig helps developers define and maintain consistent |
| 2 | # coding styles between different editors and IDEs |
| 3 | # editorconfig.org |
| 4 | |
| 5 | root = true |
| 6 | |
| 7 | [*] |
| 8 | end_of_line = lf |
| 9 | charset = utf-8 |
| 10 | insert_final_newline = true |
| 11 | trim_trailing_whitespace = true |
| 12 | indent_style = space |
| 13 | indent_size = 4 |
| 14 | |
| 15 | [*.css] |
| 16 | indent_style = tab |
| 17 | |
| 18 | # some tests need trailing whitespace in output snapshots |
| 19 | [tests/**] |
| 20 | trim_trailing_whitespace = false |
| 21 | # for actual source code files of test, we still don't want trailing whitespace |
| 22 | [tests/**.{rs,js}] |
| 23 | trim_trailing_whitespace = true |
| 24 | # these specific source files need to have trailing whitespace. |
| 25 | [tests/ui/{frontmatter/frontmatter-whitespace-3.rs,parser/shebang/shebang-space.rs}] |
| 26 | trim_trailing_whitespace = false |
| 27 | |
| 28 | [src/llvm-project] |
| 29 | indent_style = unset |
| 30 | indent_size = unset |
| 31 | |
| 32 | [*.rs] |
| 33 | max_line_length = 100 |
| 34 | |
| 35 | [*.md] |
| 36 | # double whitespace at end of line |
| 37 | # denotes a line break in Markdown |
| 38 | trim_trailing_whitespace = false |
| 39 | |
| 40 | [*.yml] |
| 41 | indent_size = 2 |
| 42 | |
| 43 | [Makefile] |
| 44 | indent_style = tab |