|
| 1 | +let nullsafe_optimistic_third_party_params_in_non_strict = |
| 2 | + CLOpt.mk_bool |
| 3 | + ~long:"nullsafe-optimistic-third-party-params-in-non-strict" |
| 4 | + (* Turned on for compatibility reasons. Historically this is because |
| 5 | + there was no actionable way to change third party annotations. Now |
| 6 | + that we have such a support, this behavior should be reconsidered, |
| 7 | + provided our tooling and error reporting is friendly enough to be |
| 8 | + smoothly used by developers. *) |
| 9 | + ~default:true |
| 10 | + "Nullsafe: in this mode we treat non annotated third party method params as if they were \ |
| 11 | + annotated as nullable." |
| 12 | + |
| 13 | +let test_file_renamings_from_json = |
| 14 | + let create_test test_input expected_output _ = |
| 15 | + let test_output input = |
| 16 | + DifferentialFilters.FileRenamings.VISIBLE_FOR_TESTING_DO_NOT_USE_DIRECTLY.from_json input |
| 17 | + in |
| 18 | + foo |
| 19 | + in |
| 20 | + fooooooooooooooo |
| 21 | + |
| 22 | +let eval location exp0 astate = |
| 23 | + let rec eval exp astate = |
| 24 | + match (exp : Exp.t) with |
| 25 | + | Var id -> Ok (eval_var (* error in case of missing history? *) [] (Var.of_id id) astate) |
| 26 | + | Lvar pvar -> |
| 27 | + Ok (eval_var [ ValueHistory.VariableAccessed (pvar, location) ] (Var.of_pvar pvar) astate) |
| 28 | + | Lfield (exp', field, _) -> goooooooo |
| 29 | + in |
| 30 | + fooooooooooooooooooooo |
| 31 | + |
| 32 | +let declare_locals_and_ret tenv pdesc (prop_ : Prop.normal Prop.t) = |
| 33 | + let foooooooooooooo = |
| 34 | + BiabductionConfig.run_in_re_execution_mode |
| 35 | + (* no footprint vars for locals *) |
| 36 | + sigma_locals_and_ret () |
| 37 | + in |
| 38 | + fooooooooooooooooooooooooooo |
| 39 | + |
| 40 | +let bottom_up fooooooooooo = |
| 41 | + let empty = Int.equal 0 !scheduled && Queue.is_empty pending in |
| 42 | + if empty then ( |
| 43 | + remaining := 0; |
| 44 | + L.progress "Finished call graph scheduling, %d procs remaining (in, or reaching, cycles).@." |
| 45 | + (CallGraph.n_procs syntactic_call_graph); |
| 46 | + if Config.debug_level_analysis > 0 then CallGraph.to_dotty syntactic_call_graph "cycles.dot"; |
| 47 | + foooooooooooooooooo) |
| 48 | + else fooooooooooooooooo |
| 49 | + |
| 50 | +let test_file_renamings_from_json = |
| 51 | + let fooooooooooooo = |
| 52 | + match expected_output with |
| 53 | + | Return exp -> |
| 54 | + assert_equal ~pp_diff |
| 55 | + ~cmp:DifferentialFilters.FileRenamings.VISIBLE_FOR_TESTING_DO_NOT_USE_DIRECTLY.equal exp |
| 56 | + (test_output test_input) |
| 57 | + | Raise exc -> assert_raises exc (fun () -> test_output test_input) |
| 58 | + in |
| 59 | + foooooooooooooooo |
| 60 | + |
| 61 | +let gen_with_record_deps ~expand t resolved_forms ~dep_kind = |
| 62 | + let foooooooooooooooooooooo = |
| 63 | + expand |
| 64 | + (* we keep the dir constant here to replicate the old behavior of: |
| 65 | + (chdir foo %{exe:bar}). This should lookup ./bar rather than |
| 66 | + ./foo/bar *) |
| 67 | + resolved_forms ~dir:t.dir ~dep_kind ~expand_var:t.expand_var |
| 68 | + in |
| 69 | + { t with expand_var } |
| 70 | + |
| 71 | +let f = |
| 72 | + very_long_function_name |
| 73 | + ~very_long_variable_name:(very_long expression) |
| 74 | + (* this is a |
| 75 | + multiple-line-spanning |
| 76 | + comment *) |
| 77 | + ~y |
| 78 | + |
| 79 | +let eradicate_meta_class_is_nullsafe = |
| 80 | + register ~id:"ERADICATE_META_CLASS_IS_NULLSAFE" |
| 81 | + ~hum:"Class is marked @Nullsafe and has 0 issues" |
| 82 | + (* Should be enabled for special integrations *) |
| 83 | + ~enabled:false Info Eradicate (* TODO *) |
| 84 | + ~user_documentation:"" |
| 85 | + |
| 86 | +let eradicate_meta_class_is_nullsafe = |
| 87 | + register ~id:"ERADICATE_META_CLASS_IS_NULLSAFE" (* Should be enabled for special integrations *) |
| 88 | + ~hum:"Class is marked @Nullsafe and has 0 issues" |
| 89 | + (* Should be enabled for special integrations *) |
| 90 | + ~enabled:false Info |
0 commit comments