Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file register.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384(* This file is part of Bisect_ppx, released under the MIT license. See
LICENSE.md for details, or visit
https://github.com/aantron/bisect_ppx/blob/master/LICENSE.md. *)moduleCommon=Bisect_commonletconditional=reffalseletenabled()=match!conditionalwith|false->`Enabled|true->matchSys.getenv"BISECT_ENABLE"with|exceptionNot_found->`Disabled|swhen(String.uppercase[@ocaml.warning"-3"])s="YES"->`Enabled|_->`Disabledletconditional_exclude_filefilename=matchenabled()with|`Enabled->Exclusions.add_filefilename|`Disabled->()letswitches=[("--exclude",Arg.String(funs->prerr_endline"bisect_ppx argument '--exclude' is deprecated.";prerr_endline"Use '--exclusions' instead.";Exclusions.adds)," Deprecated");("--exclusions",Arg.Stringconditional_exclude_file,"<filename> Exclude functions listed in given file");("--exclude-file",Arg.String(funs->prerr_endline"bisect_ppx argument '--exclude-file' is deprecated.";prerr_endline"It has been renamed to '--exclusions'.";conditional_exclude_files)," Deprecated");("--conditional",Arg.Setconditional," Do not instrument unless environment variable BISECT_ENABLE is YES");("--no-comment-parsing",Arg.Unit(fun()->prerr_endline"bisect_ppx argument '--no-comment-parsing' is deprecated.")," Deprecated");("-mode",(Arg.Symbol(["safe";"fast";"faster"],fun_->prerr_endline"bisect_ppx argument '-mode' is deprecated."))," Deprecated");]letdeprecated=Common.deprecated"bisect_ppx"letswitches=switches|>deprecated"-exclude"|>deprecated"-exclude-file"|>deprecated"-conditional"|>deprecated"-no-comment-parsing"|>Arg.alignlet()=Migrate_parsetree.Driver.register~name:"bisect_ppx"~args:switches~position:100Migrate_parsetree.Versions.ocaml_410beginfun_config_cookies->matchenabled()with|`Enabled->Ppx_tools_410.Ast_mapper_class.to_mapper(newInstrument.instrumenter)|`Disabled->Migrate_parsetree.Ast_410.shallow_identityend