source formatting: what is supposed to be automatic now?

David Nolden zwabel at googlemail.com
Mon Nov 28 10:18:43 UTC 2011


2011/11/28 Vladimir Prus <ghost at cs.msu.su>:
> On 27/11/11 23:00, Andreas Pakulat wrote:
>
>>> Right now it's simply impossible to work on a inhomogenously-formatted
>>> project
>>> with KDevelop, since the most essential formatting (see above) will be
>>> wrong.
>>>
>>> People will look for such indentation settings in the editor, which is
>>> what
>>> they are used to.
>>>
>>> I see how your approach is cool and will work well if all people use
>>> uncrustify and projects all come with such a formatting script. But right
>>> now,
>>> KDevelop simply looks broken for people that still use astyle.
>>>
>>> I think, the new behavior, i.e. changing the editor settings, should only
>>> be
>>> enabled, if the user uses uncrustify and a formatting script is found.
>>> Meaning: For AStyle users, KDevelop should work like before.
>>
>> As someone who works on a completely 'misformatted' codebase on a daily
>> base I very much agree with that. Breaking existing working behaviour
>> for a non-negligible userbase is a no-go, even if it improves things for
>> a different part of the userbase. But thats what master is for, identify
>> such things and improve on that.
>
> As a person who cannot switch to KDevelop for all C and C++ coding precisely
> due
> to insufficient formatting support, I'd also prefer a solution that does not
> require
> putting shell scripts into codebase. Like, I am sure I will be killed on the
> spot if
> I start adding kdevelop-specific .sh files to GDB.
>
> It would be shame if KDevelop implements a solution that is only good for
> working
> on KDevelop itself.

The very idea of the shell-script integration is that it's _not_
kdevelop specific, unlike all the ".kateconfig" etc. _any_ script
which formats the code the right way will do.

We just distribute a kdevelop-independent formatting-script called
"kdev_format_sources.sh" together with kdevelop, which allows mapping
files/directories to formatting-script calls. To use it, you need to
place at least one "format_sources" file in your project
top-directory. Nobody forces you to check it in. The script can also
be called from command-line or from any other IDE.




More information about the KDevelop-devel mailing list