Wiki » History » Version 8

Version 7 (Marcin Poplawski, 07/25/2018 03:31 PM) → Version 8/15 (Krystian Heberlein, 07/26/2018 11:27 AM)

h1. vDC Wiki

h2. Definition of Done - vDC

h3. Feature and task

# MR added to comment
# No new defects in cppcheck and Coverity
# No new defects in Unit tests
# Unit test added (if possible)
# Developer test done (dev feed) - by other engineer that was implementing
# Spent hours are filled in

h3. Defect

# MR added to comment
# Comment added - cause and solution
# No new defects in Cppcheck and Coverity
# No new defects in Unit tests
# Unit test added (if possible)
# Developer test done (dev feed, different browsers) - by other engineer that was implementing
# Spent hours are filled in

h2. Definition of Done - vDC UI

h3. Feature and task

# MR added to comment
# No new defects in Linting
# No new defects in Unit tests
# Unit test added (if reasonable)
# Developer test done (dev feed) - by other engineer that was implementing
# Spent hours are filled in

h3. Defect

# MR added to comment
# Comment added - cause and solution
# No new defects in Linting
# No new defects in Unit tests
# Unit test added (if reasonable)
# Developer test done (dev feed, different browsers) - by other engineer that was implementing
# Spent hours are filled in

h2. Code review checklist

- block formatting as follows: initalizacja:
**************************************************************************
wszystko w definicji kalsy, chyba ze jest zalezne od kontruktora

if () ; // one line in the same line is allowed w jednej linii, jak sie nie misci to {} (tylko bez else)

if ((wa1) && (wa2)) {

} else if () {

}



for (i; i < 0; ++i) { // other loops in the same form inne to samo

}

switch () {
case 1: //brackets //{} if needed, one line is acceptable jedna linia jest ok
case 2:
default: //required // powinien byc, co w default w zaleznosci od kontekstu
}

void Myclass::func(aParam1, apAram2, auto... aParams)
{
//using aParams...
}

**************************************************************************

-
enum class declaration:
**************************************************************************
A_Staus;

- class member initializations in class declaration if possible
- no 'using namespace' in header
- two lines separation between method definitions in source file

/*
==========================================================================

Class name
A // separator to be used in header and source file struktura
==========================================================================
*/

class A // or struct
{

using inherited

public:
ctor

konstruktor
// one line definition is allowed in header
dtor
definicja krotkicj jest dopuszczalna
destruktor
// one line definition is allowed in header
definicja krotkicj jest dopuszczalna, zawsze virtual
overriden

enum class EE; // declaration, but definition out of class
methods
deklaracja, definicja poza ciałem
metody
// one line definition is allowed in header

definicja krotkicj jest dopuszczalna

protected:

overriden
methods


metody

private:

overriden
methods


metody

protected:

static const

class members



private:

static const

class members

};

enum class A::EE
{

A, // camel case
};

**************************************************************************
- (static)
static const AAA; // all caps

(staitc)
constexpr over static const

void func(aParam1, apAram2, auto... aParams)

- {
aParams...
}

nazwy klas:
start z wielkeiej, Camel case

funkcje:
start malej, Camel case

nazwy parametrow:
Camel case, pierwsza a np &#x27;aParam&#x27;

std over boost
- unique over shared

header : nie uzywamy using namespace, mozemy uzyc w cpp

odstepy miedzy funkcjami : dwie spacje

oddzielanie klas:

/*
* ==========================================================================

* nazwa klasy - przed, wszedzie
* ==========================================================================
*/

namespace - bez wciecia
ifdef bez wciecia, na maksa do lewej

#pragma once over ifdef
-


przy koncu namespace, ifdef komentarz z nazwa

reference over pointers
-


raw string literals over special signs
-


static constexpr auto STALY_STRING = &quot;aaa&quot;; // sprawdzic z raw stringiem

streams over formated string
- enum class over enum
- interface over wrappers and (ugh!) friends (yuck!)
- using over typedef
**************************************************************************
- static const AAA; // all caps
- class MyClass // starts with a capital letter + camel case
- method, function void myFunction() // starts with a small letter + camel case
- function args void myFunction(string aParam) // starts wit small 'a' + camel case
- namespace block without indentation
- ifdef without indentation
- comment on closing braket for namespace or #endif
- multiline comment block if comment is multiline
**************************************************************************


komentarzw: jak wiecej niz jedna linia to wielolinijkowe