hi Shaheedur,  definitely agree.  I would see the Google style guide
being our base guide, that we would supplement with other rules such
as how we do error handling.

On Fri, Apr 25, 2014 at 12:02 AM, Shaheedur Haque (shahhaqu)
<[email protected]> wrote:
>
> IMHO, more important that the style guide would be some consistent approach
> to error handling. FWIW, we try to use a block of statements like this in
> each shell script:
>
> ==========
> declare infomsg=%%${0##*/}-Info:
> declare errmsg=%%${0##*/}-Error:
> set -o pipefail
> set -o errtrace
> set -o nounset
> trap "echo $errmsg trap on error near line \$LINENO; exit 1" ERR
> ==========
>
> I'm sure others have their favourites too...
>
>
>
> ________________________________
> From: Dinesh Bandara [[email protected]]
> Sent: 21 April 2014 04:09
> To: [email protected]
> Subject: Re: shell style guide for stratos?
>
> +1. this will added standards to stratos shell scripts.
>
>
> On Sun, Apr 20, 2014 at 8:14 PM, Udara Liyanage <[email protected]> wrote:
>>
>>
>> +1 that style is good I think.
>>
>>
>> Touched, not typed. Erroneous words are a feature, not a typo.a
>>
>> On Apr 20, 2014 10:46 AM, "Afkham Azeez" <[email protected]> wrote:
>>>
>>> +1. This would be a great addition.
>>>
>>>
>>> On Sat, Apr 19, 2014 at 8:32 PM, chris snow <[email protected]> wrote:
>>>>
>>>> Hi Guys,
>>>>
>>>> What do you think to aligning with google's shell style guide [1] for
>>>> Stratos shell scripts?
>>>>
>>>> Is there a better style guide that you are aware of?
>>>>
>>>> Many thanks,
>>>>
>>>> Chris
>>>>
>>>> ---
>>>> [1] https://google-styleguide.googlecode.com/svn/trunk/shell.xml
>>>
>>>
>>>
>>>
>>> --
>>> Afkham Azeez
>>> Director of Architecture; WSO2, Inc.; http://wso2.com,
>>> Member; Apache Software Foundation; http://www.apache.org/
>>>
>>> email: [email protected] cell: +94 77 3320919
>>> blog: http://blog.afkham.org
>>> twitter: http://twitter.com/afkham_azeez
>>> linked-in: http://lk.linkedin.com/in/afkhamazeez
>>>
>>> Lean . Enterprise . Middleware
>>>
>
>
>
> --
> Dinesh Bandara
> Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>



-- 
Check out my professional profile and connect with me on LinkedIn.
http://lnkd.in/cw5k69

Reply via email to