This file contains 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
#!/bin/env python | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. |
This file contains 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
#!/bin/sh | |
# | |
# This hook will run the eclipse code formatter before any commit | |
# to make the source look as it's supposed to look like in the repo. | |
ECLIPSE_HOME=$HOME/eclipse | |
STYLE_FILE=$HOME/org.eclipse.jdt.core.prefs | |
echo "Running pre-commit hook: run-eclipse-formatter---------------------" | |
echo "Will run eclipse formatter, using: $STYLE_FILE" | |
echo "Listing folders to run formatter on… " |
This file contains 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
[ktoso@homunculus tesujegit]$ git commit -a -m test | |
Running pre-commit hook: eclipse-format--------------------------------- | |
Will run eclipse formatter, using: /home/ktoso/org.eclipse.jdt.core.prefs | |
Listing folders to run formatter on... | |
./project/src/test | |
./project/src/main | |
Launching eclipse code formatter... | |
Configuration Name: /home/ktoso/org.eclipse.jdt.core.prefs | |
Starting format job ... | |
Formatting: /home/ktoso/coding/xsolve/tesujegit/./project/src/test/Main.java |
This file contains 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
[ktoso@homunculus tesujegit]$ cat ~/.gitconfig | tail -n2 | |
[alias] | |
eclipse-formatter = !~/run-eclipse-formatter | |
[ktoso@homunculus tesujegit]$ git [tab][tab] | |
#... | |
bundle eclipse-formatter instaweb repack submodule | |
#... | |
[ktoso@homunculus tesujegit]$ git eclipse-formatter |
This file contains 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 example; | |
import pl.xsolve.example.*; | |
class MyClazz { | |
public static void doStuff(Stuff stuff) { | |
for (int i = 0; i < 15; i++) { | |
ekhem(); | |
} | |
return; |
This file contains 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
/* located in: project/src/main/Main.java */ | |
package example; | |
import pl.xsolve.example.*; | |
class MyClazz{ | |
public static void | |
doStuff(Stuff stuff) | |
{ | |
for(int i=0;i<15;i++) | |
{ | |
ekhem(); |
This file contains 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 pl.pragmatists; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.junit.runners.Parameterized; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collection; | |
import java.util.List; |
This file contains 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 pl.xlab.doc.banana; | |
import com.google.java.contract.Ensures; | |
import com.google.java.contract.Invariant; | |
import com.google.java.contract.Requires; | |
import com.google.java.contract.ThrowEnsures; | |
import pl.xlab.doc.banana.exceptions.NotEnoughBananasException; | |
import java.util.Collection; |
This file contains 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
// obecnie | |
@ThrowEnsures({ | |
"NotEnoughBananasException", "countBananas() == 0" | |
}) | |
// wolałbym tak, "normalniej": | |
@ThrowEnsures(thrown = { | |
@Thrown(exception = NotEnoughBananasException.class, when = "countBananas() == 0") | |
}) |
This file contains 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
ktoso@dynames breakMe $ mvn org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DartifactId=bisectfun -DgroupId=pl.project13 | |
#......................... | |
ktoso@dynames breakMe $ ls | |
bisectfun mavenbisect.sh | |
ktoso@dynames breakMe $ cd bisectfun/ | |
ktoso@dynames bisectfun $ mkdir src/test/resources/ | |
ktoso@dynames bisectfun $ git init . | |
Initialized empty Git repository in /tmp/breakMe/bisectfun/.git/ | |
ktoso@dynames bisectfun $ git commit ^C | |
ktoso@dynames bisectfun $ vim .gitignore |
OlderNewer