[Biojava-dev] review/feedback: code style
Michael Heuer
heuermh at gmail.com
Tue Apr 16 18:23:08 UTC 2013
Hannes Brandstätter-Müller wrote:
> I just assumed -legacy was just being maintained and not actively developed,
> therefore the code style was not that important. But I'll add it now.
Right but since there may be further releases of biojava-legacy, as
not all functionality has been migrated to biojava3, we'll want to
keep metadata & build stuff in sync.
michael
> On Mon, Apr 15, 2013 at 5:24 PM, Michael Heuer <heuermh at gmail.com> wrote:
>>
>> Hello Hannes,
>>
>> If not too much trouble, might you be able to commit these to the
>> biojava-legacy repository as well? It would be nice if the build and
>> metadata portions of the two projects don't get too out of sync.
>>
>> Thanks,
>>
>> michael
>>
>>
>> On Sun, Apr 7, 2013 at 1:31 PM, Hannes Brandstätter-Müller
>> <biojava at hannes.oib.com> wrote:
>> > The formatter is a copy of the default settings with some minor
>> > modifications (e.g. spaces instead of tabs) that are very helpful in my
>> > experience.
>> >
>> > Line length has been set to 120, which turned out to be a nice number in
>> > the huge java project I work on in my day-job.
>> >
>> > Hannes
>> >
>> >
>> > On Sun, Apr 7, 2013 at 5:49 PM, Andreas Prlic <andreas at sdsc.edu> wrote:
>> >
>> >> Hi Hannes,
>> >>
>> >> I took a look at your templates and they work fine for me. In terms of
>> >> source code formatting, I'd say let's stick as close as possible to the
>> >> eclipse default templates and only add things like LGPL header, since
>> >> we
>> >> don't want to have too many style conflicts in case somebody does not
>> >> have
>> >> the templates installed.
>> >>
>> >> Did anybody try automated source-code formatting upon commit?
>> >>
>> >> On a related note, I added the checkstyle and findbug plugins to our
>> >> main
>> >> pom.xml.
>> >>
>> >> Andreas
>> >>
>> >>
>> >>
>> >> On Sat, Apr 6, 2013 at 3:06 AM, Hannes Brandstätter-Müller <
>> >> biojava at hannes.oib.com> wrote:
>> >>
>> >>> Thanks for the feedback.
>> >>>
>> >>> I originally chose tab indentation because that seemed to be the most
>> >>> widely used one. The arguments for space indentation are mentioned in
>> >>> the
>> >>> sun java styleguide (on which the checkstyle configuration is based).
>> >>> I changed it back to space indentation and submitted it as pull
>> >>> request,
>> >>> so
>> >>> please continue the discussion there :)
>> >>> https://github.com/biojava/biojava/pull/3
>> >>>
>> >>> I would also like to discuss a round of existing source file
>> >>> formatting.
>> >>>
>> >>> Hannes
>> >>>
>> >>>
>> >>> On Sat, Apr 6, 2013 at 4:41 AM, Michael Heuer <heuermh at gmail.com>
>> >>> wrote:
>> >>>
>> >>> > Hello Hannes,
>> >>> >
>> >>> > I'm not an IDE user but what you have there looks pretty reasonable.
>> >>> > If given a choice I would prefer
>> >>> >
>> >>> > spaces not tabs
>> >>> > 4 spaces per indent for java files
>> >>> > 2 spaces per indent for xml files e.g. pom.xml
>> >>> > 120 character line length
>> >>> > use final by default
>> >>> > make classes immutable by default
>> >>> >
>> >>> > I don't think adding those Eclipse formatting files and using them
>> >>> > going forward will be controversial; wanting to reformat all the
>> >>> > existing source code might be.
>> >>> >
>> >>> > michael
>> >>> >
>> >>> >
>> >>> > On Fri, Apr 5, 2013 at 4:57 PM, Spencer Bliven <sbliven at ucsd.edu>
>> >>> wrote:
>> >>> > > Hannes-
>> >>> > >
>> >>> > > If you submit a pull request now then we can comment directly on
>> >>> > > the
>> >>> code
>> >>> > > on github. Then all the discussion will be in one place, plus any
>> >>> future
>> >>> > > code you submit on that branch will get pulled into the
>> >>> > > discussion.
>> >>> Pull
>> >>> > > requests don't need to be resolved right away for potentially
>> >>> > controversial
>> >>> > > changes like this.
>> >>> > >
>> >>> > >
>> >>> > > On Fri, Apr 5, 2013 at 12:01 PM, Hannes Brandstätter-Müller <
>> >>> > > biojava at hannes.oib.com> wrote:
>> >>> > >
>> >>> > >> I put together some instructions and configurations that I think
>> >>> could
>> >>> > >> greatly benefit the project code style.
>> >>> > >>
>> >>> > >> Please check them out at
>> >>> > >>
>> >>> > >>
>> >>> >
>> >>>
>> >>> https://github.com/brandstaetter/biojava/commit/0b11b10a051cbcc1d667ed253da7fa9be11e9d59
>> >>> > >> and give me feedback please (ideally, download the configurations
>> >>> > >> and
>> >>> > try
>> >>> > >> them out)
>> >>> > >>
>> >>> > >> If there are no objections, I will submit a pull request or
>> >>> > >> directly
>> >>> > merge
>> >>> > >> it.
>> >>> > >>
>> >>> > >> Hannes
>> >>> > >>
>> >>> > >> p.s. what in my git config is misconfigured so that the name is
>> >>> > >> not
>> >>> > matched
>> >>> > >> to my github account? do I need to use my github account name in
>> >>> > >> my
>> >>> > config?
>> >>> > >> _______________________________________________
>> >>> > >> biojava-dev mailing list
>> >>> > >> biojava-dev at lists.open-bio.org
>> >>> > >> http://lists.open-bio.org/mailman/listinfo/biojava-dev
>> >>> > >>
>> >>> > >
>> >>> > > _______________________________________________
>> >>> > > biojava-dev mailing list
>> >>> > > biojava-dev at lists.open-bio.org
>> >>> > > http://lists.open-bio.org/mailman/listinfo/biojava-dev
>> >>> >
>> >>> > _______________________________________________
>> >>> > biojava-dev mailing list
>> >>> > biojava-dev at lists.open-bio.org
>> >>> > http://lists.open-bio.org/mailman/listinfo/biojava-dev
>> >>> >
>> >>>
>> >>> _______________________________________________
>> >>> biojava-dev mailing list
>> >>> biojava-dev at lists.open-bio.org
>> >>> http://lists.open-bio.org/mailman/listinfo/biojava-dev
>> >>>
>> >>
>> >>
>> >>
>> >>
>> >
>> > _______________________________________________
>> > 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