Skip to content

Commit f58ee6d

Browse files
lemoncurryFridaTveit
authored andcommitted
Create stub template, change POLICIES.md/CONTRIBUTING.md (exercism#1723)
* Create stub template, change POLICIES.md/CONTRIBUTING.md * Update POLICIES.md Co-Authored-By: Logan Stucki <logan@loganstucki.me> * POLICIES.md: add link to StubTemplate.java * POLICIES.md update
1 parent ea5f676 commit f58ee6d

4 files changed

Lines changed: 19 additions & 7 deletions

File tree

CONTRIBUTING.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
## Overview
1717

18-
This guide covers contributing to the Java track. If you are new, this guide is for you.
18+
This guide covers contributing to the Java track. If you are new to the exercism Java track, this guide is for you.
1919

2020
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.
2121

@@ -25,11 +25,13 @@ For general guidelines about contributing to Exercism see the [Exercism contribu
2525

2626
Hi! Thanks for contributing to the Exercism Java track!
2727

28-
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.
28+
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.
29+
This helps us focus our review time on the more important aspects of your contributions.
2930

30-
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.
31+
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.
3132

32-
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.
33+
It's perfectly fine to have more than one pull request open at a time.
34+
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.
3335

3436
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.
3537

@@ -93,7 +95,7 @@ Each problem/submodule has three source sets:
9395

9496
* `src/test/java/` — a test suite defining the edges of the problem
9597
* `.meta/src/reference/java/` — a reference solution that passes all the tests
96-
* `src/main/java/` — starter source files, if required/desired *(this directory usually only has a `.keep` file in it)*.
98+
* `src/main/java/` — starter source file(s).
9799

98100
----
99101

POLICIES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ References: [[1](https://github.com/exercism/java/issues/177#issuecomment-261291
3636
> - 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.
3737
Stubs should include the following body:
3838
`throw new UnsupportedOperationException("Delete this statement and write your own implementation.");`
39-
> - 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.
39+
> - 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.
4040
41-
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)]
41+
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)]
4242

4343
### Avoid using final
4444

_template/src/main/java/.keep

Whitespace-only changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
3+
Since this exercise has a difficulty of > 4 it doesn't come
4+
with any starter implementation.
5+
This is so that you get to practice creating classes and methods
6+
which is an important part of programming in Java.
7+
8+
Please remove this comment when submitting your solution.
9+
10+
*/

0 commit comments

Comments
 (0)