[eradicate] skip the analysis of the method in external methods

Summary: No need to report in this case.

Reviewed By: mbouaziz

Differential Revision: D9846951

fbshipit-source-id: c5a0ffbb2
master
Jeremy Dubreil 6 years ago committed by Facebook Github Bot
parent bd8d2eb941
commit 48f03f06f4

@ -308,6 +308,7 @@ module MkCallback (Extension : ExtensionT) : CallBackT = struct
( match proc_name with
| Typ.Procname.Java java_pname ->
Typ.Procname.Java.is_access_method java_pname
|| Typ.Procname.Java.is_external java_pname
| _ ->
false )
|| (Procdesc.get_attributes proc_desc).ProcAttributes.is_bridge_method

@ -86,5 +86,3 @@ codetoanalyze/java/eradicate/ReturnNotNullable.java, codetoanalyze.java.eradicat
codetoanalyze/java/eradicate/ReturnNotNullable.java, codetoanalyze.java.eradicate.ReturnNotNullable.return_null_in_catch():java.lang.String, 0, ERADICATE_RETURN_NOT_NULLABLE, no_bucket, WARNING, [origin,Method `return_null_in_catch()` may return null but it is not annotated with `@Nullable`. (Origin: null constant at line 109)]
codetoanalyze/java/eradicate/ReturnNotNullable.java, codetoanalyze.java.eradicate.ReturnNotNullable.return_null_in_catch_after_throw():java.lang.String, 0, ERADICATE_RETURN_NOT_NULLABLE, no_bucket, WARNING, [origin,Method `return_null_in_catch_after_throw()` may return null but it is not annotated with `@Nullable`. (Origin: null constant at line 121)]
codetoanalyze/java/eradicate/ReturnNotNullable.java, codetoanalyze.java.eradicate.ReturnNotNullable.tryWithResourcesReturnNullable(java.lang.String):java.lang.Object, 0, ERADICATE_RETURN_NOT_NULLABLE, no_bucket, WARNING, [origin,Method `tryWithResourcesReturnNullable(...)` may return null but it is not annotated with `@Nullable`. (Origin: call to returnNullOK() at line 90)]
external/library/SomeExternalClass.java, external.library.SomeExternalClass.<init>(), 0, ERADICATE_FIELD_NOT_INITIALIZED, no_bucket, WARNING, [Field `SomeExternalClass.field` is not initialized in the constructor and is not declared `@Nullable`]
external/library/SomeExternalClass.java, external.library.SomeExternalClass.externalMethod1():java.lang.Object, 0, ERADICATE_RETURN_NOT_NULLABLE, no_bucket, WARNING, [origin,Method `externalMethod1()` may return null but it is not annotated with `@Nullable`. (Origin: null constant at line 16)]

Loading…
Cancel
Save