diff mbox

doc: doxygen: add declaring variables

Message ID 1426618639-10009-1-git-send-email-mike.holmes@linaro.org
State Accepted
Commit eb57f2738d62858b12d23136ad65758c35c0fcae
Headers show

Commit Message

Mike Holmes March 17, 2015, 6:57 p.m. UTC
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 doc/api_guide_lines.dox | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

Bill Fischofer March 17, 2015, 8:01 p.m. UTC | #1
On Tue, Mar 17, 2015 at 1:57 PM, Mike Holmes <mike.holmes@linaro.org> wrote:

> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
>

Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>


> ---
>  doc/api_guide_lines.dox | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/doc/api_guide_lines.dox b/doc/api_guide_lines.dox
> index 4cfe088..2bc63a1 100644
> --- a/doc/api_guide_lines.dox
> +++ b/doc/api_guide_lines.dox
> @@ -149,6 +149,21 @@ When an interface is defined in a header file and is
> intended to to be reused in
>  - Be prefixed with an underscore "_".
>  - All the required definitions for the API are to use an underscore, this
> includes MACROS, typedefs, enums and function names.
>
> +@subsection variables Declaring variables
> +- Variables shall be declared at the begining of scope, for example :-
> +@code
> +    int start_of_global_scope;
> +
> +    main () {
> +      int start_of_function_scope;
> +      ...
> +      if (foo == bar) {
> +        int start_of_block_scope;
> +        ...
> +      }
> +    }
> +@endcode
> +
>  @section implementation Implementation Considerations
>  To support application portability and preserve implementation
> flexibility, ODP APIs MUST be designed with several guiding principles in
> mind.
>
> --
> 2.1.0
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
Mike Holmes March 27, 2015, 7:35 p.m. UTC | #2
On 17 March 2015 at 16:01, Bill Fischofer <bill.fischofer@linaro.org> wrote:

>
>
> On Tue, Mar 17, 2015 at 1:57 PM, Mike Holmes <mike.holmes@linaro.org>
> wrote:
>
>> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
>>
>
> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
>

ping - I think we need this in the guide there is still debate about where
variables can be declared.


>
>
>> ---
>>  doc/api_guide_lines.dox | 15 +++++++++++++++
>>  1 file changed, 15 insertions(+)
>>
>> diff --git a/doc/api_guide_lines.dox b/doc/api_guide_lines.dox
>> index 4cfe088..2bc63a1 100644
>> --- a/doc/api_guide_lines.dox
>> +++ b/doc/api_guide_lines.dox
>> @@ -149,6 +149,21 @@ When an interface is defined in a header file and is
>> intended to to be reused in
>>  - Be prefixed with an underscore "_".
>>  - All the required definitions for the API are to use an underscore,
>> this includes MACROS, typedefs, enums and function names.
>>
>> +@subsection variables Declaring variables
>> +- Variables shall be declared at the begining of scope, for example :-
>> +@code
>> +    int start_of_global_scope;
>> +
>> +    main () {
>> +      int start_of_function_scope;
>> +      ...
>> +      if (foo == bar) {
>> +        int start_of_block_scope;
>> +        ...
>> +      }
>> +    }
>> +@endcode
>> +
>>  @section implementation Implementation Considerations
>>  To support application portability and preserve implementation
>> flexibility, ODP APIs MUST be designed with several guiding principles in
>> mind.
>>
>> --
>> 2.1.0
>>
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> http://lists.linaro.org/mailman/listinfo/lng-odp
>>
>
>
Bill Fischofer March 27, 2015, 8:36 p.m. UTC | #3
I think the guidelines are sufficient.  Pedantry is not a goal in itself.
The purpose is to foster good readability and maintainability.  Is anyone
suggesting that the code in question is too obscure to understand or
maintain?

On Friday, March 27, 2015, Mike Holmes <mike.holmes@linaro.org> wrote:

>
> On 17 March 2015 at 16:01, Bill Fischofer <bill.fischofer@linaro.org
> <javascript:_e(%7B%7D,'cvml','bill.fischofer@linaro.org');>> wrote:
>
>>
>>
>> On Tue, Mar 17, 2015 at 1:57 PM, Mike Holmes <mike.holmes@linaro.org
>> <javascript:_e(%7B%7D,'cvml','mike.holmes@linaro.org');>> wrote:
>>
>>> Signed-off-by: Mike Holmes <mike.holmes@linaro.org
>>> <javascript:_e(%7B%7D,'cvml','mike.holmes@linaro.org');>>
>>>
>>
>> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org
>> <javascript:_e(%7B%7D,'cvml','bill.fischofer@linaro.org');>>
>>
>
> ping - I think we need this in the guide there is still debate about where
> variables can be declared.
>
>
>>
>>
>>> ---
>>>  doc/api_guide_lines.dox | 15 +++++++++++++++
>>>  1 file changed, 15 insertions(+)
>>>
>>> diff --git a/doc/api_guide_lines.dox b/doc/api_guide_lines.dox
>>> index 4cfe088..2bc63a1 100644
>>> --- a/doc/api_guide_lines.dox
>>> +++ b/doc/api_guide_lines.dox
>>> @@ -149,6 +149,21 @@ When an interface is defined in a header file and
>>> is intended to to be reused in
>>>  - Be prefixed with an underscore "_".
>>>  - All the required definitions for the API are to use an underscore,
>>> this includes MACROS, typedefs, enums and function names.
>>>
>>> +@subsection variables Declaring variables
>>> +- Variables shall be declared at the begining of scope, for example :-
>>> +@code
>>> +    int start_of_global_scope;
>>> +
>>> +    main () {
>>> +      int start_of_function_scope;
>>> +      ...
>>> +      if (foo == bar) {
>>> +        int start_of_block_scope;
>>> +        ...
>>> +      }
>>> +    }
>>> +@endcode
>>> +
>>>  @section implementation Implementation Considerations
>>>  To support application portability and preserve implementation
>>> flexibility, ODP APIs MUST be designed with several guiding principles in
>>> mind.
>>>
>>> --
>>> 2.1.0
>>>
>>>
>>> _______________________________________________
>>> lng-odp mailing list
>>> lng-odp@lists.linaro.org
>>> <javascript:_e(%7B%7D,'cvml','lng-odp@lists.linaro.org');>
>>> http://lists.linaro.org/mailman/listinfo/lng-odp
>>>
>>
>>
>
>
> --
> Mike Holmes
> Technical Manager - Linaro Networking Group
> Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
>
>
>
diff mbox

Patch

diff --git a/doc/api_guide_lines.dox b/doc/api_guide_lines.dox
index 4cfe088..2bc63a1 100644
--- a/doc/api_guide_lines.dox
+++ b/doc/api_guide_lines.dox
@@ -149,6 +149,21 @@  When an interface is defined in a header file and is intended to to be reused in
 - Be prefixed with an underscore "_".
 - All the required definitions for the API are to use an underscore, this includes MACROS, typedefs, enums and function names.
 
+@subsection variables Declaring variables
+- Variables shall be declared at the begining of scope, for example :-
+@code
+    int start_of_global_scope;
+
+    main () {
+      int start_of_function_scope;
+      ...
+      if (foo == bar) {
+        int start_of_block_scope;
+        ...
+      }
+    }
+@endcode
+
 @section implementation Implementation Considerations
 To support application portability and preserve implementation flexibility, ODP APIs MUST be designed with several guiding principles in mind.