Skip to content

Commit

Permalink
Add clover ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
ngallagher committed Aug 21, 2016
1 parent 1e9430a commit 422d767
Show file tree
Hide file tree
Showing 21 changed files with 110 additions and 19 deletions.
1 change: 1 addition & 0 deletions snap-common/.classpath
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="var" path="CLOVER_RUNTIME"/>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
Expand Down
1 change: 1 addition & 0 deletions snap-common/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target
/.settings
/.clover/
11 changes: 11 additions & 0 deletions snap-common/.project
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.atlassian.clover.eclipse.core.prejavabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.atlassian.clover.eclipse.core.postjavabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
Expand All @@ -19,5 +29,6 @@
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>com.atlassian.clover.eclipse.core.clovernature</nature>
</natures>
</projectDescription>
2 changes: 1 addition & 1 deletion snap-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<groupId>org.snapscript</groupId>
<artifactId>snap-common</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
<url>http://www.snapscript.org</url>
<dependencies>
<dependency>
Expand Down
1 change: 1 addition & 0 deletions snap-compile/.classpath
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="var" path="CLOVER_RUNTIME"/>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
Expand Down
1 change: 1 addition & 0 deletions snap-compile/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
/.settings
/xx..bin
/.clover/
11 changes: 11 additions & 0 deletions snap-compile/.project
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.atlassian.clover.eclipse.core.prejavabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.atlassian.clover.eclipse.core.postjavabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
Expand All @@ -19,5 +29,6 @@
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>com.atlassian.clover.eclipse.core.clovernature</nature>
</natures>
</projectDescription>
8 changes: 4 additions & 4 deletions snap-compile/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
<groupId>org.snapscript</groupId>
<artifactId>snap-compile</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
<url>http://www.snapscript.org</url>
<dependencies>
<dependency>
<groupId>org.snapscript</groupId>
<artifactId>snap-tree</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.snapscript</groupId>
<artifactId>snap-core</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.snapscript</groupId>
<artifactId>snap-parse</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.simpleframework</groupId>
Expand Down
1 change: 1 addition & 0 deletions snap-core/.classpath
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="var" path="CLOVER_RUNTIME"/>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
Expand Down
1 change: 1 addition & 0 deletions snap-core/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target
/.settings
/.clover/
11 changes: 11 additions & 0 deletions snap-core/.project
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.atlassian.clover.eclipse.core.prejavabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.atlassian.clover.eclipse.core.postjavabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
Expand All @@ -19,5 +29,6 @@
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>com.atlassian.clover.eclipse.core.clovernature</nature>
</natures>
</projectDescription>
4 changes: 2 additions & 2 deletions snap-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<groupId>org.snapscript</groupId>
<artifactId>snap-core</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
<url>http://www.snapscript.org</url>
<dependencies>
<dependency>
<groupId>org.snapscript</groupId>
<artifactId>snap-common</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
1 change: 1 addition & 0 deletions snap-parse/.classpath
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="var" path="CLOVER_RUNTIME"/>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
Expand Down
1 change: 1 addition & 0 deletions snap-parse/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target
/.settings
/.clover/
11 changes: 11 additions & 0 deletions snap-parse/.project
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.atlassian.clover.eclipse.core.prejavabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.atlassian.clover.eclipse.core.postjavabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
Expand All @@ -19,5 +29,6 @@
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>com.atlassian.clover.eclipse.core.clovernature</nature>
</natures>
</projectDescription>
4 changes: 2 additions & 2 deletions snap-parse/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<groupId>org.snapscript</groupId>
<artifactId>snap-parse</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
<url>http://www.snapscript.org</url>
<dependencies>
<dependency>
<groupId>org.snapscript</groupId>
<artifactId>snap-common</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
1 change: 1 addition & 0 deletions snap-tree/.classpath
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="var" path="CLOVER_RUNTIME"/>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
Expand Down
1 change: 1 addition & 0 deletions snap-tree/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
/.settings
/xx..bin
/.clover/
11 changes: 11 additions & 0 deletions snap-tree/.project
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.atlassian.clover.eclipse.core.prejavabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.atlassian.clover.eclipse.core.postjavabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
Expand All @@ -19,5 +29,6 @@
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>com.atlassian.clover.eclipse.core.clovernature</nature>
</natures>
</projectDescription>
32 changes: 29 additions & 3 deletions snap-tree/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
<groupId>org.snapscript</groupId>
<artifactId>snap-tree</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
<url>http://www.snapscript.org</url>
<dependencies>
<dependency>
<groupId>org.snapscript</groupId>
<artifactId>snap-core</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.snapscript</groupId>
<artifactId>snap-parse</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.simpleframework</groupId>
Expand All @@ -29,6 +29,32 @@
<scope>test</scope>
</dependency>
</dependencies>
<reporting>
<plugins>
<!-- Normally, we take off the dependency report, saves time. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.7</version>
<configuration>
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
</configuration>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.6</version>
<configuration>
<formats>
<format>html</format>
<format>xml</format>
</formats>
</configuration>
</plugin>

</plugins>
</reporting>
<build>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ public InstanceAllocator(Initializer initializer, Invocation invocation, Type ty
@Override
public Instance allocate(Scope scope, Instance base, Object... list) throws Exception {
Type real = (Type)list[0];
Instance object = builder.create(scope, base, real);// we need to pass the base type up!!
State state = object.getState();
Instance instance = builder.create(scope, base, real);// we need to pass the base type up!!
State state = instance.getState();
Value value = state.getValue(TYPE_THIS);

if(object != base) { // false if this(...) called
initializer.execute(object, real);
if(instance != base) { // false if this(...) is called
initializer.execute(instance, real);
}
value.setValue(object); // set the 'this' variable
invocation.invoke(object, object, list);
value.setValue(instance); // set the 'this' variable
invocation.invoke(instance, instance, list);

return object;
return instance;
}
}

0 comments on commit 422d767

Please sign in to comment.