xref: /rk3399_ARM-atf/.editorconfig (revision bd97f83a62382633468034db1e81381c5990b62a)
15d9cef94SEvan Lloyd#
2*bd97f83aSJohn Tsichritzis# Copyright (c) 2017-2019, Arm Limited and Contributors. All rights reserved.
35d9cef94SEvan Lloyd#
45d9cef94SEvan Lloyd# SPDX-License-Identifier: BSD-3-Clause
55d9cef94SEvan Lloyd#
65d9cef94SEvan Lloyd
7*bd97f83aSJohn Tsichritzis# Trusted Firmware-A Coding style spec for editors.
85d9cef94SEvan Lloyd
95d9cef94SEvan Lloyd# References:
105d9cef94SEvan Lloyd# [EC]          http://editorconfig.org/
115d9cef94SEvan Lloyd# [CONT]        contributing.rst
125d9cef94SEvan Lloyd# [LCS]         Linux Coding Style
135d9cef94SEvan Lloyd#               (https://www.kernel.org/doc/html/v4.10/process/coding-style.html)
145d9cef94SEvan Lloyd
155d9cef94SEvan Lloyd
165d9cef94SEvan Lloydroot = true
175d9cef94SEvan Lloyd
185d9cef94SEvan Lloyd# set default to match [LCS] .c/.h settings.
195d9cef94SEvan Lloyd# This will also apply to .S, .mk, .sh, Makefile, .dts, etc.
205d9cef94SEvan Lloyd[*]
215d9cef94SEvan Lloyd# Not specified, but fits current ARM-TF sources.
225d9cef94SEvan Lloydcharset = utf-8
235d9cef94SEvan Lloyd
245d9cef94SEvan Lloyd# Not specified, but implicit for "LINUX coding style".
255d9cef94SEvan Lloydend_of_line = lf
265d9cef94SEvan Lloyd
275d9cef94SEvan Lloyd# [LCS] Chapter 1: Indentation
285d9cef94SEvan Lloyd#       "and thus indentations are also 8 characters"
295d9cef94SEvan Lloydindent_size = 8
305d9cef94SEvan Lloyd
315d9cef94SEvan Lloyd# [LCS] Chapter 1: Indentation
325d9cef94SEvan Lloyd#       "Outside of comments,...spaces are never used for indentation"
335d9cef94SEvan Lloydindent_style = tab
345d9cef94SEvan Lloyd
355d9cef94SEvan Lloyd# Not specified by [LCS], but sensible
365d9cef94SEvan Lloydinsert_final_newline = true
375d9cef94SEvan Lloyd
385d9cef94SEvan Lloyd# [LCS] Chapter 2: Breaking long lines and strings
395d9cef94SEvan Lloyd#       "The limit on the length of lines is 80 columns"
405d9cef94SEvan Lloyd#   This is a "soft" requirement for Arm-TF, and should not be the sole
415d9cef94SEvan Lloyd#   reason for changes.
425d9cef94SEvan Lloydmax_line_length = 80
435d9cef94SEvan Lloyd
445d9cef94SEvan Lloyd# [LCS] Chapter 1: Indentation
455d9cef94SEvan Lloyd#       "Tabs are 8 characters"
465d9cef94SEvan Lloydtab_width = 8
475d9cef94SEvan Lloyd
485d9cef94SEvan Lloyd# [LCS] Chapter 1: Indentation
495d9cef94SEvan Lloyd#       "Get a decent editor and don't leave whitespace at the end of lines."
505d9cef94SEvan Lloyd# [LCS] Chapter 3.1: Spaces
515d9cef94SEvan Lloyd#       "Do not leave trailing whitespace at the ends of lines."
525d9cef94SEvan Lloydtrim_trailing_whitespace = true
535d9cef94SEvan Lloyd
545d9cef94SEvan Lloyd
555d9cef94SEvan Lloyd# Adjustment for existing .rst files with different format
565d9cef94SEvan Lloyd[*.{rst,md}]
575d9cef94SEvan Lloydindent_size = 4
585d9cef94SEvan Lloydindent_style = space
595d9cef94SEvan Lloydmax_line_length = 180
605d9cef94SEvan Lloyd# 180 only selected to prevent changes to existing text.
615d9cef94SEvan Lloydtab_width = 4
625d9cef94SEvan Lloyd
63