Skip to content

Commit

Permalink
Clarify contribution instructions re. license hdrs (#48067)
Browse files Browse the repository at this point in the history
Today our instructions in `CONTRIBUTING.md` regarding license headers are a
little unclear. This commit clarifies the exact headers that are required for
contributions.
  • Loading branch information
DaveCTurner committed Oct 18, 2019
1 parent c92b20e commit d00a345
Showing 1 changed file with 41 additions and 5 deletions.
46 changes: 41 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,47 @@ leading indentation

### License Headers

We require license headers on all Java files. You will notice that all the Java files in
the top-level `x-pack` directory contain a separate license from the rest of the repository. This
directory contains commercial code that is associated with a separate license. It can be helpful
to have the IDE automatically insert the appropriate license header depending which part of the project
contributions are made to.
We require license headers on all Java files. With the exception of the
top-level `x-pack` directory, all contributed code should have the following
license header unless instructed otherwise:

/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

The top-level `x-pack` directory contains code covered by the [Elastic
license](licenses/ELASTIC-LICENSE.txt). Community contributions to this code are
welcome, and should have the following license header unless instructed
otherwise:

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

It is important that the only code covered by the Elastic licence is contained
within the top-level `x-pack` directory. The build will fail its pre-commit
checks if contributed code does not have the appropriate license headers.

You may find it helpful to configure your IDE to automatically insert the
appropriate license header depending on the part of the project to which you are
contributing.

#### IntelliJ: Copyright & Scope Profiles

Expand Down

0 comments on commit d00a345

Please sign in to comment.