.editorconfig 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #
  2. # Copyright (c) 2017-2024, Arm Limited and Contributors. All rights reserved.
  3. #
  4. # SPDX-License-Identifier: BSD-3-Clause
  5. #
  6. # Trusted Firmware-A Coding style spec for editors.
  7. # References:
  8. # [EC] http://editorconfig.org/
  9. # [CONT] contributing.rst
  10. # [LCS] Linux Coding Style
  11. # (https://www.kernel.org/doc/html/v4.10/process/coding-style.html)
  12. # [PEP8] Style Guide for Python Code
  13. # (https://www.python.org/dev/peps/pep-0008)
  14. root = true
  15. # set default to match [LCS] .c/.h settings.
  16. # This will also apply to .S, .mk, .sh, Makefile, .dts, etc.
  17. [*]
  18. # Not specified, but fits current ARM-TF sources.
  19. charset = utf-8
  20. # Not specified, but implicit for "LINUX coding style".
  21. end_of_line = lf
  22. # [LCS] Chapter 1: Indentation
  23. # "and thus indentations are also 8 characters"
  24. indent_size = 8
  25. # [LCS] Chapter 1: Indentation
  26. # "Outside of comments,...spaces are never used for indentation"
  27. indent_style = tab
  28. # Not specified by [LCS], but sensible
  29. insert_final_newline = true
  30. # [LCS] Chapter 2: Breaking long lines and strings
  31. # "The limit on the length of lines is 100 columns"
  32. # This is a "soft" requirement for Arm-TF, and should not be the sole
  33. # reason for changes.
  34. max_line_length = 100
  35. # [LCS] Chapter 1: Indentation
  36. # "Tabs are 8 characters"
  37. tab_width = 8
  38. # [LCS] Chapter 1: Indentation
  39. # "Get a decent editor and don't leave whitespace at the end of lines."
  40. # [LCS] Chapter 3.1: Spaces
  41. # "Do not leave trailing whitespace at the ends of lines."
  42. trim_trailing_whitespace = true
  43. # Adjustment for ReStructuredText (RST) documentation
  44. [*.{rst}]
  45. indent_size = 4
  46. indent_style = space
  47. # Adjustment for python which prefers a different style
  48. [*.py]
  49. # [PEP8] Indentation
  50. # "Use 4 spaces per indentation level."
  51. indent_size = 4
  52. indent_style = space
  53. # [PEP8] Maximum Line Length
  54. # "Limit all lines to a maximum of 79 characters."
  55. max_line_length = 79
  56. [.git/COMMIT_EDITMSG]
  57. max_line_length = 72