-
Notifications
You must be signed in to change notification settings - Fork 8
Coding
zetok edited this page Mar 21, 2015
·
21 revisions
Guidelines for code and contributing it.
C++11
function()
{
1st_line;
2nd_line;
}
// if / while / for / switch
if ()
1_line;
else if ()
just_one_line;
else
each_condition;
// ↑ note space between last line of conditional code, and code outside of condition
if ()
{
1_line;
}
else if ()
{
what_if;
i_told_you;
}
else
{
that_there_are;
more_lines;
}
QObject* asterisksGoWithTheType;
uint8_t* array = new uint8_t[count];
QObject notToMentionThatWeUseCamelCase;
// “// camelCase for variables, CamelCase for classes”
E.g. https://github.com/tux3/qTox/blob/master/src/misc/flowlayout.cpp
-
descriptive commit messages are a must, usually the longer the better. Only very rarely commit message is too long (something like just
fix #123
is not acceptable, if you want it in your commit put it in lines below). E.g. https://github.com/tux3/qTox/commit/a8cd541cb516e6aafe01e82db28d03f0515878ed and https://github.com/tux3/qTox/commit/192f1f7d62b3a438cbdb108d03077cc3aa906562 (generally any recent commit by novist) - … (WIP)
vruh