Skip to content

Latest commit

 

History

History
71 lines (41 loc) · 4.36 KB

CONTRIBUTING.md

File metadata and controls

71 lines (41 loc) · 4.36 KB

Contributing to PowerMock

First of all, thank you for considering contributing to PowerMock. Please, read the guideline before start. Following these guidelines helps to communicate that you respect the time of the developers managing and developing PowerMock.

Content

If looking for support

Search / Ask question on stackoverflow Go to the PowerMock mailing-list (moderated) Issues should always have a Short, Self Contained, Correct (Compilable), Example (same as any question on stackoverflow.com)

Pull request criteria

  • At least one commit message in the PR starts with Fixes #id : where id is an issue tracker id. This allows track release notes. Also GitHub will track the issue and close it when the PR is merged.

  • Use @since tags for new public APIs

  • Include tests

  • Document public APIs with examples

  • PowerMock provides two APIs: EasyMock and Mockito. If you add a new feature, please follow the same API style as the mocking framework which API you extend.

  • For new features consider adding new documentation item in PowerMock/PowerMockito class.

  • Also, look at the GitHub's Pull Request guide

General info

  • Comment on issues or pull requests

  • If you know the answer to a question posted to our mailing list - don't hesitate to write a reply. That helps us a lot.

  • Also, don't hesitate to ask questions on the mailing list - that helps us improve javadocs/FAQ.

  • Please suggest changes to javadoc/exception messages when you find something unclear.

  • If you miss a particular feature in PowerMock - browse or ask on the mailing list, show us a sample code and describe the problem.

  • Wondering what to work on? See task/bug labeled with "for new contributors". Remember that some feature requests we somewhat not agree with so not everything we want to work on.

  • PowerMock currently uses GitHub for deployment, so you can create a fork of PowerMock. Go to the github project and "Create your own fork". Create a new branch, commit, ..., when you're ready raise a your pull request.

  • Note the project now uses gradle, when your Gradle install is ready, make your IDE project's files (for example gradle idea). Other gradle commands are listed via gradle tasks.

More on pull requests

  • On pull requests, please document the change, what it brings, what is the benefit.

  • Clean commit history in the topic branch in your fork of the repository, even during review. That means that commits are rebased and squashed if necessary, so that each commit clearly changes one things and there are no extraneous fix-ups.

    For that matter it's possible to commit semantic changes. Tests are an asset, so is history.

    Exemple gratia:

Fixes #777 : The new feature
Fixes #777 : Refactors this part of PowerMock to make feature possible
  • In the code, always test your feature / change, in unit tests and in our acceptance test suite located in tests module. Older tests will be migrated when a test is modified.

  • New test methods should follow a snake case convention (ensure_that_stuff_is_doing_that), this allows the test name to be fully expressive on intent while still readable.

  • Documentation !!! Always document the public API with love. Internals could use some love too but it's argubly not as important. In all cases the code should auto-document itself like any [well designed API](rebased and squashed if necessary, so that each commit clearly changes one things and there are no extraneous fix-ups).

  • We use (4) spaces instead of tabs. Make sure line ending is Unix style (LF). More on line ending on the Github help.