Skip to content

Commit

Permalink
1.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
tkutcher committed Apr 15, 2019
1 parent 0780847 commit bc385bf
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 7 deletions.
17 changes: 12 additions & 5 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ Go To:
**[Most Recent (1.1.0)](#110)**

- [1.0.0-alpha](#100-(alpha))
- [1.0.0](#100)
- [1.0.1](#101)
- [1.0.2](#102)
- [1.0.3](#103)
- [1.1.0](#110)
- [1.0](#100)
- [1.1](#110)

---

Expand Down Expand Up @@ -74,3 +71,13 @@ _2.1.2019_
- Changed fail message to not include the `Failure.toString()`
- If a test failed not using the message parameter, it added some useless output that was confusing to students
- Instead just print (no description provided)

#### 1.1.3
_2.4.2019_
- `CheckstyleGrader` adds the error type to it's output
- Method `getErrorTypes()` to get the `Map` of error types to their count.
- Method `getErrorTypeCount()` to get the number of error types encountered.

#### 1.1.4
_4.15.2019_
- `addCommandLineArg(String)` in `CLITester`
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>edu.jhu.cs</groupId>
<artifactId>jgrade</artifactId>
<packaging>jar</packaging>
<version>1.1.3</version> <!-- NOTE - If major/minor version changes, update finalName in build tag -->
<version>1.1.4</version> <!-- NOTE - If major/minor version changes, update finalName in build tag -->

<name>jgrade</name>
<url>https://github.com/tkutche1/jgrade</url>
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/com/github/tkutche1/jgrade/CLITester.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@ public List<String> getCommand() {
return this.command;
}

/**
* Add a command line argument to the command to be run.
* @param s The command line argument to be added
*/
public void addCommandLineArg(String s) {
this.command.add(s);
}

/**
* Get the {@link ProcessBuilder} that was initialized from
* {@link #initCommand()}.
Expand Down
17 changes: 16 additions & 1 deletion src/main/java/com/github/tkutche1/jgrade/CheckstyleGrader.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ public GradedTestResult runForGradedTestResult() {
String xmlOutput = CLITester.executeProcess(
new ProcessBuilder(command))
.getOutput(CLIResult.STREAM.STDOUT);
System.out.println(xmlOutput);
return xmlToGradedTestResult(xmlOutput);
} catch (InternalError | IOException e) {
e.printStackTrace();
Expand All @@ -112,6 +111,22 @@ public GradedTestResult runForGradedTestResult() {
}
}

/**
* Get the map of error types to their count.
* @return The map of error types to their count.
*/
public Map<String, Integer> getErrorTypes() {
return this.errorTypes;
}

/**
* Get the number of different error types encountered.
* @return The number of different error types encountered.
*/
public int getErrorTypeCount() {
return this.errorTypes.size();
}

// FIXME - Alternative to make this take some interface that calls the
// static boolean function.
/**
Expand Down

0 comments on commit bc385bf

Please sign in to comment.