Wiki » History » Version 10

Krystian Heberlein, 07/26/2018 11:39 AM

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 8 Krystian Heberlein
- block formatting as follows:
48 9 Krystian Heberlein
<pre>
49 8 Krystian Heberlein
if () ; // one line in the same line is allowed
50 7 Marcin Poplawski
51 7 Marcin Poplawski
if ((wa1) && (wa2)) {
52 7 Marcin Poplawski
53 1 Marcin Poplawski
} else if () {
54 7 Marcin Poplawski
55 7 Marcin Poplawski
}
56 1 Marcin Poplawski
57 8 Krystian Heberlein
for (i; i < 0; ++i) { // other loops in the same form
58 7 Marcin Poplawski
59 1 Marcin Poplawski
}
60 7 Marcin Poplawski
61 1 Marcin Poplawski
switch () {
62 8 Krystian Heberlein
  case 1: //brackets if needed, one line is acceptable
63 1 Marcin Poplawski
  case 2:
64 8 Krystian Heberlein
  default: //required
65 1 Marcin Poplawski
}
66 1 Marcin Poplawski
67 9 Krystian Heberlein
void Myclass::func(const string& aParam1, int aParam2, auto... aParams)
68 1 Marcin Poplawski
{
69 1 Marcin Poplawski
  //using aParams...
70 1 Marcin Poplawski
}
71 9 Krystian Heberlein
</pre>
72 8 Krystian Heberlein
- class declaration:
73 8 Krystian Heberlein
74 9 Krystian Heberlein
* class member initializations in class declaration if possible
75 9 Krystian Heberlein
* no 'using namespace' in header
76 9 Krystian Heberlein
* two lines separation between method definitions in source file
77 8 Krystian Heberlein
78 9 Krystian Heberlein
<pre>
79 8 Krystian Heberlein
/*
80 8 Krystian Heberlein
==========================================================================
81 7 Marcin Poplawski
82 8 Krystian Heberlein
    Class name // separator to be used in header and source file
83 8 Krystian Heberlein
==========================================================================
84 1 Marcin Poplawski
*/
85 7 Marcin Poplawski
	
86 8 Krystian Heberlein
class A // or struct {
87 7 Marcin Poplawski
88 8 Krystian Heberlein
using inherited
89 7 Marcin Poplawski
90 8 Krystian Heberlein
public:
91 8 Krystian Heberlein
  ctor // one line definition is allowed in header
92 8 Krystian Heberlein
  dtor // one line  definition is allowed in header
93 9 Krystian Heberlein
  overridden
94 8 Krystian Heberlein
  enum class EE; // declaration, but definition out of class
95 8 Krystian Heberlein
  methods //  one line  definition is allowed in header
96 7 Marcin Poplawski
97 8 Krystian Heberlein
protected:
98 8 Krystian Heberlein
  overriden
99 8 Krystian Heberlein
  methods
100 7 Marcin Poplawski
101 8 Krystian Heberlein
private:
102 8 Krystian Heberlein
  overriden
103 8 Krystian Heberlein
  methods
104 7 Marcin Poplawski
105 8 Krystian Heberlein
protected:
106 8 Krystian Heberlein
  static const
107 8 Krystian Heberlein
  class members
108 1 Marcin Poplawski
109 7 Marcin Poplawski
private:
110 1 Marcin Poplawski
  static const
111 1 Marcin Poplawski
  class members
112 1 Marcin Poplawski
113 1 Marcin Poplawski
};
114 1 Marcin Poplawski
115 8 Krystian Heberlein
enum class A::EE {
116 8 Krystian Heberlein
  A, // camel case
117 8 Krystian Heberlein
};
118 9 Krystian Heberlein
</pre>
119 8 Krystian Heberlein
120 9 Krystian Heberlein
121 9 Krystian Heberlein
122 9 Krystian Heberlein
* (static) constexpr over static const
123 9 Krystian Heberlein
* std over boost
124 9 Krystian Heberlein
* unique over shared
125 9 Krystian Heberlein
* #pragma once over ifdef
126 9 Krystian Heberlein
* reference over pointers
127 9 Krystian Heberlein
* raw string literals over special signs
128 9 Krystian Heberlein
* streams over formatted string
129 9 Krystian Heberlein
* enum class over enum
130 9 Krystian Heberlein
* interface over wrappers and (ugh!) friends (yuck!)
131 9 Krystian Heberlein
* using over typedef
132 10 Krystian Heberlein
* use vdc-utils
133 9 Krystian Heberlein
134 9 Krystian Heberlein
135 9 Krystian Heberlein
136 9 Krystian Heberlein
* static const AAA; // all caps
137 9 Krystian Heberlein
* class MyClass // starts with a capital letter + camel case
138 9 Krystian Heberlein
* method, function void myFunction() // starts with a small letter + camel case
139 9 Krystian Heberlein
* function args void myFunction(string aParam) // starts wit small 'a' + camel case
140 9 Krystian Heberlein
* namespace block without indentation
141 9 Krystian Heberlein
* ifdef without indentation
142 9 Krystian Heberlein
* comment on closing bracket for namespace or #endif
143 9 Krystian Heberlein
* multiline comment block if comment is multiline
144 9 Krystian Heberlein
* interface class with 'I' prefix // IMyInterface
145 9 Krystian Heberlein
* class member with 'm' prefix // mMyClassMember
146 9 Krystian Heberlein
* pointer with 'Ptr' suffix // mMyClassMemberPtr / myPointerInMethodPtr / aMyPointerParamPtr