Skip to content

Commit

Permalink
Add option to test using local CF build (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohan-shettyy authored Apr 5, 2024
1 parent bcc3f2d commit 0513ffc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ dependencies {
testImplementation libs.checkerframework.qual
}

// To use a locally-built Checker Framework, run gradle with "-PcfLocal".
if (hasProperty('cfLocal')) {
def cfHome = String.valueOf(System.getenv('CHECKERFRAMEWORK'))
dependencies {
testImplementation files(cfHome + '/checker/dist/checker.jar')
}
}

spotless {
format 'misc', {
// define the files to apply `misc` to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import com.google.common.base.Splitter;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSortedSet;

import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
Expand Down Expand Up @@ -76,7 +78,7 @@ public void conformanceTests() throws IOException {
* @param deps the dependencies of the conformance tests.
*/
private static ImmutableSet<ReportedFact> analyze(
Path testDir, ImmutableList<Path> files, ImmutableList<Path> deps) {
Path testDir, ImmutableSortedSet<Path> files, ImmutableList<Path> deps) {
ImmutableSet<File> fileInputs = files.stream().map(Path::toFile).collect(toImmutableSet());

ImmutableList<String> depsAsStrings =
Expand Down

0 comments on commit 0513ffc

Please sign in to comment.