Imre Kis | 124f0e3 | 2021-02-12 18:03:24 +0100 | [diff] [blame] | 1 | Coding Style & Guidelines |
| 2 | ========================= |
| 3 | |
| 4 | The following sections contain |C_PICKER| coding guidelines. They are continually evolving and should not be considered "set |
| 5 | in stone". Feel free to question them and provide feedback. |
| 6 | |
| 7 | The |C_PICKER| project uses multiple "domains" (textual content types, like programming languages) and each defines its own |
| 8 | rules. |
| 9 | |
| 10 | To help configuring text editors the project comes with "`EditorConfig`_" file(s). (:download:`../../.editorconfig`). |
| 11 | |
| 12 | Shared rules |
| 13 | ------------ |
| 14 | |
| 15 | The following rules are common for all domains, except where noted otherwise: |
| 16 | |
| 17 | #. Files shall be **UTF-8** encoded. |
| 18 | #. Use **Unix** style line endings (``LF`` character) |
| 19 | #. The primary language of the project is English. All comments and documentation must be in this language. |
| 20 | #. Trailing whitespace is not welcome, please trim these. |
| 21 | |
| 22 | Python Domain |
| 23 | ------------- |
| 24 | |
| 25 | Python source code rules follow `PEP 8 -- Style Guide for Python Code`_. |
| 26 | |
| 27 | |
| 28 | Restructured Text Domain |
| 29 | ------------------------ |
| 30 | |
| 31 | Please refer to :ref:`Writing documentation`. |
| 32 | |
| 33 | -------------- |
| 34 | |
| 35 | .. _`EditorConfig`: https://editorconfig.org/ |
| 36 | .. _`PEP 8 -- Style Guide for Python Code`: https://www.python.org/dev/peps/pep-0008/ |
| 37 | |
| 38 | *Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.* |
| 39 | |
| 40 | SPDX-License-Identifier: BSD-3-Clause |