Re: Source reindenting - Mailing list pgadmin-hackers
From | Magnus Hagander |
---|---|
Subject | Re: Source reindenting |
Date | |
Msg-id | AANLkTi=beTWn8Dhv04-5TWrBwsQ55z-KkcuEQg2Cd3Lz@mail.gmail.com Whole thread Raw |
In response to | Re: Source reindenting (Dave Page <dpage@pgadmin.org>) |
Responses |
Re: Source reindenting
|
List | pgadmin-hackers |
On Thu, Dec 30, 2010 at 10:38, Dave Page <dpage@pgadmin.org> wrote: > On 12/30/10, Magnus Hagander <magnus@hagander.net> wrote: >> On Thu, Dec 30, 2010 at 00:45, Guillaume Lelarge <guillaume@lelarge.info> >> wrote: >>> Le 29/12/2010 18:44, Dave Page a écrit : >>>> On Wed, Dec 29, 2010 at 5:30 PM, Magnus Hagander <magnus@hagander.net> >>>> wrote: >>>>> I just did a testrun with astyle to reindent and restyle the code. I >>>>> created a rule in Makefile.am per: >>>>> >>>>> diff --git a/Makefile.am b/Makefile.am >>>>> index be6af45..8266f8d 100644 >>>>> --- a/Makefile.am >>>>> +++ b/Makefile.am >>>>> @@ -65,3 +65,13 @@ endif >>>>> # We need to ensure the help cache is world writeable >>>>> install-data-hook: >>>>> chmod 0666 $(help_cache) >>>>> + >>>>> +# Perform astyle cleanup per rules: >>>>> +# * -p - insert space around parenthesis >>>>> +# * -b - bracket style >>>>> +# * -S - indent switches >>>>> +# * -s4 - intent with spaces, 4 of them >>>> >>>> Didn't we say we were going to move to tabs? >>>> >>> >>> Yes. Magnus probably forgot that part when I talked with him on IM this >>> morning (well, yesterday morning now). >> >> Do you also prefer tabs in the end, and just bite the even bigger bullet >> now? >> >> >>>>> It's going to cause merge conflicts like hell. but it's going to do >>>>> that whenever we run it. So should we just go ahead and run it? >>>> >>>> Why not? :-) >>>> >>> >>> The only patches not yet commited that I know of are the GSoC projects. >>> I know it won't be an issue for the database designer. Could be one for >>> your project. >> >> Yeah, it should only have an effect on modifications to *existing* >> files. Obviously, you'll want to run a "make style" over the new files >> before they are committed, but it shouldn't cause conflicts. >> >> Which, btw, is my suggested policy - always run "make style" before >> you commit (or at least before you push - but don't do it as a >> separate commit, so amend it into an existing commit in case it's done >> later). It only takes a couple of seconds over the whole tree... Seems >> reasonable? >> > > Not unless you add a VC++ build step to do it too... Ah, wasn't aware you actually committed from Windows. Thought you worked kind of like I do for the pg backend work which is do all windows stuff on a separate branch and then fold it into my local git repository and clean it up on linux before committing anything (which is where I clean up things like linebreaks and indention). There's an astyle package for windows. It's officially maintained. While I don't think it would be too easy to create a VS build step for it, it would probably be easy to create a .BAT file you could run prior to commit, if that would be enough? (Do you do your actual git work from inside VS as well? Daring!) -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/
pgadmin-hackers by date: