[Biojava-dev] Biojava3-Core
Spencer Bliven
sbliven at ucsd.edu
Wed May 12 23:11:42 UTC 2010
Regarding diff tools, I think all the major tools ignore whitespace if you
set up the options right. In eclipse, this can be changed by right clicking.
For diff, use 'diff -b'. for svn, use 'svn diff -x -b'. Meld (linux) and
FileMerge (mac) also can easily switch back and forth. I assume the same is
true in netbeans, although I've never used it.
That said, a good diff tool won't prevent the annoyance of trying to read
code with inconsistent whitespace. Lets set a standard (I like 4 spaces too)
and all agree to stick to it. Setting up pre-commit hooks in SVN seems like
it's usually more trouble than its worth (
http://stackoverflow.com/questions/1017953?tab=votes#tab-top).
-Spencer
On Wed, May 12, 2010 at 4:56 AM, Andy Yates <ayates at ebi.ac.uk> wrote:
> I can say that the Eclipse diff tool does care about whitespace and I'm
> quite sure that the Unix diff cares about it as well. I can't say anything
> about Netbeans since I haven't used it in years.
>
> With all the best respect if the formatting rules say 4 spaces per
> indentation & code comes in not behaving in that manner then it'll be
> reformatted. This is nothing against the person who does the commits just
> they should be aware that it _could_ happen. I should say my personal
> preference is 2 spaces per indentation; I am flexible about this & will go
> with what the majority agree. That said if I'm being flexible about it I
> hope others will be as well.
>
> Andy
>
> On 12 May 2010, at 12:41, LAW Andrew wrote:
>
> > I think the main thing should be for each of us to find a diff tool that
> doesn't care about whitespace. The other stuff (camelCase, use of braces
> [ALWAYS!!!], splitting lines) are more important and can/should be defined
> but if you tell me that we must use 2 spaces to indent and my editor of
> choice uses a tab then I'm probably not going to listen to you in all
> practical situations.
> >
> > Not being awkward, just pragmatic.
> >
> >
> > On 12 May 2010, at 12:26, Andy Yates wrote:
> >
> >> So long as they are documented then developers shouldn't complain when
> their formatting changes. I just want to avoid a situation like now with
> Scooter's check-in which has a lot of formatting changes so the code changes
> are quite hard to pick out.
> >>
> >> I've gone and started a page about conventions and have started a
> discussion. Once we are agreed on what should go into the conventions then
> they will migrate to the wiki page.
> >>
> >> Andy
> >>
> >> On 12 May 2010, at 12:09, LAW Andrew wrote:
> >>
> >>>
> >>> On 12 May 2010, at 11:52, Richard Holland wrote:
> >>>
> >>>> I see a need for a formal coding style here, regardless of what
> platform people are using. Taking Netbeans as a basis is a good start but it
> needs to be documented for contributors to read and follow, then enforced
> across the whole project.
> >>>
> >>> Absolutely. But the pain in making <insert favourite tool name here>
> use those conventions can be numbing.
> >>>
> >>>
> >>>
> >>> Later,
> >>>
> >>> Andy
> >>> --------
> >>> Yada, yada, yada...
> >>>
> >>> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336
> >>> Disclaimer: This e-mail and any attachments are confidential and
> intended solely for the use of the recipient(s) to whom they are addressed.
> If you have received it in error, please destroy all copies and inform the
> sender.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> The University of Edinburgh is a charitable body, registered in
> >>> Scotland, with registration number SC005336.
> >>>
> >>
> >> --
> >> Andrew Yates Ensembl Genomes Engineer
> >> EMBL-EBI Tel: +44-(0)1223-492538
> >> Wellcome Trust Genome Campus Fax: +44-(0)1223-494468
> >> Cambridge CB10 1SD, UK http://www.ensemblgenomes.org/
> >>
> >>
> >>
> >>
> >
> > Later,
> >
> > Andy
> > --------
> > Yada, yada, yada...
> >
> > The University of Edinburgh is a charitable body, registered in Scotland,
> with registration number SC005336
> > Disclaimer: This e-mail and any attachments are confidential and intended
> solely for the use of the recipient(s) to whom they are addressed. If you
> have received it in error, please destroy all copies and inform the sender.
> >
> >
> >
> >
> >
> >
> > --
> > The University of Edinburgh is a charitable body, registered in
> > Scotland, with registration number SC005336.
> >
>
> --
> Andrew Yates Ensembl Genomes Engineer
> EMBL-EBI Tel: +44-(0)1223-492538
> Wellcome Trust Genome Campus Fax: +44-(0)1223-494468
> Cambridge CB10 1SD, UK http://www.ensemblgenomes.org/
>
>
>
>
>
> _______________________________________________
> biojava-dev mailing list
> biojava-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biojava-dev
>
More information about the biojava-dev
mailing list