coding-style.rst (1ac731c529cd4d6adbce134754b51ff7d822b145) | coding-style.rst (5a602de99797bddc9dd7f73592281a507196f69d) |
---|---|
1.. _codingstyle: 2 3Linux kernel coding style 4========================= 5 6This is a short document describing the preferred coding style for the 7linux kernel. Coding style is very personal, and I won't **force** my 8views on anybody, but this is what goes for anything that I have to be --- 721 unchanged lines hidden (view full) --- 730Note that you can also use the ``clang-format`` tool to help you with 731these rules, to quickly re-format parts of your code automatically, 732and to review full files in order to spot coding style mistakes, 733typos and possible improvements. It is also handy for sorting ``#includes``, 734for aligning variables/macros, for reflowing text and other similar tasks. 735See the file :ref:`Documentation/process/clang-format.rst <clangformat>` 736for more details. 737 | 1.. _codingstyle: 2 3Linux kernel coding style 4========================= 5 6This is a short document describing the preferred coding style for the 7linux kernel. Coding style is very personal, and I won't **force** my 8views on anybody, but this is what goes for anything that I have to be --- 721 unchanged lines hidden (view full) --- 730Note that you can also use the ``clang-format`` tool to help you with 731these rules, to quickly re-format parts of your code automatically, 732and to review full files in order to spot coding style mistakes, 733typos and possible improvements. It is also handy for sorting ``#includes``, 734for aligning variables/macros, for reflowing text and other similar tasks. 735See the file :ref:`Documentation/process/clang-format.rst <clangformat>` 736for more details. 737 |
738Some basic editor settings, such as indentation and line endings, will be 739set automatically if you are using an editor that is compatible with 740EditorConfig. See the official EditorConfig website for more information: 741https://editorconfig.org/ |
|
738 73910) Kconfig configuration files 740------------------------------- 741 742For all of the Kconfig* configuration files throughout the source tree, 743the indentation is somewhat different. Lines under a ``config`` definition 744are indented with one tab, while help text is indented an additional two 745spaces. Example:: --- 526 unchanged lines hidden --- | 742 74310) Kconfig configuration files 744------------------------------- 745 746For all of the Kconfig* configuration files throughout the source tree, 747the indentation is somewhat different. Lines under a ``config`` definition 748are indented with one tab, while help text is indented an additional two 749spaces. Example:: --- 526 unchanged lines hidden --- |