Bug 1609943 - Move mode line section from C++ to general coding style. r=sylvestre

Differential Revision: https://phabricator.services.mozilla.com/D60262

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Simon Giesecke 2020-01-18 11:43:19 +00:00
Родитель 615906c9b7
Коммит 34cd11297e
2 изменённых файлов: 18 добавлений и 18 удалений

Просмотреть файл

@ -30,24 +30,6 @@ Unix-style linebreaks (``\n``), not Windows-style (``\r\n``). You can
convert patches, with DOS newlines to Unix via the ``dos2unix`` utility,
or your favorite text editor.
Mode line
~~~~~~~~~
Files should have Emacs and vim mode line comments as the first two
lines of the file, which should set ``indent-tabs-mode`` to ``nil``. For new
files, use the following, specifying two-space indentation:
.. code-block:: cpp
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
Be sure to use the correct ``Mode`` in the first line, don't use ``C++`` in
JavaScript files.
Additional rules
----------------

Просмотреть файл

@ -16,3 +16,21 @@ Coding style - General practices
- For new files, be sure to use the right `license
boilerplate <https://www.mozilla.org/MPL/headers/>`__, per our
`license policy <https://www.mozilla.org/MPL/license-policy.html>`__.
Mode line
~~~~~~~~~
Files should have Emacs and vim mode line comments as the first two
lines of the file, which should set ``indent-tabs-mode`` to ``nil``. For new
files, use the following, specifying two-space indentation:
.. code-block:: cpp
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
Be sure to use the correct ``Mode`` in the first line, don't use ``C++`` in
JavaScript files.