[GRASS-dev] [GRASS-SVN] r61282 - in grass/trunk: include/defs lib/raster3d lib/raster3d/test

On Sat, Jul 19, 2014 at 8:02 PM, <svn_grass@osgeo.org> wrote:

Unfortunately changed the editor that i use the indention and converted
all tabs into spaces at save time. Hence,
the commit contains 95% tab to space conversion noise.

I would actually agree with the change. I think that the GRASS indentation
style is a bug since mixed tabs and spaces are enforced as a rule (not just
allowed). However, it was decided that it won't be fixed and that current
practice should be preserved. [1]

Fortunately, there is a script which can enforce the unusual indent style
[2]. And also `svn diff --ignore-space-change` for cases like this commit.

Anyway, I'm glad you discovered and fixed the bug. It is now painful for me
to see that tests did not showed the bug. That's maybe why in an ideal
world, tests are written by different person than the code (and without
access/looking to the source code).

Vaclav

[1] http://trac.osgeo.org/grass/ticket/1663
[2] http://trac.osgeo.org/grass/browser/grass/trunk/tools/grass_indent.sh

Hi Vaclav,

2014-07-20 6:06 GMT+02:00 Vaclav Petras <wenzeslaus@gmail.com>:

On Sat, Jul 19, 2014 at 8:02 PM, <svn_grass@osgeo.org> wrote:

Unfortunately changed the editor that i use the indention and converted
all tabs into spaces at save time. Hence,
the commit contains 95% tab to space conversion noise.

I would actually agree with the change. I think that the GRASS indentation
style is a bug since mixed tabs and spaces are enforced as a rule (not just
allowed). However, it was decided that it won't be fixed and that current
practice should be preserved. [1]

Mixing tabs and spaces is really a mess. And i am part of the problem,
since i am using several different computer for development and
different editors, each with its own habits.

Fortunately, there is a script which can enforce the unusual indent style
[2]. And also `svn diff --ignore-space-change` for cases like this commit.

Thank you for this hint, i will try to use it.

Anyway, I'm glad you discovered and fixed the bug. It is now painful for me
to see that tests did not showed the bug. That's maybe why in an ideal
world, tests are written by different person than the code (and without
access/looking to the source code).

Yes, in an ideal world .... . Always expect bugs in the tests like you
would expect bugs in the actual code. :slight_smile:

Best regards
Soeren

Vaclav

[1] http://trac.osgeo.org/grass/ticket/1663
[2] http://trac.osgeo.org/grass/browser/grass/trunk/tools/grass_indent.sh

On Sun, Jul 20, 2014 at 9:56 AM, Sören Gebbert <soerengebbert@googlemail.com

wrote:

2014-07-20 6:06 GMT+02:00 Vaclav Petras <wenzeslaus@gmail.com>:
>
> On Sat, Jul 19, 2014 at 8:02 PM, <svn_grass@osgeo.org> wrote:
>>
>> Unfortunately changed the editor that i use the indention and converted
>> all tabs into spaces at save time. Hence,
>> the commit contains 95% tab to space conversion noise.
>
>
> I would actually agree with the change. I think that the GRASS
indentation
> style is a bug since mixed tabs and spaces are enforced as a rule (not
just
> allowed). However, it was decided that it won't be fixed and that current
> practice should be preserved. [1]

Mixing tabs and spaces is really a mess. And i am part of the problem,
since i am using several different computer for development and
different editors, each with its own habits.

> Fortunately, there is a script which can enforce the unusual indent style
> [2]. And also `svn diff --ignore-space-change` for cases like this
commit.

Thank you for this hint, i will try to use it.

See also improved:

http://trac.osgeo.org/grass/wiki/Submitting/C#Indentation

And just as a reminder for others, for Python code, use pep8 directly for
new code. For existing code use:

http://trac.osgeo.org/grass/wiki/Submitting/Python#Style

  pep8 --config=tools/pep8config.txt directory_to_check