blob: 0e7a5c3c912dcb8fb61e3741b919c1f8440f85eb [file] [log] [blame]
Evan Lloyd5cb62a62017-12-06 19:05:40 +00001#
2# Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7# ARM Trusted Firmware Coding style spec for editors.
8
9# References:
10# [EC] http://editorconfig.org/
11# [CONT] contributing.rst
12# [LCS] Linux Coding Style
13# (https://www.kernel.org/doc/html/v4.10/process/coding-style.html)
14
15
16root = true
17
18# set default to match [LCS] .c/.h settings.
19# This will also apply to .S, .mk, .sh, Makefile, .dts, etc.
20[*]
21# Not specified, but fits current ARM-TF sources.
22charset = utf-8
23
24# Not specified, but implicit for "LINUX coding style".
25end_of_line = lf
26
27# [LCS] Chapter 1: Indentation
28# "and thus indentations are also 8 characters"
29indent_size = 8
30
31# [LCS] Chapter 1: Indentation
32# "Outside of comments,...spaces are never used for indentation"
33indent_style = tab
34
35# Not specified by [LCS], but sensible
36insert_final_newline = true
37
38# [LCS] Chapter 2: Breaking long lines and strings
39# "The limit on the length of lines is 80 columns"
40# This is a "soft" requirement for Arm-TF, and should not be the sole
41# reason for changes.
42max_line_length = 80
43
44# [LCS] Chapter 1: Indentation
45# "Tabs are 8 characters"
46tab_width = 8
47
48# [LCS] Chapter 1: Indentation
49# "Get a decent editor and don't leave whitespace at the end of lines."
50# [LCS] Chapter 3.1: Spaces
51# "Do not leave trailing whitespace at the ends of lines."
52trim_trailing_whitespace = true
53
54
55# Adjustment for existing .rst files with different format
56[*.{rst,md}]
57indent_size = 4
58indent_style = space
59max_line_length = 180
60# 180 only selected to prevent changes to existing text.
61tab_width = 4
62