From: Андрей Тищенко/AI Tools Lab /SRR/Staff Engineer/삼성전자 Date: Mon, 28 Jan 2019 14:51:38 +0000 (+0300) Subject: NNC comments code of conduct rules. (#2915) X-Git-Tag: nncc_backup~917 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2de6d83f534ef2b6f6452e196822fd3e5537decc;p=platform%2Fcore%2Fml%2Fnnfw.git NNC comments code of conduct rules. (#2915) The doc about PRs and source code comments rules was included. Signed-off-by: Andrew V. Tischenko a.tischenko@partner.samsung.com --- diff --git a/contrib/nnc/doc/COC_for_nnc_developer.rst b/contrib/nnc/doc/COC_for_nnc_developer.rst index 24aaaa7..e1f17f2 100644 --- a/contrib/nnc/doc/COC_for_nnc_developer.rst +++ b/contrib/nnc/doc/COC_for_nnc_developer.rst @@ -9,3 +9,12 @@ Pull requests Exception are PRs mostly consisting of non-code changes(e.g. docs, licenses) - If you make any changes not directly related to PR's main purpose (e.g. formatting, code style fixes), make a note in PR description + +The Pull Requests review comments rules +-------------------------------- + +- The comments should be clear and descriptive. +- Don't use any empty lines with single symbol, smile, etc. +- Try to put all your requirements in one review to avoid multi-step iterations of the review. +- All comments must be informative and clear for every developer. It's not allowed to use jokes or other + constructions with ambiguous meaning. diff --git a/contrib/nnc/doc/codestyle.rst b/contrib/nnc/doc/codestyle.rst index 426bba8..9672505 100644 --- a/contrib/nnc/doc/codestyle.rst +++ b/contrib/nnc/doc/codestyle.rst @@ -166,11 +166,31 @@ Control flow contructions: Comments: --------- +- All source files have to start with the following banner + +/* + * Copyright (c) 2019 Samsung Electronics Co., Ltd. All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + - Function, methods(except trivial getters and setters), classes, structures, enums, should be commented in described doxygen format. - All mentioned entities should have **@brief** field, exception is getters, they could define **@return** instead - Functions have to describe their arguments(**@param**), template arguments(**@tparam**), return value if non-void(**@return**), what kinds of exceptions could be thrown(**@throws**) +- It's appreciated to comment all complex algorithms, long code lines, local and global variables as well. - One line comments starts with /// - Multiline comments should start on a second line, all lines start from *****, text separated from ***** with whitespace and goes like this: +- Don't keep any commented out lines inside source code: simply remove them from sources. .. code-block:: c++