- copy the file
commit-msgto.git/hooks/commit-msg - make sure your delete the sample file
.git/hooks/commit-msg.sample - Make commit msg executable.
chmod +x .git/hooks/commit-msg - Edit
commit-msgto better fit your development branch, commit regex and error message - Profit $$
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package gameoflife; | |
| public class Game { | |
| public interface Distribution { | |
| boolean cellExists(int x, int y); | |
| } | |
| final private Distribution distribution; | |
| public Game(Distribution initialDistribution) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Files with typical JGiven dependencies |
Taken from: http://codingdojo.org/cgi-bin/index.pl?KataPacMan
Pacman finds himself in a grid filled with monsters. Will he be able to eat all the dots on the board before the monsters eat him?
Incomplete list of things the game needs:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.scalatest.Matchers | |
| case class Point(x: Int, y: Int) | |
| sealed trait Direction | |
| case object N extends Direction | |
| case object S extends Direction |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| 81 cards all unique | |
| shuffle deck | |
| draw 12 cards | |
| maybe<set> findsSET(cqrds) | |
| 1 card : 4 features | |
| feature : values |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -o errexit | |
| solutionDir="$(exercism download --uuid $@)" | |
| echo "$solutionDir" | |
| cd "$solutionDir" | |
| find src/test -type f -print -exec sed -i "s%@Ignore%// @Ignore%g" '{}' \; | |
| gradle clean test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @SuppressWarnings({"null", "unchecked"}) | |
| public static <V, R> Collector<V, ?, List<R>> combine(List<Collector<V, ?, R>> collectors) { | |
| final Supplier<List<Object>> supplier = () -> collectors.stream().map(Collector::supplier) | |
| .map(Supplier::get).collect(Collectors.toList()); | |
| final BiConsumer<List<Object>, V> biConsumer = (List<Object> list, V e) -> IntStream.range(0, collectors.size())// | |
| .forEach(i -> ((BiConsumer<Object, V>) collectors.get(i).accumulator()).accept(list.get(i), e)); | |
| final BinaryOperator<List<Object>> binaryOperator = (List<Object> l1, List<Object> l2) -> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import static org.junit.Assert.fail; | |
| import java.util.HashSet; | |
| import java.util.Set; | |
| import java.util.stream.Collectors; | |
| import javax.persistence.EmbeddedId; | |
| import javax.persistence.IdClass; | |
| import org.reflections.Reflections; |
OlderNewer