diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b0138dfa6..6e9ea70dd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,7 +15,7 @@ ## Overview -This guide covers contributing to the Java track. If you are new, this guide is for you. +This guide covers contributing to the Java track. If you are new to the exercism Java track, this guide is for you. If, at any point, you're having any trouble, pop in the [Gitter exercism/java room](https://gitter.im/exercism/java) or the [Gitter exercism/dev room](https://gitter.im/exercism/dev) for help. @@ -25,11 +25,13 @@ For general guidelines about contributing to Exercism see the [Exercism contribu Hi! Thanks for contributing to the Exercism Java track! -Before opening your pull request, please review the [track policies](https://github.com/exercism/java/blob/master/POLICIES.md) and make sure your changes comply with them all. This helps us focus our review time on the more important aspects of your changes. +Before opening your pull request, please review the [track policies](https://github.com/exercism/java/blob/master/POLICIES.md) and make sure your changes comply with them all. +This helps us focus our review time on the more important aspects of your contributions. -Also please only address one issue per pull request. This makes it easier for us to review it, and it means that if we request changes to the fix for one issue, it won't prevent to a fix for another issue being merged. +Also please only address one issue per pull request and reference the issue in your pull request. This makes it easier for us to review it, and it means that if we request changes to the fix for one issue, it won't prevent to a fix for another issue being merged. -It's perfectly fine to have more than one pull request open at a time. In that case it's important to keep the work for each pull request on a separate [branch](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell) to prevent unrelated commits being added to your pull request. This is good practice to do always, even if you only have one pull request open. +It's perfectly fine to have more than one pull request open at a time. +In that case it's important to keep the work for each pull request on a separate [branch](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell) to prevent unrelated commits being added to your pull request. This is good practice to do always, even if you only have one pull request open. One last thing to note before you get started. When you fork the repository and you want to [sync your fork](https://help.github.com/articles/syncing-a-fork/), you can perform a [`git rebase`](https://git-scm.com/docs/git-rebase). This is preferred over merging the changes because merging leads to a dirty commit history whereas performing a rebase adds in those changes without making extra commit messages. However, this is only preferred, so don't worry about it too much. @@ -93,7 +95,7 @@ Each problem/submodule has three source sets: * `src/test/java/` — a test suite defining the edges of the problem * `.meta/src/reference/java/` — a reference solution that passes all the tests -* `src/main/java/` — starter source files, if required/desired *(this directory usually only has a `.keep` file in it)*. +* `src/main/java/` — starter source file(s). ---- diff --git a/POLICIES.md b/POLICIES.md index 054538a5e..8b65c6ae4 100644 --- a/POLICIES.md +++ b/POLICIES.md @@ -36,9 +36,9 @@ References: [[1](https://github.com/exercism/java/issues/177#issuecomment-261291 > - Exercises of difficulty 4 or lower: provide stubs for all required constructors and methods. This means that you need to provide stubs for those constructors or methods that are necessary to pass all tests. E.g. stubs for private methods may be skipped. Stubs should include the following body: `throw new UnsupportedOperationException("Delete this statement and write your own implementation.");` -> - Exercises of difficulty 5 or higher: provide no stubs by default, but either (1) add hints to the hints.md file (which gets merged into the README.md for the exercise) or (2) provide stubs as above for exercises that demand complicated method signatures. +> - Exercises of difficulty 5 or higher: copy the StubTemplate.java file (provided [here](https://github.com/exercism/java/tree/master/_template/src/main/java)) and rename it to fit the exercise. For example, for the exercise linked-list the file could be named LinkedList.java. Then either (1) add hints to the hints.md file (which gets merged into the README.md for the exercise) or (2) provide stubs as above for exercises that demand complicated method signatures. -References: [[1](https://github.com/exercism/java/issues/178)], [[2](https://github.com/exercism/java/pull/683#discussion_r125506930)], [[3](https://github.com/exercism/java/issues/977)] +References: [[1](https://github.com/exercism/java/issues/178)], [[2](https://github.com/exercism/java/pull/683#discussion_r125506930)], [[3](https://github.com/exercism/java/issues/977)], [[4](https://github.com/exercism/java/issues/1721)] ### Avoid using final diff --git a/_template/src/main/java/.keep b/_template/src/main/java/.keep deleted file mode 100644 index e69de29bb..000000000 diff --git a/_template/src/main/java/StubTemplate.java b/_template/src/main/java/StubTemplate.java new file mode 100644 index 000000000..6178f1beb --- /dev/null +++ b/_template/src/main/java/StubTemplate.java @@ -0,0 +1,10 @@ +/* + +Since this exercise has a difficulty of > 4 it doesn't come +with any starter implementation. +This is so that you get to practice creating classes and methods +which is an important part of programming in Java. + +Please remove this comment when submitting your solution. + +*/