Summary: Move annotation reachability tests to their own directory. Clean up and complete the tests. Reviewed By: jvillard Differential Revision: D16201387 fbshipit-source-id: 8a87a25b7master
parent
ffdc9193dc
commit
5b191c53ae
@ -0,0 +1,21 @@
|
||||
{
|
||||
"force-delete-results-dir": true,
|
||||
"modeled-expensive": [
|
||||
{
|
||||
"language": "Java",
|
||||
"class": "android.app.Activity",
|
||||
"method": "findViewById"
|
||||
},
|
||||
{
|
||||
"language": "Java",
|
||||
"class": "android.view.View",
|
||||
"method": "findViewById"
|
||||
}
|
||||
],
|
||||
"annotation-reachability-custom-pairs": [
|
||||
{
|
||||
"sources": ["UserDefinedSource1", "UserDefinedSource2"],
|
||||
"sink": "UserDefinedSink"
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
# Copyright (c) Facebook, Inc. and its affiliates.
|
||||
#
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
TESTS_DIR = ../../..
|
||||
|
||||
INFER_OPTIONS = --debug-exceptions --annotation-reachability-only
|
||||
|
||||
INFERPRINT_OPTIONS = --issues-tests
|
||||
SOURCES = $(wildcard *.java)
|
||||
|
||||
include $(TESTS_DIR)/javac.make
|
@ -0,0 +1,48 @@
|
||||
codetoanalyze/java/annotreach/AnnotationReachabilityDuplicatesExample.java, codetoanalyze.java.checkers.AnnotationReachabilityDuplicatesExample.perfCriticalBad1():void, 1, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/AnnotationReachabilityDuplicatesExample.java, codetoanalyze.java.checkers.AnnotationReachabilityDuplicatesExample.perfCriticalBad2():void, 1, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/CustomAnnotations.java, codetoanalyze.java.checkers.CustomAnnotations.source1Bad():void, 1, CHECKERS_ANNOTATION_REACHABILITY_ERROR, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/CustomAnnotations.java, codetoanalyze.java.checkers.CustomAnnotations.source2Bad():void, 1, CHECKERS_ANNOTATION_REACHABILITY_ERROR, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/ExpensiveCallExample.java, codetoanalyze.java.checkers.ExpensiveCallExample.annotatedPerformanceCriticalInInterface():void, 1, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/ExpensiveCallExample.java, codetoanalyze.java.checkers.ExpensiveCallExample.callMethodOnExpensiveClass(codetoanalyze.java.checkers.ExpensiveClass):void, 1, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/ExpensiveCallExample.java, codetoanalyze.java.checkers.ExpensiveCallExample.callingExpensiveMethodFromInterface(codetoanalyze.java.checkers.ExpensiveInterfaceExample):void, 1, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/ExpensiveCallExample.java, codetoanalyze.java.checkers.ExpensiveCallExample.callsExpensiveInConditionalBranch():void, 2, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/ExpensiveCallExample.java, codetoanalyze.java.checkers.ExpensiveCallExample.callsExpensiveInTheUnlikelyElseBranch():void, 4, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/ExpensiveCallExample.java, codetoanalyze.java.checkers.ExpensiveCallExample.callsExpensiveWithDisjunctionAfterUnlikely():void, 2, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/ExpensiveCallExample.java, codetoanalyze.java.checkers.ExpensiveCallExample.callsExpensiveWithOverriddenUnlikelyCondition():void, 4, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/ExpensiveCallExample.java, codetoanalyze.java.checkers.ExpensiveCallExample.callsFindViewByIdFromActivity(android.support.v4.app.FragmentActivity,int):android.view.View, 1, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/ExpensiveCallExample.java, codetoanalyze.java.checkers.ExpensiveCallExample.callsFindViewByIdFromView(android.widget.ImageView,int):android.view.View, 1, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/ExpensiveCallExample.java, codetoanalyze.java.checkers.ExpensiveCallExample.directlyCallingExpensiveMethod():void, 1, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/ExpensiveCallExample.java, codetoanalyze.java.checkers.ExpensiveCallExample.indirectlyCallingExpensiveMethod():void, 1, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/ExpensiveCallExample.java, codetoanalyze.java.checkers.ExpensiveCallExample.longerCallStackToExpensive():void, 1, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/ExpensiveCallExample.java, codetoanalyze.java.checkers.ExpensiveCallExample.onlyOneExpensiveCallUsingUnlikely():void, 4, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/ExpensiveCallExample.java, codetoanalyze.java.checkers.PerformanceCriticalClass.performanceCriticalMethod1(codetoanalyze.java.checkers.ExpensiveClass):void, 1, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/ExpensiveCallExample.java, codetoanalyze.java.checkers.PerformanceCriticalClass.performanceCriticalMethod2(codetoanalyze.java.checkers.Other):void, 1, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/ExpensiveCallExample.java, codetoanalyze.java.checkers.PerformanceCriticalClass.performanceCriticalMethod3(codetoanalyze.java.checkers.Other):void, 1, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/ExpensiveCallExample.java, codetoanalyze.java.checkers.PerformanceCriticalSubclass.subclassPerformanceCriticalMethod1(codetoanalyze.java.checkers.ExpensiveClass):void, 1, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/ExpensiveCallExample.java, codetoanalyze.java.checkers.PerformanceCriticalSubclass.subclassPerformanceCriticalMethod2(codetoanalyze.java.checkers.ExpensiveSubclass):void, 1, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/ExpensiveCallExample.java, codetoanalyze.java.checkers.PerformanceCriticalSubclass.subclassPerformanceCriticalMethod3(codetoanalyze.java.checkers.Other):void, 1, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/ExpensiveInheritanceExample.java, codetoanalyze.java.checkers.ExpensiveInheritanceExample.doesReportBecauseTypeFlowInsensitive(codetoanalyze.java.checkers.A):void, 2, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/ExpensiveInheritanceExample.java, codetoanalyze.java.checkers.ExpensiveInheritanceExample.reportsAssumingObjectOfTypeA():void, 2, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/ExpensiveInheritanceExample.java, codetoanalyze.java.checkers.ExpensiveInheritanceExample.reportsBecauseFooIsExpensiveInA(codetoanalyze.java.checkers.A):void, 1, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/ExpensiveInterfaceExample.java, codetoanalyze.java.checkers.ExpensiveInterfaceExample$ImplementsInterface.m1():void, 1, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/ExpensiveSubtypingExample.java, codetoanalyze.java.checkers.ExpensiveSubtypingExample.m3():void, 0, CHECKERS_EXPENSIVE_OVERRIDES_UNANNOTATED, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/NoAllocationExample.java, codetoanalyze.java.checkers.NoAllocationExample.directlyAllocatingMethod():void, 1, CHECKERS_ALLOCATES_MEMORY, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/NoAllocationExample.java, codetoanalyze.java.checkers.NoAllocationExample.indirectlyAllocatingMethod():void, 1, CHECKERS_ALLOCATES_MEMORY, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/TwoCheckersExample.java, codetoanalyze.java.checkers.TwoCheckersExample.shouldRaisePerformanceCriticalError():java.util.List, 1, CHECKERS_CALLS_EXPENSIVE_METHOD, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/UiThreads.java, codetoanalyze.java.checkers.UiThreads.callsFromAnyThreadBad():void, 1, CHECKERS_ANNOTATION_REACHABILITY_ERROR, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/UiThreads.java, codetoanalyze.java.checkers.UiThreads.callsFromAnyThreadBad():void, 1, CHECKERS_ANNOTATION_REACHABILITY_ERROR, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/UiThreads.java, codetoanalyze.java.checkers.UiThreads.callsFromAnyThreadBad():void, 1, CHECKERS_ANNOTATION_REACHABILITY_ERROR, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/UiThreads.java, codetoanalyze.java.checkers.UiThreads.callsFromAnyThreadBad():void, 2, CHECKERS_ANNOTATION_REACHABILITY_ERROR, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/UiThreads.java, codetoanalyze.java.checkers.UiThreads.callsFromAnyThreadBad():void, 2, CHECKERS_ANNOTATION_REACHABILITY_ERROR, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/UiThreads.java, codetoanalyze.java.checkers.UiThreads.callsFromForUiThreadBad():void, 1, CHECKERS_ANNOTATION_REACHABILITY_ERROR, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/UiThreads.java, codetoanalyze.java.checkers.UiThreads.callsFromForUiThreadBad():void, 1, CHECKERS_ANNOTATION_REACHABILITY_ERROR, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/UiThreads.java, codetoanalyze.java.checkers.UiThreads.callsFromMainThreadBad():void, 1, CHECKERS_ANNOTATION_REACHABILITY_ERROR, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/UiThreads.java, codetoanalyze.java.checkers.UiThreads.callsFromMainThreadBad():void, 1, CHECKERS_ANNOTATION_REACHABILITY_ERROR, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/UiThreads.java, codetoanalyze.java.checkers.UiThreads.callsFromNonUiThreadBad():void, 1, CHECKERS_ANNOTATION_REACHABILITY_ERROR, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/UiThreads.java, codetoanalyze.java.checkers.UiThreads.callsFromNonUiThreadBad():void, 1, CHECKERS_ANNOTATION_REACHABILITY_ERROR, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/UiThreads.java, codetoanalyze.java.checkers.UiThreads.callsFromNonUiThreadBad():void, 1, CHECKERS_ANNOTATION_REACHABILITY_ERROR, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/UiThreads.java, codetoanalyze.java.checkers.UiThreads.callsFromUiThreadBad():void, 1, CHECKERS_ANNOTATION_REACHABILITY_ERROR, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/UiThreads.java, codetoanalyze.java.checkers.UiThreads.callsFromUiThreadBad():void, 1, CHECKERS_ANNOTATION_REACHABILITY_ERROR, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/UiThreads.java, codetoanalyze.java.checkers.UiThreads.callsFromWorkerThreadBad():void, 1, CHECKERS_ANNOTATION_REACHABILITY_ERROR, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/UiThreads.java, codetoanalyze.java.checkers.UiThreads.callsFromWorkerThreadBad():void, 1, CHECKERS_ANNOTATION_REACHABILITY_ERROR, no_bucket, ERROR, []
|
||||
codetoanalyze/java/annotreach/UiThreads.java, codetoanalyze.java.checkers.UiThreads.callsFromWorkerThreadBad():void, 1, CHECKERS_ANNOTATION_REACHABILITY_ERROR, no_bucket, ERROR, []
|
Loading…
Reference in new issue