diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2016-03-14 14:40:06 +0000 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2016-03-14 22:44:43 +0000 |
commit | 11cd41d92242dce7392ae5ace49ce61413a01677 (patch) | |
tree | b84b7a3750a9c7f9699e0f2638249fb66f02eea6 /doc/README.developer | |
parent | d4b3c8602ca57b8a8b3f37dc544c92f5c5ca0f98 (diff) |
Add EditorConfig reference to README.developer
Change-Id: I595e94bd0274e3ee3c1d8764fc6c93f28993c30f
Reviewed-on: https://code.wireshark.org/review/14468
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'doc/README.developer')
-rw-r--r-- | doc/README.developer | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/doc/README.developer b/doc/README.developer index b98c6fe23c..1cdc41f8c1 100644 --- a/doc/README.developer +++ b/doc/README.developer @@ -667,12 +667,29 @@ discussion of tabs, spaces, and indentation, see http://www.jwz.org/doc/tabs-vs-spaces.html -When creating a new file, you are free to choose an indentation logic. -Most of the files in Wireshark tend to use 2-space or 4-space -indentation. You are encouraged to write a short comment on the -indentation logic at the beginning of this new files. The -tabs-vs-spaces document above provides examples of Emacs and vi -modelines for this purpose. +Most of the files in Wireshark tend to use 2-space or 4-space indentation. When +creating a new file you are free to choose an indentation logic but you are +encouraged to use 4-space indentation for C/C++ source to keep inconsistency +between files to a minimum. + +Each file should have a short comment (modelines) on the indentation logic at +the end of the file. See + + https://www.wireshark.org/tools/modelines.html + +for guidance. + +A complementary and arguably better alternative to modelines is +EditorConfig (http://editorconfig.org). The default EditorConfig indentation +style is defined in the .editorconfig file placed on the root of the project +source code tree (4-space indentation for C). One advantage of following the +default style is that no additional EditorConfig settings are required for new +files. If your file does not follow this style please add a file-specific +setting overriding the default style to a separate .editorconfig configuration +file placed in the source file directory. + +Some IDEs and text editors have built-in EditorConfig support and many more +have plugins available (links at http://editorconfig.org). Please do not leave trailing whitespace (spaces/tabs) on lines. |