[mapserver-dev] [motion] code formatting and astyle

thomas bonfort thomas.bonfort at gmail.com
Tue Jun 26 06:42:43 PDT 2012


Daniel,

On Tue, Jun 26, 2012 at 3:31 PM, Daniel Morissette
<dmorissette at mapgears.com> wrote:
> While I am all for a cleaner coding style, I am a bit worried of what an
> automated tool like this could do to the code or to pre-formatted comments
> in some cases. I am thinking for instance of code such as mapogr.cpp (and
> most files originally written by Frank or myself) which is currently mostly
> clean but using ansi brackets style and 4 space indent.
>
> Did someone make any test to see what the result would look like?
I have an "astyle" branch, for mapogr.cpp, you can have a look at
https://github.com/tbonfort/mapserver/blob/658a5cd39e6680dd5a752b9b741da52b276c5c57/mapogr.cpp

>
> Also, if we are to go ahead with this I'd like to ensure we have tabs as
> spaces. My reading of the astyle docs suggests that this is what we get by
> default. Can someone please confirm that this is the intent?
yes, tabs should have been converted to spaces. If however that is
effectively not the case, it is in my intent to convert those to.

--
thomas
>
> Thanks
>
> Daniel
>
>
>
>
> On 12-06-26 8:52 AM, thomas bonfort wrote:
>>
>> Reviving this thread on unified code style:
>> * Would there be any opposition if we converted and then enforced a
>> uniform coding style throughout our codebase?
>> * I don't have a specific preference as to which code style we end up
>> choosing. I propose we follow SteveL's preference of 2 space K&R.
>>
>> Given that for coming future maintenance it is easier for us to do
>> this before we branch into 6-2, and that this thread has been around
>> for commenting for a long time now, we should get the ball rolling
>> very soon or postpone until our next major release.
>>
>> I hereby motion that we convert and enforce K&R code style with 2
>> space indenting for mapserver, and start with my +1.
>>
>> best regards,
>> thomas
>>
>>
>> On Wed, Mar 11, 2009 at 12:46 PM, Kralidis,Tom [Ontario]
>> <Tom.Kralidis at ec.gc.ca> wrote:
>>>
>>>
>>> devs: inspired by pramsey's post on geos-devel [1], I wonder what dev's
>>> think about running the MapServer codebase through an agreed upon
>>> convention via astyle [2], and sticking to it for future development.
>>>
>>> Thoughts?
>>>
>>> ..Tom
>>>
>>> [1] http://lists.osgeo.org/pipermail/geos-devel/2009-March/003959.html
>>> [2] http://astyle.sourceforge.net/
>>> _______________________________________________
>>> mapserver-dev mailing list
>>> mapserver-dev at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>>
>> _______________________________________________
>> mapserver-dev mailing list
>> mapserver-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>>
>
>
> --
> Daniel Morissette
> http://www.mapgears.com/
> Provider of Professional MapServer Support since 2000
>
>
>
>
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev


More information about the mapserver-dev mailing list