You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by Sebastian Schelter <ss...@googlemail.com> on 2010/06/16 23:23:02 UTC

Blank lines with whitespaces

Another issue I ran into: in MAHOUT-411 my patch unintentionally
rearranged whitespaces and I found the reason for that: In some java
files (o.a.m.common.AbstractJob and
o.a.m.cf.taste.hadoop.item.RecommenderJob for example) there are a
couple of blank lines that start with 2 to 4 leading whitespaces, which
get removed by Eclipse as soon as you edit the file once.

I can't prevent that these whitespace rearrangements are included in any
patches I create, is it ok to have that? Otherwise someone would have to
tell me how to make Eclipse not remove them :)

-sebastian

Re: Blank lines with whitespaces

Posted by Sebastian Schelter <ss...@googlemail.com>.
Am 17.06.2010 10:13, schrieb Isabel Drost:
> On Wed Sean Owen <sr...@gmail.com> wrote:
>   
>> Oh I'm sure Eclipse can be taught to use 2-space indents. There are
>> some config files checked in under eclipse/. I don't know the exact
>> settings myself but others here may.
>>     
> If I understood Sebastian correctly, his problem is that Eclipse
> deletes trailing spaces in files he edits as soon as he saves the file.
>   
You did.
> According to what is checked-in under "eclipse" this behaviour seems
> intentional: As soon as a Mahout eclipse project is generated via Maven
> code formatting rules are added as well. These also contain an entry
> that tells eclipse to delete trailing spaces when saving files.
>
> If I did not mis-read the eclipse module those rules are stored under
> eclipse/MahoutCleanUp.xml
>
> Isabel
>   


Re: Blank lines with whitespaces

Posted by Isabel Drost <is...@apache.org>.
On Wed Sean Owen <sr...@gmail.com> wrote:
> Oh I'm sure Eclipse can be taught to use 2-space indents. There are
> some config files checked in under eclipse/. I don't know the exact
> settings myself but others here may.

If I understood Sebastian correctly, his problem is that Eclipse
deletes trailing spaces in files he edits as soon as he saves the file.

According to what is checked-in under "eclipse" this behaviour seems
intentional: As soon as a Mahout eclipse project is generated via Maven
code formatting rules are added as well. These also contain an entry
that tells eclipse to delete trailing spaces when saving files.

If I did not mis-read the eclipse module those rules are stored under
eclipse/MahoutCleanUp.xml

Isabel

Re: Blank lines with whitespaces

Posted by Sean Owen <sr...@gmail.com>.
True that, though I bet it's easy to not do this. My only beef is that
it makes reading the diffs pretty noisy, in text or IDE form. If 30
minutes doesn't figure it out, OK give up.

On Wed, Jun 16, 2010 at 10:29 PM, Ted Dunning <te...@gmail.com> wrote:
> It it is just blank lines being munched, I don't think it much matters
> (assuming that IDEA doesn't put the spaces back in).

Re: Blank lines with whitespaces

Posted by Ted Dunning <te...@gmail.com>.
It it is just blank lines being munched, I don't think it much matters
(assuming that IDEA doesn't put the spaces back in).

On Wed, Jun 16, 2010 at 2:25 PM, Sean Owen <sr...@gmail.com> wrote:

> Oh I'm sure Eclipse can be taught to use 2-space indents. There are
> some config files checked in under eclipse/. I don't know the exact
> settings myself but others here may.
>
> On Wed, Jun 16, 2010 at 10:23 PM, Sebastian Schelter
> <ss...@googlemail.com> wrote:
> > Another issue I ran into: in MAHOUT-411 my patch unintentionally
> > rearranged whitespaces and I found the reason for that: In some java
> > files (o.a.m.common.AbstractJob and
> > o.a.m.cf.taste.hadoop.item.RecommenderJob for example) there are a
> > couple of blank lines that start with 2 to 4 leading whitespaces, which
> > get removed by Eclipse as soon as you edit the file once.
> >
> > I can't prevent that these whitespace rearrangements are included in any
> > patches I create, is it ok to have that? Otherwise someone would have to
> > tell me how to make Eclipse not remove them :)
> >
> > -sebastian
> >
>

Re: Blank lines with whitespaces

Posted by Sean Owen <sr...@gmail.com>.
Oh I'm sure Eclipse can be taught to use 2-space indents. There are
some config files checked in under eclipse/. I don't know the exact
settings myself but others here may.

On Wed, Jun 16, 2010 at 10:23 PM, Sebastian Schelter
<ss...@googlemail.com> wrote:
> Another issue I ran into: in MAHOUT-411 my patch unintentionally
> rearranged whitespaces and I found the reason for that: In some java
> files (o.a.m.common.AbstractJob and
> o.a.m.cf.taste.hadoop.item.RecommenderJob for example) there are a
> couple of blank lines that start with 2 to 4 leading whitespaces, which
> get removed by Eclipse as soon as you edit the file once.
>
> I can't prevent that these whitespace rearrangements are included in any
> patches I create, is it ok to have that? Otherwise someone would have to
> tell me how to make Eclipse not remove them :)
>
> -sebastian
>