diff mbox

CONTRIBUTING: add clarification on code style

Message ID 1426116428-10435-1-git-send-email-mike.holmes@linaro.org
State New
Headers show

Commit Message

Mike Holmes March 11, 2015, 11:27 p.m. UTC
Clarify the locations that variables may be declared

Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 CONTRIBUTING | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

Maxim Uvarov March 12, 2015, 8:45 a.m. UTC | #1
How about move that to ODP api guidelines?

Maxim.

On 03/12/15 02:27, Mike Holmes wrote:
> Clarify the locations that variables may be declared
>
> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
> ---
>   CONTRIBUTING | 15 +++++++++++++++
>   1 file changed, 15 insertions(+)
>
> diff --git a/CONTRIBUTING b/CONTRIBUTING
> index 75fb711..ca1ce3f 100644
> --- a/CONTRIBUTING
> +++ b/CONTRIBUTING
> @@ -16,6 +16,21 @@ ODP code shall be documented using the doxygen style described in the
>   "Documenting the code" section.
>   Check patch script/checkpatch.pl shall be used before submitting a patch.
>   
> +Supplemental notes:-
> +
> + - Variables shall be declared at the begining of scope, for example :-
> +
> +     int start_of_global_scope;
> +
> +     main () {
> +       int start_of_function_scope;
> +       ...
> +       if (foo == bar) {
> +         int start_of_block_scope;
> +         ...
> +       }
> +     }
> +
>   2. ODP patch expectations as an  open source project
>   ----------------------------------------------------
>   While specific to the Linux kernel development, the following reference could
diff mbox

Patch

diff --git a/CONTRIBUTING b/CONTRIBUTING
index 75fb711..ca1ce3f 100644
--- a/CONTRIBUTING
+++ b/CONTRIBUTING
@@ -16,6 +16,21 @@  ODP code shall be documented using the doxygen style described in the
 "Documenting the code" section.
 Check patch script/checkpatch.pl shall be used before submitting a patch.
 
+Supplemental notes:-
+
+ - Variables shall be declared at the begining of scope, for example :-
+
+     int start_of_global_scope;
+
+     main () {
+       int start_of_function_scope;
+       ...
+       if (foo == bar) {
+         int start_of_block_scope;
+         ...
+       }
+     }
+
 2. ODP patch expectations as an  open source project
 ----------------------------------------------------
 While specific to the Linux kernel development, the following reference could