Contributing to iText 7 Community
We'd love for you to contribute to our source code and to make iText 7 Community even better than it is today! Here are the guidelines we'd like you to follow:
- Question or Problem?
- Issues and Bugs
- New Features
- Submission Guidelines
- Coding Rules
- Commit Message Guidelines
- Signing the iCLA
- Contributor Code of Conduct
If you have questions about how to use iText 7 Community, please direct these to Stack Overflow.
If you are a customer with a support agreement, you also have direct access to our JIRA and our developers.
If you find a bug in the source code or a mistake in the documentation, you can help us by submitting a Pull Request with a fix.
Please see the Submission Guidelines below.
If you would like to implement a new feature then consider what kind of change it is:
- Major Changes that you wish to contribute to the project should be discussed first so that we can better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project. Contact us at firstname.lastname@example.org.
- Small Changes can be crafted and submitted to the GitHub Repository as a Pull Request.
Submitting a Question or an Issue
Before you submit your question or issue, search Stack Overflow, maybe your question was already answered.
If your issue appears to be a bug, and hasn't been reported, ask a question on Stack Overflow to verify that is indeed a bug and not a mistake in your own code. Help us to maximize the effort we can spend fixing issues and adding new features, by not reporting duplicate issues. Providing the following information will increase the chances of your issue being dealt with quickly:
- How to ask good questions
- Overview of the Issue - if an error is being thrown a non-minified stack trace helps
- Motivation for or Use Case - explain why this is a bug for you
- iText Version(s) - is it a regression?
- Operating System - is this a problem on Windows or Linux, maybe on Mac?
- Reproduce the Error - provide a Short, Self Contained, Correct (Compilable), Example, also known as a Minimal, Complete, and Verifiable example.
- Related Issues - has a similar issue been reported before?
- Suggest a Fix - if you can't fix the bug yourself, perhaps you can point to what might be causing the problem (line of code or commit)
- Tag the question - add the tag
itext7to your question so we can find it.
If you get help, help others. Good karma rulez!
Submitting a Pull Request
Before you submit your pull request consider the following guidelines:
- Search GitHub for an open or closed Pull Request that relates to your submission. You don't want to duplicate effort.
- Verify that your proposed change hasn't already been addressed in the develop branch.
- Don't send a separate pull request for every single file you change.
- Please sign the iText Contributor License Agreement (iCLA) before sending pull requests for any change of more than 20 significant lines of code (we're not counting curly braces and other syntactical sugar). We cannot accept code without this agreement.
- Fork the iText repository on GitHub.
- Clone your iText fork to your local machine.
- Make your changes, including appropriate test cases.
- Follow our Coding Rules.
- Commit your changes using a descriptive commit message that follows our commit message conventions.
- Now would be a good time to fix up your commits (if you want or need to) with
git rebase --interactive.
- Build your changes locally to ensure all the tests pass.
- Push your changes to your GitHub account.
- Create a pull request in GitHub.
"Head fork" should be your repository, and the "base fork" should be the iText7 official repository.
- If we suggest changes then:
- Make the required updates.
- Fix up your commits if needed, with an interactive rebase.
- Re-run the tests and make sure that they are still passing.
- Force push to your GitHub repository. This will update your Pull Request.
That's it! Thank you for your contribution!
After your pull request is merged
After your pull request is merged, you can safely delete your fork and pull the changes from the main (upstream) repository.
To ensure consistency throughout the source code, keep these rules in mind as you are working:
- We develop in Java first, and then port to .NET, so code submissions in Java are preferred. Nevertheless this shouldn't stop you from making a good pull request to the .NET port.
- All Java code must be Java 7. Sorry, no lambda expressions or other Java 8 language features.
- All features or bug fixes must be tested by one or more unit tests.
- All public API methods must be documented with JavaDoc. To see how we document our APIs, please check out the existing javadocs.
- We follow the rules contained in Oracle's Code Conventions for the Java Programming Language, with these additions:
- Wrap all code at 100 characters.
We have guidelines on how our git commit messages should be formatted. This leads to more readable messages that are easy to follow when looking through the project history. But also, we use the git commit messages to generate the iText 7 Community change log.
These guidelines were taken from Chris Beams' blog post How to Write a Git Commit Message.
Commit Message Format
Each commit message consists of a subject, a body and a footer:
<subject> <BLANK LINE> <body> <BLANK LINE> <footer>
Any line of the commit message should not be longer 72 characters! This allows the message to be easier to read on GitHub as well as in various git tools.
The subject contains succinct description of the change:
- Separate subject from body with a blank line
- Limit the subject line to 50 characters
- Capitalize the subject line
- Do not end the subject line with a period
- Use the imperative mood in the subject line
The footer contains any information about Breaking Changes and is also the place to reference JIRA or GitHub issues that this commit Closes.
Please sign the iText Contributor License Agreement (iCLA) before sending pull requests. For any larger code changes (more than 20 lines of significant code) to be accepted, the iCLA must be signed. It's a quick process, we promise!
We'll need you to (digitally) sign and then email, fax or mail the form.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
- StackExchange: https://stackexchange.com/legal
- Github: https://help.github.com/articles/github-terms-of-service/
Contribute to the open source community
We would love for you to contribute to our source code, to help make iText 7 Community even better than it is today!