prog:clang-tidy
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| prog:clang-tidy [2024/12/06 00:33] – [readability-identifier-naming] : reformattage de l'algo root | prog:clang-tidy [2025/10/30 09:59] (Version actuelle) – [kokulshan/clang-tidy-cache] : suppression car l'autre projet a une meilleure popularité root | ||
|---|---|---|---|
| Ligne 85: | Ligne 85: | ||
| Ci-dessous, '' | Ci-dessous, '' | ||
| - | < | + | | Algo | Exemple | |
| + | |< | ||
| variable objective-C: | variable objective-C: | ||
| si SK_ObjcIvar: | si SK_ObjcIvar: | ||
| Ligne 91: | Ligne 92: | ||
| sinon | sinon | ||
| fin | fin | ||
| + | </ | ||
| + | </ | ||
| + | |< | ||
| typedef: | typedef: | ||
| si SK_Typedef: | si SK_Typedef: | ||
| Ligne 97: | Ligne 100: | ||
| sinon | sinon | ||
| fin | fin | ||
| + | </ | ||
| + | typedef int INTeGER; | ||
| + | </ | ||
| + | |< | ||
| using: | using: | ||
| si SK_TypeAlias: | si SK_TypeAlias: | ||
| Ligne 103: | Ligne 109: | ||
| sinon | sinon | ||
| fin | fin | ||
| + | </ | ||
| + | using DOUbLE = double; | ||
| + | </ | ||
| + | |< | ||
| namespace: | namespace: | ||
| si inline namespace && SK_InlineNamespace: | si inline namespace && SK_InlineNamespace: | ||
| Ligne 110: | Ligne 119: | ||
| SK_Namespace | SK_Namespace | ||
| fin | fin | ||
| + | </ | ||
| + | inline namespace NAMEsPACE {} | ||
| + | namespace nAMEPACE {} | ||
| + | </ | ||
| + | |< | ||
| enum: | enum: | ||
| si enum && SK_Enum: | si enum && SK_Enum: | ||
| Ligne 123: | Ligne 137: | ||
| si SK_Constant: | si SK_Constant: | ||
| SK_Constant | SK_Constant | ||
| - | fin | + | fin</ |
| + | enum eNUM { EnuM_CONST }; | ||
| + | enum class eNUM { ENUM_Const }; | ||
| + | </ | ||
| + | |< | ||
| union ou struct ou class: | union ou struct ou class: | ||
| - | si abstract (au moins une méthode virtuelle pure) && SK_AbstractClass: | + | si abstract (une méthode virtuelle pure) && SK_AbstractClass: |
| SK_AbstractClass | SK_AbstractClass | ||
| si struct && SK_Struct: | si struct && SK_Struct: | ||
| Ligne 134: | Ligne 152: | ||
| si class && SK_Class: | si class && SK_Class: | ||
| SK_Class | SK_Class | ||
| - | si struct | + | si class && SK_Struct: |
| SK_Struct | SK_Struct | ||
| si union && SK_Union: | si union && SK_Union: | ||
| Ligne 141: | Ligne 159: | ||
| SK_Enum | SK_Enum | ||
| fin | fin | ||
| + | </ | ||
| + | class ABStract { | ||
| + | virtual fOo() = 0; | ||
| + | }; | ||
| + | |||
| + | struct STRuct {}; | ||
| + | |||
| + | class ClAsS {}; | ||
| + | |||
| + | union UnIon {}; | ||
| + | enum class eNUM {}; | ||
| + | </ | ||
| + | |< | ||
| membre d'une classe: | membre d'une classe: | ||
| si CheckAnonFieldInParent && struct/ | si CheckAnonFieldInParent && struct/ | ||
| - | Appliquer les règles ci-dessous en considérant le private/ | + | Appliquer les règles ci-dessous en |
| + | | ||
| si const: | si const: | ||
| si SK_ConstantMember: | si SK_ConstantMember: | ||
| Ligne 159: | Ligne 191: | ||
| SK_Member | SK_Member | ||
| fin | fin | ||
| + | </ | ||
| + | class { | ||
| + | const int InT; | ||
| + | private: | ||
| + | short ShorT; | ||
| + | |||
| + | protected: | ||
| + | double DoublE; | ||
| + | |||
| + | public: | ||
| + | float FloaT; | ||
| + | }</ | ||
| + | |< | ||
| paramètre: | paramètre: | ||
| + | // Possible en C++ ?!? | ||
| si constexpr && SK_ConstexprVariable: | si constexpr && SK_ConstexprVariable: | ||
| SK_ConstexprVariable | SK_ConstexprVariable | ||
| Ligne 177: | Ligne 223: | ||
| SK_Parameter | SK_Parameter | ||
| fin | fin | ||
| + | </ | ||
| + | template < | ||
| + | void fOo(const int *IiI, const short & | ||
| + | int *JjJ, short SsS, Types... arGs); | ||
| + | </ | ||
| + | |< | ||
| variable: | variable: | ||
| si constexpr && SK_ConstexprVariable: | si constexpr && SK_ConstexprVariable: | ||
| Ligne 194: | Ligne 245: | ||
| si local && SK_LocalConstant: | si local && SK_LocalConstant: | ||
| SK_LocalConstant | SK_LocalConstant | ||
| - | si local && dans le bloc principal de la fonction/ | + | |
| - | SK_LocalConstant | + | |
| + | | ||
| + | SK_LocalConstant | ||
| si SK_Constant: | si SK_Constant: | ||
| SK_Constant | SK_Constant | ||
| Ligne 211: | Ligne 264: | ||
| si local && SK_LocalVariable: | si local && SK_LocalVariable: | ||
| SK_LocalVariable | SK_LocalVariable | ||
| - | si local && dans le bloc principal de la fonction/ | + | |
| - | SK_LocalVariable | + | |
| + | | ||
| + | SK_LocalVariable | ||
| si SK_Variable: | si SK_Variable: | ||
| SK_Variable | SK_Variable | ||
| fin | fin | ||
| + | </ | ||
| + | constexpr int eE = 150; | ||
| + | class Cc { | ||
| + | static const int Ee = 150; | ||
| + | }; | ||
| + | |||
| + | const int *Jj = nullptr; | ||
| + | const int jJ = 0; | ||
| + | |||
| + | void fOo() { | ||
| + | static const int zZZz = 150; | ||
| + | const int *ZzzZ = nullptr; | ||
| + | { | ||
| + | const int ZZzz = 150; | ||
| + | } | ||
| + | const int ZZzZ = 150; | ||
| + | }; | ||
| + | |||
| + | class Cc2 { | ||
| + | static int Ee2 = 150; | ||
| + | }; | ||
| + | |||
| + | int *Jj2 = nullptr; | ||
| + | int jJ2 = 0; | ||
| + | |||
| + | void fOo2() { | ||
| + | static int zZZz2 = 150; | ||
| + | int *ZzzZ2 = nullptr; | ||
| + | { | ||
| + | int ZZzz2 = 150; | ||
| + | } | ||
| + | int ZZzZ2 = 150; | ||
| + | }; | ||
| + | </ | ||
| + | |< | ||
| méthode: | méthode: | ||
| si override: | si override: | ||
| Ligne 239: | Ligne 329: | ||
| SK_Function | SK_Function | ||
| ignore | ignore | ||
| + | </ | ||
| + | class A{ | ||
| + | public: | ||
| + | virtual void fOo()= 0; | ||
| + | }; | ||
| + | class B:public A{ | ||
| + | public: | ||
| + | void fOo() override; | ||
| + | |||
| + | constexpr int fOo2(); | ||
| + | static void fOo3(); | ||
| + | |||
| + | virtual void fOo4(); | ||
| + | |||
| + | private: | ||
| + | void fOo5(); | ||
| + | protected: | ||
| + | void fOo6(); | ||
| + | public: | ||
| + | void fOo7(); | ||
| + | }; | ||
| + | </ | ||
| + | |< | ||
| fonction: | fonction: | ||
| si constexpr && SK_ConstexprFunction: | si constexpr && SK_ConstexprFunction: | ||
| SK_ConstexprFunction | SK_ConstexprFunction | ||
| + | // C'est quoi une fonction non globale ? | ||
| si global && SK_GlobalFunction: | si global && SK_GlobalFunction: | ||
| SK_GlobalFunction | SK_GlobalFunction | ||
| Ligne 248: | Ligne 362: | ||
| SK_Function | SK_Function | ||
| ignore | ignore | ||
| + | </ | ||
| + | constexpr void b1r(); | ||
| + | void bAr(); | ||
| + | </ | ||
| + | |< | ||
| typename dans template: | typename dans template: | ||
| si SK_TypeTemplateParameter: | si SK_TypeTemplateParameter: | ||
| Ligne 269: | Ligne 387: | ||
| SK_TemplateParameter | SK_TemplateParameter | ||
| ignore | ignore | ||
| + | </ | ||
| + | template< | ||
| + | template< | ||
| + | void FoBa(); | ||
| + | </ | ||
| + | |< | ||
| concept && SK_Concept: | concept && SK_Concept: | ||
| - | SK_Concept | + | SK_Concept</ |
| - | </ | + | template< |
| + | concept ConCepT = std:: | ||
| + | </ | ||
| + | |< | ||
| + | define && SK_MacroDefinition: | ||
| + | SK_MacroDefinition</ | ||
| + | #define MaCrO | ||
| + | </ | ||
| =====Extensions===== | =====Extensions===== | ||
| Ligne 284: | Ligne 414: | ||
| =====Cache===== | =====Cache===== | ||
| - | ====kokulshan/ | ||
| - | |||
| - | [[https:// | ||
| - | |||
| - | * Installation | ||
| - | |||
| - | Il faut avoir installé go. | ||
| - | |||
| - | <code bash> | ||
| - | make | ||
| - | </ | ||
| - | |||
| - | * Exécution | ||
| - | |||
| - | <code bash> | ||
| - | CLANG_TIDY_CACHE_BINARY=/ | ||
| - | </ | ||
| ====matus-chochlik/ | ====matus-chochlik/ | ||
prog/clang-tidy.1733441625.txt.gz · Dernière modification : de root
