-
-
Notifications
You must be signed in to change notification settings - Fork 26.6k
01. How to contribute
Ilkka Seppälä edited this page Aug 24, 2020
·
61 revisions
First check our issue tracker to find something interesting to do. Issues with label help wanted
are the ones where we need assistance. Of course you may have detected something we don't know yet, so feel free to raise your own issue. If you are a first time contributor, it's probably best to start with something easy - so look for issues with label good first issue
.
To work on a new pattern you need to do the following steps:
- If there is no issue for the new pattern yet, raise new issue. Comment on the issue that you are working on it so that others don't start work on the same thing. You are encouraged to present your implementation idea so others can participate in the design phase and help.
- Fork the repository.
- Create a new folder for the pattern. The rough structure of the new folder would be as follows:
-
etc
(every resource related to the pattern, like diagrams) -
src
(the source code of the pattern) -
README.md
(the description of the pattern) -
pom.xml
(the Maven project file)
-
- Implement the code changes in your fork. Remember to add sufficient comments documenting the implementation. Reference the issue id e.g. #52 in your commit messages.
- Format the code according to project Checkstyle configuration. The build fails if the code is not properly formatted. See coding conventions
- Add description of the pattern in pattern-
README.md
. All internal links must be relative to the pattern subdirectory, otherwise the links don't link properly on the website. All code samples need to be annotated with correct language for the syntax highlighting to work e.g. ```java xxx ``` - The parent pom.xml is configured with urm-maven-plugin which creates a class diagram for your pattern automatically in
etc
subfolder. To create a png out of this you can use locally installed PlantUML (see https://plantuml.com/running) or the online version http://plantuml.com/plantuml. - Create a pull request. We use the following checklist in reviewing new patterns https://github.com/iluwatar/java-design-patterns/wiki/08.-Reviewing-pull-requests
Structure of the pattern-README.md
file
--- # this is so called 'Yaml Front Matter', read up on it here: http://jekyllrb.com/docs/frontmatter/
layout: pattern # layout must always be pattern
title: Best Pattern Ever # the properly formatted title
folder: best-pattern-ever # the folder name in which this pattern lies
permalink: /patterns/best-pattern-ever/ # the permalink to the pattern, to keep this uniform please stick to /patterns/FOLDER/
description: # short meta description that shows in Google search results
# usable categories and tags are listed here: https://github.com/iluwatar/java-design-patterns/wiki/07.-Categories-and-Tags
categories:
- creational
tags:
- best
- ever
- awesome
---
## Name / classification
## Also known as
## Intent
## Explanation
## Class diagram
## Applicability
## Tutorials
## Known uses
## Consequences
## Related patterns
## Credits
How to add a new category or tag is described on page https://github.com/iluwatar/java-design-patterns/wiki/07.-Categories-and-Tags
To work on one of the non-pattern issues you need to do the following steps:
- Check that the issue has
help wanted
badge - Comment on the issue that you are working on it
- Fork the repository.
- Implement the code changes in your fork. Remember to add sufficient comments documenting the implementation. Reference the issue id e.g. #52 in your commit messages.
- Create a pull request.