Have something you'd like to contribute to the framework? We welcome pull requests but ask that you carefully read this document first to understand how best to submit them; what kind of changes are likely to be accepted; and what to expect from the OpenHub Framework team when evaluating your submission.
...
If you're unsure why something isn't working or wondering if there is a better way of doing it please check on Stack Overflow first and if necessary start a discussion. This is the official OpenHub Framework tag. In short the issue tracker should be used to report issues and make feature requests.
...
Add Apache license header to all new classes
/*
* Copyright 2002-2016 the original author or authors.
*
* Licensed 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.
*/
package ...;
Update Apache license header in modified files as necessary
Always check the date range in the license header. For example, if you've modified a file in 2015 whose header still reads:
/*
* Copyright 2002-2011 the original author or authors.
Then be sure to update it to 2016 accordingly:
/*
* Copyright 2002-2016 the original author or authors.
Use @since tags for newly-added public API types and methods
For example:
/**
* ...
*
* @author First Last
* @since 1.1
* @see ...
*/
Prepare Your Commit
Submit JUnit test cases for all behavior changes
Search the codebase to find related tests and add additional @Test
methods as appropriate. It is also acceptable to submit test cases on a per JIRA issue basis, for example:
package org.openhubframework.openhub.test;
/**
* Unit tests for OHF-123.
*
* @author FirstName LastName
*/
public class Ohf123Tests {
@Test
public void cornerOhf123() {
// ...
}
}
Squash commits
Use git rebase --interactive --autosquash
, git add --patch
, and other tools to "squash" multiple commits into a single atomic commit. In addition to the man pages for git, there are many resources online to help you understand how these tools work. The Rewriting History section of Pro Git provides a good overview.
...