Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to test using local CF build #5

Merged
merged 7 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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