Identifiants » Historique » Version 47
Patrice Nadeau, 2025-03-23 13:20
| 1 | 36 | Patrice Nadeau | # Identifiants |
|---|---|---|---|
| 2 | 47 | Patrice Nadeau | |
| 3 | TODO : library name + module name + action + subject |
||
| 4 | |||
| 5 | 43 | Patrice Nadeau | 1. En **anglais américain**, maximum de **31** caractères : |
| 6 | 45 | Patrice Nadeau | 1. Lettres |
| 7 | * Macros : |
||
| 8 | * Majuscules et minuscules |
||
| 9 | > La parie principale DOIT être en majuscule |
||
| 10 | * Fonctions, variables, énumérations, structures, définition de type : |
||
| 11 | * Minuscules |
||
| 12 | 1. Nombre |
||
| 13 | 43 | Patrice Nadeau | 1. Commence par une lettre |
| 14 | 1. Si plusieurs mots sont utilisés, ils DOIVENT être séparées par des traits de soulignement |
||
| 15 | 30 | Patrice Nadeau | 1. Déclaration |
| 16 | 31 | Patrice Nadeau | 1. Un objet ayant une visibilité locale DOIT avoir le modificateur `static` |
| 17 | 30 | Patrice Nadeau | 1. Un objet « obsolète », DOIT avoir : |
| 18 | 33 | Patrice Nadeau | 1. Un des attributs : |
| 19 | 40 | Patrice Nadeau | > Génération de message lors de la compilation (`-Wall`) |
| 20 | 32 | Patrice Nadeau | * `deprecated` |
| 21 | * `unavailable` |
||
| 22 | 33 | Patrice Nadeau | 1. Les commentaires Doxygen : |
| 23 | 32 | Patrice Nadeau | * `@deprecated` : Indications sur le remplacement à utiliser |
| 24 | * `@since` : Depuis quel version le changement est apparue |
||
| 25 | 35 | Patrice Nadeau | 1. Commentaires Doxygen : |
| 26 | 19 | Patrice Nadeau | 1. `@brief` : Description obligatoire |
| 27 | 1. `@sa` : Lien vers une autre item (see also), facultatif |
||
| 28 | 29 | Patrice Nadeau | 1. `@todo` : Notes sur les tachés à faire, facultatif |
| 29 | 1. `@bug` : Notes sur les bogues présents, facultatif |
||
| 30 | 1. La gradations des notes et remarques se fait selon : |
||
| 31 | 28 | Patrice Nadeau | * `@remark` : Non importante |
| 32 | * `@note` : Général |
||
| 33 | 22 | Patrice Nadeau | * `@attention` : Important |
| 34 | 30 | Patrice Nadeau | * `@warning` : Conséquence négative |
| 35 | 1 | Patrice Nadeau | |
| 36 | 3 | Patrice Nadeau | ## Exemple |
| 37 | 1 | Patrice Nadeau | ``` c |
| 38 | /** |
||
| 39 | 21 | Patrice Nadeau | * @brief old_function |
| 40 | 34 | Patrice Nadeau | * @deprecated Cette fonction seras retirée, utiliser new_function à la place |
| 41 | 1 | Patrice Nadeau | * @since Version x.x.xx |
| 42 | */ |
||
| 43 | 21 | Patrice Nadeau | int old_function(void) __attribute__((deprecated)); |
| 44 | 1 | Patrice Nadeau | |
| 45 | /** |
||
| 46 | 21 | Patrice Nadeau | * @brief old_function |
| 47 | 23 | Patrice Nadeau | * @deprecated Cette fonction est retirée, utiliser new_function à la place |
| 48 | 1 | Patrice Nadeau | * @since Version x.x.xx |
| 49 | */ |
||
| 50 | 21 | Patrice Nadeau | int old_function(void) __attribute__((unavailable)); |
| 51 | 1 | Patrice Nadeau | ``` |
| 52 | 5 | Patrice Nadeau | |
| 53 | ## Justification |
||
| 54 | * Linux kernel coding style : <https://www.kernel.org/doc/html/v4.10/process/coding-style.html#naming> |
||
| 55 | * GNU Coding Standards <https://www.gnu.org/prep/standards/html_node/Writing-C.html#Writing-C> |
||
| 56 | 46 | Patrice Nadeau | * Embedded C Coding Standard : <https://barrgroup.com/embedded-c-coding-standard> |