Skip to content
Open
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
20 changes: 10 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ subprojects {
// Tasks such as `checkInterning` and `checkResourceLeak` run various checkers on all the main source sets.
// These pass and are run by the `typecheck` task.
// When you add one here, also update a dependsOn item for the "typecheck" task.
createCheckTypeTask(project.name, "Formatter",
rootProject.createCheckTypeTask(project.name, "Formatter",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the rootProject, so why is this needed?

"org.checkerframework.checker.formatter.FormatterChecker")

def checkInterningArgs = [
Expand All @@ -870,32 +870,32 @@ subprojects {
}


createCheckTypeTask(project.name, "Interning",
rootProject.createCheckTypeTask(project.name, "Interning",
"org.checkerframework.checker.interning.InterningChecker",
checkInterningArgs)

createCheckTypeTask(project.name, "Optional",
rootProject.createCheckTypeTask(project.name, "Optional",
"org.checkerframework.checker.optional.OptionalChecker",
[
// to avoid having to annotate JavaParser
"-AassumePureGetters",
"-AassumeAssertionsAreEnabled",
])
createCheckTypeTask(project.name, "Purity",
rootProject.createCheckTypeTask(project.name, "Purity",
"org.checkerframework.framework.util.PurityChecker")
createCheckTypeTask(project.name, "Regex",
rootProject.createCheckTypeTask(project.name, "Regex",
"org.checkerframework.checker.regex.RegexChecker")
createCheckTypeTask(project.name, "ResourceLeak",
rootProject.createCheckTypeTask(project.name, "ResourceLeak",
"org.checkerframework.checker.resourceleak.ResourceLeakChecker")
createCheckTypeTask(project.name, "Signature",
rootProject.createCheckTypeTask(project.name, "Signature",
"org.checkerframework.checker.signature.SignatureChecker")

// The checkNullness task runs on all code, but it only *checks* the following code:
// * All files outside the "framework", "checker", and "annotation-file-utilities" subprojects.
// * In the "framework", "checker", and "annotation-file-utilities" subprojects, files with `@AnnotatedFor("nullness")`.
boolean nullnessAll = project.getProperties().containsKey("nullnessAll")
if (!nullnessAll && (project.name.is("framework") || project.name.is("checker") || project.name.is("annotation-file-utilities"))) {
createCheckTypeTask(project.name, "Nullness",
rootProject.createCheckTypeTask(project.name, "Nullness",
"org.checkerframework.checker.nullness.NullnessChecker",
[
"-AskipUses=com\\.sun\\.*",
Expand All @@ -904,13 +904,13 @@ subprojects {
"-AuseConservativeDefaultsForUncheckedCode=source"
])
} else {
createCheckTypeTask(project.name, "Nullness",
rootProject.createCheckTypeTask(project.name, "Nullness",
"org.checkerframework.checker.nullness.NullnessChecker",
["-AskipUses=com\\.sun\\.*"])
}


createCheckTypeTask(project.name, "CompilerMessages",
rootProject.createCheckTypeTask(project.name, "CompilerMessages",
"org.checkerframework.checker.compilermsgs.CompilerMessagesChecker")
checkCompilerMessages {
doFirst {
Expand Down