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