.editorconfig 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # For format see editorconfig.org
  2. # Copyright 2022 Collabora Ltd.
  3. # SPDX-License-Identifier: Zlib
  4. root = true
  5. [*.{c,cc,cg,cpp,gradle,h,java,m,metal,pl,py,S,sh,txt}]
  6. indent_size = 4
  7. indent_style = space
  8. insert_final_newline = true
  9. trim_trailing_whitespace = true
  10. [*.{html,js,json,m4,yml,yaml,vcxproj,vcxproj.filters}]
  11. indent_size = 2
  12. indent_style = space
  13. trim_tailing_whitespace = true
  14. [*.xml]
  15. indent_size = 4
  16. indent_style = space
  17. [{CMakeLists.txt,cmake/*.cmake}]
  18. indent_size = 2
  19. indent_style = space
  20. insert_final_newline = true
  21. trim_trailing_whitespace = true
  22. [{cmake/cmake_uninstall.cmake.in,test/CMakeLists.txt,cmake/SDL3Config.cmake.in}]
  23. indent_size = 4
  24. indent_style = space
  25. insert_final_newline = true
  26. trim_trailing_whitespace = true
  27. [{Makefile.*,*.mk,*.sln,*.pbxproj,*.plist}]
  28. indent_size = 8
  29. indent_style = tab
  30. tab_width = 8
  31. [src/joystick/controller_type.*]
  32. indent_style = tab
  33. [src/joystick/hidapi/steam/*.h]
  34. indent_style = tab
  35. [src/libm/*.c]
  36. indent_style = tab
  37. [src/test/SDL_test_{crc32,md5,random}.c]
  38. indent_size = 2
  39. indent_style = space
  40. [src/video/yuv2rgb/*.{c,h}]
  41. indent_style = tab
  42. [wayland-protocols/*.xml]
  43. indent_size = 2
  44. indent_style = space
  45. [*.{markdown,md}]
  46. indent_size = 4
  47. indent_style = space
  48. # Markdown syntax treats tabs as 4 spaces
  49. tab_width = 4
  50. [{*.bat,*.rc}]
  51. end_of_line = crlf
  52. [*.cocci]
  53. insert_final_newline = true