incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fang Wang <fang.w...@citrix.com>
Subject RE: Commits with tabs & trailing white space
Date Fri, 22 Feb 2013 19:51:14 GMT
I checked my Eclipse, it seems ok not to add any new spaces in an empty new line.

You may set it in Eclipse, with the preferences-> Java-> code Style-> Formatter,

I am using the defaulted Eclipse built-in formatter. This seems working fine with the leading

Spaces.

-Fang
-----Original Message-----
From: Mice Xia [mailto:weiran.xia1@gmail.com] 
Sent: Friday, February 22, 2013 4:00 AM
To: cloudstack-dev@incubator.apache.org
Subject: Re: Commits with tabs & trailing white space

guys,

i know how to setup indent in eclipse, and this commit does not contain tabs. there are 'leading
spaces' and trailing spaces.

for leading spaces in empty line, is there any config in eclipse that we can avoid them when
start a new empty line? eclipse automatically align the indent with spaces for a new line.

mice

> On Fri, Feb 22, 2013 at 2:51 AM, Fang Wang <fang.wang@citrix.com> wrote:
>> Rohit,
>> Is the patch to auto-check the space/tab there now?  It will help to
auto correct the
>> Space/trailing spaces. I used to do it one by one manually before
checking in the code, and
>> It is more time consuming. Use the auto tool will save lots of time
>
> Yes, you can have git do that for you when you commit, apply patch or 
> checkout. See one solution I discussed in 
> http://markmail.org/message/huy7ps5gncpf6asz
> But it's just better to fix it in your editor. Alternatively you can 
> just run expand to expand tabs to spaces in a file recursively in a 
> folder.
>
> Regards.
>
>>
>> -Fang
>>
>> -----Original Message-----
>> From: rohityadav89@gmail.com [mailto:rohityadav89@gmail.com] On 
>> Behalf
Of Rohit Yadav
>> Sent: Thursday, February 21, 2013 12:37 AM
>> To: cloudstack-dev@incubator.apache.org
>> Subject: Re: Commits with tabs & trailing white space
>>
>> On Thu, Feb 21, 2013 at 11:11 AM, Mice Xia 
>> <mice_xia@tcloudcomputing.com>
wrote:
>>> Sateesh,
>>>
>>> I just run some scripts:
>>>
>>> find . -name *.java |wc -l
>>> 4220
>>>
>>> find . -name *.java | xargs egrep -c "^[[:space:]]+$"  | grep -v 0 | 
>>> wc -l
>>> 2117
>>
>> Mice you want to run a sed cmd to fix all the java files? Just say 
>> it,
I'll do it.
>> Without ranting again about it, let me point to an old solution I use
and suggest folks to follow:
>> http://markmail.org/message/huy7ps5gncpf6asz
>>
>> Regards.
>>
>>>
>>> So we have half java source files that have leading spaces in an 
>>> empty
line, not to mention trailing spaces and tabs.
>>>
>>> If we are going to enforce this rule as a convention, instead of
notifying each commit that breaks this convention, I would suggest we automate this correction.
>>>
>>> Regards
>>> Mice
>>>
>>> -----Original Message-----
>>> From: Devdeep Singh [mailto:devdeep.singh@citrix.com]
>>> Sent: Thursday, February 21, 2013 1:14 PM
>>> To: cloudstack-dev@incubator.apache.org
>>> Subject: RE: Commits with tabs & trailing white space
>>>
>>> As a contributor if a patch is submitted, applying that patch will 
>>> fail
if it has trailing whitespaces. Maybe we should honor the convention of not submitting code/patches
with trailing spaces too.
>>>
>>> Regards,
>>> Devdeep
>>>
>>>> -----Original Message-----
>>>> From: Mice Xia [mailto:mice_xia@tcloudcomputing.com]
>>>> Sent: Thursday, February 21, 2013 10:29 AM
>>>> To: cloudstack-dev@incubator.apache.org
>>>> Subject: RE: Commits with tabs & trailing white space
>>>>
>>>> Leading spaces can be found everywhere in the codes, I think that's 
>>>> caused by IDE when intentionally leave an empty line. To me it's 
>>>> not a big deal and reviewboard provides "Hide Extra Whitespace & 
>>>> Hide
Whitespace changes"
>>>> to filter these. Tab should be avoided, we use 4 spaces indent by 
>>>> code convention.
>>>>
>>>> -Mice
>>>>
>>>> -----Original Message-----
>>>> From: David Nalley [mailto:david@gnsa.us]
>>>> Sent: Thursday, February 21, 2013 12:44 PM
>>>> To: cloudstack-dev@incubator.apache.org
>>>> Subject: Re: Commits with tabs & trailing white space
>>>>
>>>> On Wed, Feb 20, 2013 at 11:37 PM, Sateesh Chodapuneedi 
>>>> <sateesh.chodapuneedi@citrix.com> wrote:
>>>> > Seeing commits containing tab spaces and trailing white spaces.
>>>> > Aren't we enforcing these checks?
>>>> >
>>>> > Regards,
>>>> > Sateesh
>>>> >
>>>>
>>>> We desperately need more folks looking at the commit mails and 
>>>> calling these issues out. (It looks like you are doing the first, 
>>>> how about sending the nudge when you see it) Replies to commit 
>>>> messages will by default hit cloudstack- dev.
>>>>
>>>> --David
>

--
Sent from Gmail Mobile

Mime
View raw message