Skip to content

Commit

Permalink
Set -Anomsgtext by default for all tests (eisop#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
zcai1 authored and Haifeng Shi committed Apr 20, 2022
1 parent 5334f0d commit 2bd122b
Show file tree
Hide file tree
Showing 111 changed files with 67 additions and 205 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public CalledMethodsAutoValueTest(List<File> testFiles) {
CalledMethodsChecker.class.getName()),
"calledmethods-autovalue",
Collections.emptyList(),
"-Anomsgtext",
"-nowarn");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ public CalledMethodsDisableReturnsReceiverTest(List<File> testFiles) {
testFiles,
CalledMethodsChecker.class,
"calledmethods-disablereturnsreceiver",
"-Anomsgtext",
"-AdisableReturnsReceiver",
"-encoding",
"UTF-8");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public CalledMethodsDisableframeworksTest(List<File> testFiles) {
CalledMethodsChecker.class.getName()),
"calledmethods-disableframeworks",
Collections.emptyList(),
"-Anomsgtext",
"-AdisableBuilderFrameworkSupports=autovalue,lombok",
// The next option is so that we can run the usevaluechecker tests under this
// configuration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ public CalledMethodsLombokTest(List<File> testFiles) {
testFiles,
CalledMethodsChecker.class,
"calledmethods-delomboked",
"-Anomsgtext",
"-nowarn",
"-AsuppressWarnings=type.anno.before.modifier");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public CalledMethodsNoDelombokTest(List<File> testFiles) {
testFiles,
org.checkerframework.checker.calledmethods.CalledMethodsChecker.class,
"lombok",
"-Anomsgtext",
"-nowarn");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ public CalledMethodsTest(List<File> testFiles) {
testFiles,
CalledMethodsChecker.class,
"calledmethods",
"-Anomsgtext",
"-nowarn",
"-encoding",
"UTF-8");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public CalledMethodsUseValueCheckerTest(List<File> testFiles) {
testFiles,
CalledMethodsChecker.class,
"calledmethods-usevaluechecker",
"-Anomsgtext",
"-AuseValueChecker",
"-nowarn");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public CompilerMessagesTest(List<File> testFiles) {
testFiles,
org.checkerframework.checker.compilermsgs.CompilerMessagesChecker.class,
"compilermsg",
"-Anomsgtext",
"-Apropfiles=tests/compilermsg/compiler.properties");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public DisbarUseTest(List<File> testFiles) {
testFiles,
DisbarUseChecker.class,
"disbaruse-records",
"-Anomsgtext",
"-Astubs=tests/disbaruse-records",
"-AstubWarnIfNotFound");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public FenumSwingTest(List<File> testFiles) {
testFiles,
org.checkerframework.checker.fenum.FenumChecker.class,
"fenum",
"-Anomsgtext",
"-Aquals=org.checkerframework.checker.fenum.qual.SwingVerticalOrientation,org.checkerframework.checker.fenum.qual.SwingHorizontalOrientation,org.checkerframework.checker.fenum.qual.SwingBoxOrientation,org.checkerframework.checker.fenum.qual.SwingCompassDirection,org.checkerframework.checker.fenum.qual.SwingElementOrientation,org.checkerframework.checker.fenum.qual.SwingTextOrientation");
// TODO: check all qualifiers
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ public class FenumTest extends CheckerFrameworkPerDirectoryTest {
* @param testFiles the files containing test code, which will be type-checked
*/
public FenumTest(List<File> testFiles) {
super(
testFiles,
org.checkerframework.checker.fenum.FenumChecker.class,
"fenum",
"-Anomsgtext");
super(testFiles, org.checkerframework.checker.fenum.FenumChecker.class, "fenum");
}

@Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,7 @@ public class FormatterLubGlbCheckerTest extends CheckerFrameworkPerDirectoryTest
* @param testFiles the files containing test code, which will be type-checked
*/
public FormatterLubGlbCheckerTest(List<File> testFiles) {
super(
testFiles,
FormatterLubGlbChecker.class,
"",
"-Anomsgtext",
"-AcheckPurityAnnotations");
super(testFiles, FormatterLubGlbChecker.class, "", "-AcheckPurityAnnotations");
}

@Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ public FormatterTest(List<File> testFiles) {
super(
testFiles,
org.checkerframework.checker.formatter.FormatterChecker.class,
"formatter",
"-Anomsgtext");
"formatter");
}

@Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public FormatterUncheckedDefaultsTest(List<File> testFiles) {
testFiles,
org.checkerframework.checker.formatter.FormatterChecker.class,
"formatter",
"-Anomsgtext",
"-AuseConservativeDefaultsForUncheckedCode=-source,bytecode");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ public GuiEffectTest(List<File> testFiles) {
super(
testFiles,
org.checkerframework.checker.guieffect.GuiEffectChecker.class,
"guieffect",
"-Anomsgtext");
"guieffect");
// , "-Alint=debugSpew");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,7 @@ public class I18nFormatterLubGlbCheckerTest extends CheckerFrameworkPerDirectory
* @param testFiles the files containing test code, which will be type-checked
*/
public I18nFormatterLubGlbCheckerTest(List<File> testFiles) {
super(
testFiles,
I18nFormatterLubGlbChecker.class,
"",
"-Anomsgtext",
"-AcheckPurityAnnotations");
super(testFiles, I18nFormatterLubGlbChecker.class, "", "-AcheckPurityAnnotations");
}

@Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ public I18nFormatterTest(List<File> testFiles) {
super(
testFiles,
org.checkerframework.checker.i18nformatter.I18nFormatterChecker.class,
"i18n-formatter",
"-Anomsgtext");
"i18n-formatter");
}

@Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public I18nFormatterUncheckedDefaultsTest(List<File> testFiles) {
testFiles,
org.checkerframework.checker.i18nformatter.I18nFormatterChecker.class,
"i18n-formatter",
"-Anomsgtext",
"-AuseConservativeDefaultsForUncheckedCode=-source,bytecode");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ public class I18nTest extends CheckerFrameworkPerDirectoryTest {
* @param testFiles the files containing test code, which will be type-checked
*/
public I18nTest(List<File> testFiles) {
super(
testFiles,
org.checkerframework.checker.i18n.I18nChecker.class,
"i18n",
"-Anomsgtext");
super(testFiles, org.checkerframework.checker.i18n.I18nChecker.class, "i18n");
}

@Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public I18nUncheckedDefaultsTest(List<File> testFiles) {
testFiles,
org.checkerframework.checker.i18n.I18nChecker.class,
"i18n",
"-Anomsgtext",
"-AuseConservativeDefaultsForUncheckedCode=-source,bytecode");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ public class IndexTest extends CheckerFrameworkPerDirectoryTest {
* @param testFiles the files containing test code, which will be type-checked
*/
public IndexTest(List<File> testFiles) {
super(
testFiles,
org.checkerframework.checker.index.IndexChecker.class,
"index",
"-Anomsgtext");
super(testFiles, org.checkerframework.checker.index.IndexChecker.class, "index");
}

@Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ public InterningTest(List<File> testFiles) {
super(
testFiles,
org.checkerframework.checker.interning.InterningChecker.class,
"interning",
"-Anomsgtext");
"interning");
}

@Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ public LockSafeDefaultsTest(List<File> testFiles) {
testFiles,
org.checkerframework.checker.lock.LockChecker.class,
"lock",
"-AuseConservativeDefaultsForUncheckedCode=source",
"-Anomsgtext");
"-AuseConservativeDefaultsForUncheckedCode=source");
}

@Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ public class LockTest extends CheckerFrameworkPerDirectoryTest {
* @param testFiles the files containing test code, which will be type-checked
*/
public LockTest(List<File> testFiles) {
super(
testFiles,
org.checkerframework.checker.lock.LockChecker.class,
"lock",
"-Anomsgtext");
super(testFiles, org.checkerframework.checker.lock.LockChecker.class, "lock");
}

@Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ public MustCallNoLightweightOwnershipTest(List<File> testFiles) {
testFiles,
org.checkerframework.checker.mustcall.MustCallChecker.class,
"mustcall-nolightweightownership",
"-Anomsgtext",
"-AnoLightweightOwnership",
// "-AstubDebug");
"-nowarn");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ public MustCallTest(List<File> testFiles) {
testFiles,
org.checkerframework.checker.mustcall.MustCallChecker.class,
"mustcall",
"-Anomsgtext",
// "-AstubDebug");
"-nowarn");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,7 @@ public class NestedAggregateCheckerTest extends CheckerFrameworkPerDirectoryTest
* @param testFiles the files containing test code, which will be type-checked
*/
public NestedAggregateCheckerTest(List<File> testFiles) {
super(
testFiles,
NestedAggregateChecker.class,
"",
"-Anomsgtext",
"-AcheckPurityAnnotations");
super(testFiles, NestedAggregateChecker.class, "", "-AcheckPurityAnnotations");
}

@Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public NullnessAssertsTest(List<File> testFiles) {
"nullness",
"-AcheckPurityAnnotations",
"-AassumeAssertionsAreEnabled",
"-Anomsgtext",
"-Xlint:deprecation",
"-Alint=soundArrayCreationNullness,"
+ NullnessChecker.LINT_REDUNDANTNULLCOMPARISON);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public NullnessAssumeAssertionsAreDisabledTest(List<File> testFiles) {
org.checkerframework.checker.nullness.NullnessChecker.class,
"nullness",
"-AassumeAssertionsAreDisabled",
"-Anomsgtext",
"-Xlint:deprecation");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public NullnessAssumeKeyForTest(List<File> testFiles) {
"nullness",
"-AcheckPurityAnnotations",
"-AassumeKeyFor",
"-Anomsgtext",
"-Xlint:deprecation",
"-Alint=soundArrayCreationNullness,"
+ NullnessChecker.LINT_REDUNDANTNULLCOMPARISON);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ public NullnessCheckCastElementTypeTest(List<File> testFiles) {
testFiles,
org.checkerframework.checker.nullness.NullnessChecker.class,
"nullness",
"-AcheckCastElementType",
"-Anomsgtext");
"-AcheckCastElementType");
}

@Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ public NullnessConcurrentTest(List<File> testFiles) {
testFiles,
org.checkerframework.checker.nullness.NullnessChecker.class,
"nullness",
"-AconcurrentSemantics",
"-Anomsgtext");
"-AconcurrentSemantics");
}

@Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ public NullnessGenericWildcardTest(List<File> testFiles) {
"nullness",
// This test reads bytecode .class files created by NullnessGenericWildcardLibTest
"-cp",
"dist/checker.jar:tests/build/testclasses/",
"-Anomsgtext");
"dist/checker.jar:tests/build/testclasses/");
}

@Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ public NullnessInvariantArraysTest(List<File> testFiles) {
testFiles,
org.checkerframework.checker.nullness.NullnessChecker.class,
"nullness",
"-AinvariantArrays",
"-Anomsgtext");
"-AinvariantArrays");
}

@Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ public NullnessJSpecifySamplesTest(List<File> testFiles) {
testFiles,
org.checkerframework.checker.nullness.NullnessChecker.class,
"../../../jspecify/samples",
Collections.singletonList("../../jspecify/build/libs/jspecify-0.0.0-SNAPSHOT.jar"),
"-Anomsgtext");
Collections.singletonList("../../jspecify/build/libs/jspecify-0.0.0-SNAPSHOT.jar"));
}

@Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public NullnessJavacErrorsTest(File testFile) {
org.checkerframework.checker.nullness.NullnessChecker.class,
"nullness",
"-AcheckPurityAnnotations",
"-Anomsgtext",
"-Xlint:deprecation",
"-Alint=soundArrayCreationNullness,"
+ NullnessChecker.LINT_REDUNDANTNULLCOMPARISON);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ public NullnessJavadocTest(List<File> testFiles) {
testFiles,
org.checkerframework.checker.nullness.NullnessChecker.class,
"nullness",
toolsJarList(),
"-Anomsgtext");
toolsJarList());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public NullnessNoDelombokTest(List<File> testFiles) {
testFiles,
org.checkerframework.checker.nullness.NullnessChecker.class,
"nullness-nodelombok",
"-Anomsgtext",
"-nowarn");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ public NullnessNullMarkedTest(List<File> testFiles) {
testFiles,
org.checkerframework.checker.nullness.NullnessChecker.class,
"nullness",
Collections.singletonList("../../jspecify/build/libs/jspecify-0.0.0-SNAPSHOT.jar"),
"-Anomsgtext");
Collections.singletonList("../../jspecify/build/libs/jspecify-0.0.0-SNAPSHOT.jar"));
}

@Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public NullnessPermitClearPropertyTest(List<File> testFiles) {
testFiles,
org.checkerframework.checker.nullness.NullnessChecker.class,
"nullness",
"-Anomsgtext",
"-Alint=permitClearProperty");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public NullnessRecordsTest(List<File> testFiles) {
NullnessChecker.class,
"nullness-records",
"-AcheckPurityAnnotations",
"-Anomsgtext",
"-Xlint:deprecation");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ public NullnessReflectionTest(List<File> testFiles) {
testFiles,
org.checkerframework.checker.nullness.NullnessChecker.class,
"nullness",
"-AresolveReflection",
"-Anomsgtext");
"-AresolveReflection");
}

@Parameters
Expand Down
Loading

0 comments on commit 2bd122b

Please sign in to comment.