Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Your PR may take time to be reviewed by a committer, in special during release phases, so be patient.

Bootstrapping (

...

needs to be done only once)

You will not have write permission to github apache mirror, you need to
fork https://github.com/apache/incubator-netbeans to your own repositories.

You need to clone the forked repository and setup name and mail. This also may help git rebase to fullfil its task.

git config --global user.name "John Doe"
git config --global user.email "john@doe.org"

--global  globalcan be removed if you want to setup only the current repository.

 

Also add the Apache NetBeans incubator project as your upstream in order to submit PRs

...

Creating and pointing at  a new branch from master requires 3 steps

  1. git checkout master
  2. git branch mywork
  3. git checkout mywork

You can then code, commit and push to your forked repository. You can then use the github UI to create a Pull request from your branch.

...

  1. All commits must include the authors full name and email address.
  2. All new files must include the Apache Software Foundation license header. See any NetBeans source code in case of doubt.
  3. All commits must contain a meaningful commit message.
    1. A meaningful commit message holds in the first line a summary of the commit and in the body (beginning on the third-line) an explanation what was changed and why it was done.
    2. Remember that the future this commit message is most probably the only source of information why a change was committed to the code base.
    3. If the commit fixes a reported issue, the summary line should hold the issue number and title "[NETBEANS-XXX] Maven pom.xml file corrupted after inserting dependecies" for example.
  4. A Pull Request can consist of multiple commits. These commits should group the changes into meaningful entities. Fixup commits should be squashed into the base commit they fix.
  5. For contributors: Be prepared to be asked questions about your PR.
    1. A reviewer might have questions and you should be able to answer why you did a fix in a certain way and why it is safe and appropriate.
    2. Remember that the review sometimes takes as long, as creating a patch in the first place.
    3. Good commit messages help as they anticipate questions.
  6. For reviewers: Keep in mind that the contributor wants to fix a problem and put effort into it. So be polite and focused.
  7. Don't change code , that is correct and works.
    1. Consider a simple loop. In many cases you can switch between for-loop, for-each-loop and stream construct. All are valid solution, don't change the code if it is not broken.
    2. An improvement is a different case. For example a try-with-resource construct is in general more correct, than the try-finally construct many developers fail to implement correctly.
    3. Constructs leading to warnings from the javac are also good candidates for simple fixes.
  8. Run unit tests and, if you introduce new feature/fixes, add unit tests. So before you start your work, check that unit tests for the module you are working on run correctly and after you are done still do.
    1. If unit tests fail, fixing these would be good addition to the code base (it would be good to use a separate commit for this)
  9. Keep your pull requests up-to-date. When the PR can't be merged directly /it can happen that changes are introduced into the code base, that conflict with your PR,) you should then update it accordingly.
  10. Follow the coding conventions of the file. Your code should match that style and not stand out. For new files, please follow the code conventions for the N etBeans NetBeans code base: https://netbeans.org/community/guidelines/code-conventions.html
  11. Try to keep the code readable, maintainable, easy to debug and performant.

...