Please write good title when you create a pull request.
Do not use a title like update
.
If you are not confident about wiring good title, follow template below:
[${package}/${program_name}] short description
We also recommend you to attach a picture in a pull request.
jsk-ros-pkg repositories has a lot of packages in one repository. You must write easy-to-understand commit log.
Your commit log must be clear about
- Objective. Why needed.
- Which program?
If you are not confident about wiring good commit log, follow template below:
[${package}/${program_name}] short description
concrete description
Please follow other codes in the same package.
For reference, most of C++ code in jsk-ros-pkg follows style described below:
-
Use soft tab, do not use hard tab.
-
Keep 80-columns as much as possible.
-
Do not write
using namespace ...
in headers. -
if
if (test) { awesome_code } else if (test2) { awesome_code } else { awesome_code }
-
class
class Foo: public class Bar { public: ... protected: bool fooBarBar(); int foo_; int foo_bar_; private: ... };
Class name should be camel-case and starting with upper case. Member variables is snake-case and should have
_
suffix. Method should be camel-case and starting with lower case. -
include guard
#ifndef PACKAGE_NAME_HEADER_FILE_NAME_H_ #define PACKAGE_NAME_HEADER_FILE_NAME_H_ ... #endif
-
Function and method
int foo() { int bar_bar = 0; }
Local variables in a function should be snake-case.
-
Do not use pointer, use
boost::shared_ptr
-
Do not use c++1x for old environment. Use boost.