Wiki » History » Version 7

Marcin Poplawski, 07/25/2018 03:31 PM

1 1 Marcin Poplawski
h1. vDC Wiki
2 1 Marcin Poplawski
3 3 Marcin Poplawski
h2. Definition of Done - vDC
4 1 Marcin Poplawski
5 1 Marcin Poplawski
h3. Feature and task
6 1 Marcin Poplawski
7 1 Marcin Poplawski
# MR added to comment
8 1 Marcin Poplawski
# No new defects in cppcheck and Coverity
9 1 Marcin Poplawski
# No new defects in Unit tests
10 3 Marcin Poplawski
# Unit test added (if possible)
11 6 Marcin Poplawski
# Developer test done (dev feed) - by other engineer that was implementing
12 5 Marcin Poplawski
# Spent hours are filled in
13 1 Marcin Poplawski
14 2 Marcin Poplawski
h3. Defect
15 1 Marcin Poplawski
16 1 Marcin Poplawski
# MR added to comment
17 2 Marcin Poplawski
# Comment added - cause and solution
18 1 Marcin Poplawski
# No new defects in Cppcheck and Coverity
19 1 Marcin Poplawski
# No new defects in Unit tests
20 3 Marcin Poplawski
# Unit test added (if possible)
21 6 Marcin Poplawski
# Developer test done (dev feed, different browsers) - by other engineer that was implementing
22 5 Marcin Poplawski
# Spent hours are filled in
23 3 Marcin Poplawski
24 3 Marcin Poplawski
h2. Definition of Done - vDC UI
25 3 Marcin Poplawski
26 3 Marcin Poplawski
h3. Feature and task
27 3 Marcin Poplawski
28 3 Marcin Poplawski
# MR added to comment
29 3 Marcin Poplawski
# No new defects in Linting
30 3 Marcin Poplawski
# No new defects in Unit tests
31 3 Marcin Poplawski
# Unit test added (if reasonable)
32 6 Marcin Poplawski
# Developer test done (dev feed) - by other engineer that was implementing
33 5 Marcin Poplawski
# Spent hours are filled in
34 3 Marcin Poplawski
35 3 Marcin Poplawski
h3. Defect
36 3 Marcin Poplawski
37 3 Marcin Poplawski
# MR added to comment
38 3 Marcin Poplawski
# Comment added - cause and solution
39 3 Marcin Poplawski
# No new defects in Linting
40 3 Marcin Poplawski
# No new defects in Unit tests
41 3 Marcin Poplawski
# Unit test added (if reasonable)
42 6 Marcin Poplawski
# Developer test done (dev feed, different browsers) - by other engineer that was implementing
43 5 Marcin Poplawski
# Spent hours are filled in
44 7 Marcin Poplawski
45 7 Marcin Poplawski
h2. Code review checklist
46 7 Marcin Poplawski
47 7 Marcin Poplawski
initalizacja:
48 7 Marcin Poplawski
wszystko w definicji kalsy, chyba ze jest zalezne od kontruktora
49 7 Marcin Poplawski
50 7 Marcin Poplawski
if () ; // w jednej linii, jak sie nie misci to {} (tylko bez else)
51 7 Marcin Poplawski
52 7 Marcin Poplawski
if ((wa1) && (wa2)) {
53 7 Marcin Poplawski
54 7 Marcin Poplawski
} else if () {
55 7 Marcin Poplawski
56 7 Marcin Poplawski
}
57 7 Marcin Poplawski
58 7 Marcin Poplawski
59 7 Marcin Poplawski
for (i; i < 0; ++i) { // inne to samo
60 7 Marcin Poplawski
61 7 Marcin Poplawski
}
62 7 Marcin Poplawski
63 7 Marcin Poplawski
switch () {
64 7 Marcin Poplawski
  case 1: //{} if needed, jedna linia jest ok
65 7 Marcin Poplawski
  case 2:
66 7 Marcin Poplawski
  default: // powinien byc,  co w default w zaleznosci od kontekstu
67 7 Marcin Poplawski
}
68 7 Marcin Poplawski
69 7 Marcin Poplawski
enum class A_Staus;
70 7 Marcin Poplawski
71 7 Marcin Poplawski
class A // struktura
72 7 Marcin Poplawski
{
73 7 Marcin Poplawski
74 7 Marcin Poplawski
inherited
75 7 Marcin Poplawski
76 7 Marcin Poplawski
public:
77 7 Marcin Poplawski
               konstruktor // definicja krotkicj jest dopuszczalna
78 7 Marcin Poplawski
               destruktor // definicja krotkicj jest dopuszczalna, zawsze virtual
79 7 Marcin Poplawski
               overriden
80 7 Marcin Poplawski
               enum class EE; // deklaracja, definicja poza ciałem
81 7 Marcin Poplawski
               metody // definicja krotkicj jest dopuszczalna
82 7 Marcin Poplawski
               
83 7 Marcin Poplawski
protected:
84 7 Marcin Poplawski
               overriden
85 7 Marcin Poplawski
               metody
86 7 Marcin Poplawski
               
87 7 Marcin Poplawski
private:
88 7 Marcin Poplawski
               overriden
89 7 Marcin Poplawski
               metody
90 7 Marcin Poplawski
               
91 7 Marcin Poplawski
protected:
92 7 Marcin Poplawski
               static const
93 7 Marcin Poplawski
               class members
94 7 Marcin Poplawski
               
95 7 Marcin Poplawski
private:
96 7 Marcin Poplawski
               static const
97 7 Marcin Poplawski
               class members
98 7 Marcin Poplawski
99 7 Marcin Poplawski
};
100 7 Marcin Poplawski
101 7 Marcin Poplawski
enum class A::EE 
102 7 Marcin Poplawski
{
103 7 Marcin Poplawski
               A, // camel case
104 7 Marcin Poplawski
};
105 7 Marcin Poplawski
106 7 Marcin Poplawski
static const AAA; // all caps
107 7 Marcin Poplawski
108 7 Marcin Poplawski
(staitc) constexpr over static const
109 7 Marcin Poplawski
110 7 Marcin Poplawski
111 7 Marcin Poplawski
void func(aParam1, apAram2, auto... aParams)
112 7 Marcin Poplawski
{
113 7 Marcin Poplawski
               aParams...
114 7 Marcin Poplawski
}
115 7 Marcin Poplawski
116 7 Marcin Poplawski
117 7 Marcin Poplawski
nazwy klas:
118 7 Marcin Poplawski
start z wielkeiej, Camel case
119 7 Marcin Poplawski
120 7 Marcin Poplawski
funkcje:
121 7 Marcin Poplawski
start malej, Camel case
122 7 Marcin Poplawski
123 7 Marcin Poplawski
nazwy parametrow:
124 7 Marcin Poplawski
Camel case, pierwsza a np 'aParam'
125 7 Marcin Poplawski
126 7 Marcin Poplawski
std over boost
127 7 Marcin Poplawski
unique over shared
128 7 Marcin Poplawski
129 7 Marcin Poplawski
header : nie uzywamy using namespace, mozemy uzyc w cpp
130 7 Marcin Poplawski
131 7 Marcin Poplawski
odstepy miedzy funkcjami : dwie spacje
132 7 Marcin Poplawski
133 7 Marcin Poplawski
oddzielanie klas:
134 7 Marcin Poplawski
135 7 Marcin Poplawski
/*  
136 7 Marcin Poplawski
 *  ==========================================================================
137 7 Marcin Poplawski
*  nazwa klasy - przed, wszedzie
138 7 Marcin Poplawski
*  ==========================================================================
139 7 Marcin Poplawski
*/
140 7 Marcin Poplawski
141 7 Marcin Poplawski
 namespace - bez wciecia
142 7 Marcin Poplawski
ifdef bez wciecia, na maksa do lewej
143 7 Marcin Poplawski
144 7 Marcin Poplawski
 #pragma once over ifdef
145 7 Marcin Poplawski
146 7 Marcin Poplawski
 przy koncu namespace, ifdef komentarz z nazwa
147 7 Marcin Poplawski
148 7 Marcin Poplawski
 reference over pointers
149 7 Marcin Poplawski
150 7 Marcin Poplawski
 raw string over special signs
151 7 Marcin Poplawski
152 7 Marcin Poplawski
static constexpr auto STALY_STRING = "aaa"; // sprawdzic z raw stringiem
153 7 Marcin Poplawski
154 7 Marcin Poplawski
streams over formated string
155 7 Marcin Poplawski
156 7 Marcin Poplawski
komentarzw:  jak wiecej niz jedna linia to wielolinijkowe