xref: /rk3399_ARM-atf/.editorconfig (revision 612c4e695075d7d39acf3f771e0563cd51a6f280)
15d9cef94SEvan Lloyd#
2*572635cdSBoyan Karatotev# Copyright (c) 2017-2024, Arm Limited and Contributors. All rights reserved.
35d9cef94SEvan Lloyd#
45d9cef94SEvan Lloyd# SPDX-License-Identifier: BSD-3-Clause
55d9cef94SEvan Lloyd#
65d9cef94SEvan Lloyd
7bd97f83aSJohn 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)
1440b06510SJustin Chadwell# [PEP8]        Style Guide for Python Code
1540b06510SJustin Chadwell#		(https://www.python.org/dev/peps/pep-0008)
165d9cef94SEvan Lloyd
175d9cef94SEvan Lloyd
185d9cef94SEvan Lloydroot = true
195d9cef94SEvan Lloyd
205d9cef94SEvan Lloyd# set default to match [LCS] .c/.h settings.
215d9cef94SEvan Lloyd# This will also apply to .S, .mk, .sh, Makefile, .dts, etc.
225d9cef94SEvan Lloyd[*]
235d9cef94SEvan Lloyd# Not specified, but fits current ARM-TF sources.
245d9cef94SEvan Lloydcharset = utf-8
255d9cef94SEvan Lloyd
265d9cef94SEvan Lloyd# Not specified, but implicit for "LINUX coding style".
275d9cef94SEvan Lloydend_of_line = lf
285d9cef94SEvan Lloyd
295d9cef94SEvan Lloyd# [LCS] Chapter 1: Indentation
305d9cef94SEvan Lloyd#       "and thus indentations are also 8 characters"
315d9cef94SEvan Lloydindent_size = 8
325d9cef94SEvan Lloyd
335d9cef94SEvan Lloyd# [LCS] Chapter 1: Indentation
345d9cef94SEvan Lloyd#       "Outside of comments,...spaces are never used for indentation"
355d9cef94SEvan Lloydindent_style = tab
365d9cef94SEvan Lloyd
375d9cef94SEvan Lloyd# Not specified by [LCS], but sensible
385d9cef94SEvan Lloydinsert_final_newline = true
395d9cef94SEvan Lloyd
405d9cef94SEvan Lloyd# [LCS] Chapter 2: Breaking long lines and strings
41279f77b4SYann Gautier#       "The limit on the length of lines is 100 columns"
425d9cef94SEvan Lloyd#   This is a "soft" requirement for Arm-TF, and should not be the sole
435d9cef94SEvan Lloyd#   reason for changes.
44279f77b4SYann Gautiermax_line_length = 100
455d9cef94SEvan Lloyd
465d9cef94SEvan Lloyd# [LCS] Chapter 1: Indentation
475d9cef94SEvan Lloyd#       "Tabs are 8 characters"
485d9cef94SEvan Lloydtab_width = 8
495d9cef94SEvan Lloyd
505d9cef94SEvan Lloyd# [LCS] Chapter 1: Indentation
515d9cef94SEvan Lloyd#       "Get a decent editor and don't leave whitespace at the end of lines."
525d9cef94SEvan Lloyd# [LCS] Chapter 3.1: Spaces
535d9cef94SEvan Lloyd#       "Do not leave trailing whitespace at the ends of lines."
545d9cef94SEvan Lloydtrim_trailing_whitespace = true
555d9cef94SEvan Lloyd
565d9cef94SEvan Lloyd
57bbf0a1e4SPaul Beesley# Adjustment for ReStructuredText (RST) documentation
58bbf0a1e4SPaul Beesley[*.{rst}]
595d9cef94SEvan Lloydindent_size = 4
605d9cef94SEvan Lloydindent_style = space
615d9cef94SEvan Lloyd
6240b06510SJustin Chadwell
6340b06510SJustin Chadwell# Adjustment for python which prefers a different style
6440b06510SJustin Chadwell[*.py]
6540b06510SJustin Chadwell# [PEP8] Indentation
6640b06510SJustin Chadwell#	"Use 4 spaces per indentation level."
6740b06510SJustin Chadwellindent_size = 4
6840b06510SJustin Chadwellindent_style = space
6940b06510SJustin Chadwell
7040b06510SJustin Chadwell# [PEP8] Maximum Line Length
7140b06510SJustin Chadwell#	"Limit all lines to a maximum of 79 characters."
7240b06510SJustin Chadwellmax_line_length = 79
73*572635cdSBoyan Karatotev
74*572635cdSBoyan Karatotev[.git/COMMIT_EDITMSG]
75*572635cdSBoyan Karatotevmax_line_length = 72
76