Bug 89140 - Code formatting parameter list alignment with leading commas fails
Summary: Code formatting parameter list alignment with leading commas fails
Status: RESOLVED NOT A BUG
Alias: None
Product: kdevelop
Classification: Applications
Component: Astyle (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 92342 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-09-09 10:30 UTC by Steven T. Hatton
Modified: 2007-11-30 20:27 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steven T. Hatton 2004-09-09 10:30:59 UTC
Version:           3.1.0 (using KDE 3.3.0, SuSE)
Compiler:          gcc version 3.3.3 (SuSE Linux)
OS:                Linux (i686) release 2.6.5-7.108-default

I have been rediscovering the convenience of using leading commas
in parameter lists, and member initialization lists.  When the indentation works correctly, I find it much easier to work with. Unfortunately, I've noticed a problem that arrises when default values are assigned to the formal parameters.  The indentation aligns at the location of the RHS token, not the previous comma. The snippet included here shows the problem.
LinearBoxView(Box_Interface* bif
                    , const size_t& offset_
                    , LinearView* holder_
                    , const size_t& block_w_ = 10
                                               , const size_t& block_h_ = 10
                                                                          ,  const size_t& edge_w_=1
                   );
Comment 1 Jens Dagerbo 2004-09-09 21:04:49 UTC
Are you talking about the automatic indentation (katepart) or "Edit -> Reformat Source" (KDevelop)?
Comment 2 Steven T. Hatton 2004-09-12 03:32:33 UTC
On Thursday 09 September 2004 15:04, Jens Dagerbo wrote:
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
> http://bugs.kde.org/show_bug.cgi?id=89140
>
>
>
>
> ------- Additional Comments From jens.dagerbo swipnet se  2004-09-09 21:04
> ------- Are you talking about the automatic indentation (katepart) or "Edit
> -> Reformat Source" (KDevelop)?

Settings->Configure Shortcut->Reformat Source 
Comment 3 Jens Dagerbo 2004-09-12 05:40:57 UTC
"Configure shortcut"? I don't get it.. but I assume you mean you are using the KDevelop reformatting tool (which is based on the astyle library, btw)

(Btw, please don't quote stuff in bug reports, it bloats the webpage )
Comment 4 Steven T. Hatton 2004-09-12 09:05:48 UTC
I meant that is how I set it up.  I didn't know what it actually invokes. I 
just know I mapped it to Tab and my code gets reformatted when I hit Tab.
Comment 5 Matt Rogers 2006-10-15 07:00:16 UTC
*** Bug 92342 has been marked as a duplicate of this bug. ***
Comment 6 Matt Rogers 2006-10-15 07:01:40 UTC
The use of the equals sign in the parameter list is confusing astyle.
Comment 7 Jens Dagerbo 2006-12-16 19:39:02 UTC
Yup. Still happening with 3.4-RC2.
Comment 8 Andreas Pakulat 2007-11-30 20:27:42 UTC
Closing as this is an obviously astyle problem, please file upstream (astyle.sourceforge.net).