Re: Preparing for Gtk+ version 4



Reposting without the attachment--too big. I can add it to the git tree if anyone would like to see it.  Peter

On 01/23/2017 11:34:03 AM Mon, Peter Bloomfield wrote:
On 01/20/2017 03:51:24 PM Fri, Albrecht Dreß wrote:
Hi Peter:
...
The discussion last year ended in the assessment that no good formatter application is available.  I 
meanwhile discovered uncrustify [3] and UniversalIndentGUI [4] which together offer (IMHO) everything needed.

I installed uncrustify--its config file is quite intimidating! Do you have a proposal for one? My first 
attempt to install UniversalIndentGUI didn't go well--I didn't see an RPM file, and I don't feel like 
installing qt to build from source...

Yes, its really "option hell" with uncrustify; basically unusable without the gui!  Luckily, Debian/Ubuntu have 
universalindentgui packages (is it possible to install an "alien" deb on your box?  See 
<https://packages.debian.org/jessie/universalindentgui>).  Anyway, I attach a config which I hope comes somewhat close to your 
ideas...

Wow, that config is a huge help!

I did try installing the .deb, using alien to convert it to a .rpm, but it looks like "dependency hell"--no 
automatic dependency resolution! Perhaps there's another GUI with a .rpm package...

With some tweaks to your config file, I got uncrustify doing a pretty good job. I believe the "add" options should mostly be "force", 
otherwise we could be left with some nonstandard formatting, like multiple spaces where one is required (e.g. between "if" and "("). And I 
set "align_var_def_star_style=2"; dangling stars, so that the variable names are aligned, similar to Gtk code. And a few other small tweaks.

We need to have a discussion about hard tabs! I know it's still a controversial topic; personally, I don't 
like them, especially when tab stops are expected to be set every 4 places. Indentation can look different in 
vim, gedit, pasting into e-mail, and so on; eliminating them makes the indenting unambiguous. But opinions 
vary!

Attached is my current config--just for discussion! It's an edited version of the default file from the 
uncrustify home page, so it has some description of each option.

Best,

Peter

Attachment: pgpM_oyY_fxJz.pgp
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]