Skip to content
Gioacchino edited this page Jan 3, 2016 · 15 revisions

Start by getting the RetroShare from our git repoistory git repoistory.

Then make sure to read the README.md file in the main RetroShare source directory.

In the README.md you can find information about building that is the next step to do.

Coding Style

Although initial coding of RetroShare did not followed any particular coding style, we would like to start using a strict coding style. It can happen to you that while you read the code you start hating who written it because she didn’t followed the code convention, in that case pleas avoid to drop an non-constructive rant in public or doing something worse and try to chill out before expressing your opinion remembering that RetroShare code has been written by volunteers and that they are nice people despite the fact you are suffering reading some part of the code.

Officially RetroShare is using the Allman indent style using tabulator as indent char \t not the white space which is used for alignment and as separator. Plese keep your lines under 80 columns unless it doesn’t cause the code to look ugly to facilitate code editing and diff also on small screens.

Bad Practices

Avoid copy pasting code around as this is a common source of bugs, instead abstract the code when possible.

Avoid not useful statements like ending a void method with return

 virtual ~p3PeerMgr() { return; }

The return there just make the code bloated use this semantically equivalent but more elegant form instead

 virtual ~p3PeerMgr() {}