geonetwork / core-geonetwork

GeoNetwork is a catalog application to manage spatially referenced resources. It provides powerful metadata editing and search functions as well as an interactive web map viewer. It is currently used in numerous Spatial Data Infrastructure initiatives across the world.
http://geonetwork-opensource.org/
GNU General Public License v2.0
424 stars 489 forks source link

Update CONTRIBUTING.md with direct instructions for contributors #3842

Open jodygarnett opened 5 years ago

jodygarnett commented 5 years ago

The CONTRIBUTING.md file quickly links to wiki How-to-contribute page. The wiki page digs into the mechanics of how to contribute but does not really touch on the "agreement" to contribute code to the project.

This is important as the CONTRIBUTING.md link is shown to developers as they make a pull request. It is not much but it is something :)

Describe the solution you'd like

I would ask to see the CONTRIBUTING.md file focus what the contributor needs to do to pass a PR review:

The header establishes that the author retains copyright and is agreeing to distribute the code as GPL v 2.0 or later. This is a powerful statement and allows GeoNetwork to accept the code into the project and then distribute in future builds.

Describe alternatives you've considered

Since GPL license is used there is no real business need to use OSGeo Contributor License Agreement. Only advantage of doing so would be the ability to share some code back to upstream projects like GeoTools (this can still be done but requires hunting down the contributor and asking).

Also consider using several examples:

This is probably two complicated, key thing is a name and GPL agreement. If the contributor uses the wrong name then that is on their head.

Additional context

/*
 * Copyright (C) 2001-2016 Food and Agriculture Organization of the
 * United Nations (FAO-UN), United Nations World Food Programme (WFP)
 * and United Nations Environment Programme (UNEP)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or (at
 * your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 *
 * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2,
 * Rome - Italy. email: geonetwork@osgeo.org
 */
jodygarnett commented 4 years ago

Update: I found the code formatting in software_development readme, reduced to:

  • Select Java > Code Style > Formatter
  • Click Import and import code_quality/formatter.xml

The references formatter.xml which only works if you are using Eclipse IDE!

jodygarnett commented 4 years ago

Notes on code formatting:

indent:

Line wrapping

Organize imports

Code templates

/**
    * @author ${user}
    *
    * ${tags}
    */
jodygarnett commented 2 years ago

Why is this still open?