[Kmymoney-devel] Using astyle to beautify the code

Ian Neal iann_bugzilla at blueyonder.co.uk
Tue Mar 16 00:46:44 CET 2010


  I've just been looking at the patch that gets generated after running 
the astyle script and noticed that astyle 1.23 doesn't seem to deal with 
"foreach" the same way it deals with "for".
"foreach" is being treated liked a function so "foreach (expression)" 
gets formatted as "foreach(expression)", is this what we'd expect/want?

Ian

Thomas Baumgart wrote:
> On Saturday 13 March 2010 23:54:04 Alvaro Soliverez wrote:
>> On Sat, Mar 13, 2010 at 7:45 PM, Cristian Oneţ<onet.cristian at gmail.com>
> wrote:
>>> În data de Sîmbătă 13 Martie 2010 22:52:01 Thomas Baumgart a scris:
>>>> Hi,
>>>>
>>>> Ian and I fixed a couple of issues regarding the astyle-kmymoney.sh
>>>> script which now works as expected.
>>>>
>>>> Running it against current SVN creates a 3100+ line patch (according to
>>>> Ian on IRC). This reminds me of a recent discussion lately on a
>>>> different mailing list which showed, that astyle produces different
>>>> output using different versions.
>>>>
>>>> So the question is, which version do we use for formatting before we
>>>> start switching back and forth due to different astyle versions. Once we
>>>> settle on a single version we can run it and checkin the changes into
>>>> the repository.
>>>>
>>>> Ian and I use 1.23
>>>>
>>>> Comments and thoughts are welcome.
>>> I have 1.22 but I guess it's pretty much the same. I checked out the new
>>> formatting that this version introduces and I think that it fixes stuff
>>> that previously didn't worked as expected. For example now the member
>>> initialisations have the correct number of spaces which is 2 instead of 4
>>> so I would say commit the patch if nobody has something big in their
>>> sandbox.
>> I have a patch coming. Can we hold on this for a week?
> OK. I take care of the big format patch. Before, I wait for Alvaro's
> permission.
>
>> BTW, I have astyle 1.23 too.
> Let's stick with 1.23 then for a while and as has been mentioned, discuss it
> if we need to.
>
>
>
> _______________________________________________
> KMyMoney-devel mailing list
> KMyMoney-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kmymoney-devel




More information about the KMyMoney-devel mailing list