<html><body><span style="font-family:Verdana; color:#000; font-size:10pt;"><div>I'm new at using xref and must be missing something obvious. I did some refactoring of my app and decided to run xref to find where I'd forgot to delete/add something. It worked great and I found mistakes I'd made and fixed them, But it's also telling me that my cowboy callbacks are unused exports:</div><div><br></div><div>Warning: init_handler:allowed_methods/2 is unused export (Xref)<br>Warning: init_handler:content_types_accepted/2 is unused export (Xref)<br>Warning: init_handler:handle_json/2 is unused export (Xref)<br>Warning: init_handler:init/3 is unused export (Xref)<br>Warning: init_handler:rest_init/2 is unused export (Xref)<br>Warning: openc2_handler:allowed_methods/2 is unused export (Xref)<br>Warning: openc2_handler:content_types_accepted/2 is unused export (Xref)<br>Warning: openc2_handler:handle_json/2 is unused export (Xref)<br>Warning: openc2_handler:init/3 is unused export (Xref)<br>Warning: openc2_handler:rest_init/2 is unused export (Xref)<br>Warning: status_handler:allowed_methods/2 is unused export (Xref)<br>Warning: status_handler:init/3 is unused export (Xref)<br>Warning: status_handler:rest_init/2 is unused export (Xref)<br>Warning: status_handler:to_html/2 is unused export (Xref)<br>Warning: status_ok_handler:allowed_methods/2 is unused export (Xref)<br>Warning: status_ok_handler:content_types_provided/2 is unused export (Xref)<br>Warning: status_ok_handler:init/3 is unused export (Xref)<br></div><div><br></div><div>init_handler, openc2_handler, status_handler, and status_ok_handler are all modules in the cowboy routes:</div><div><br></div><div>Routes =<br>    [<br>      {<br>        '_'  %virtual hostname (any host name)<br>      , [<br>          {"/status", status_handler, []}<br>        , {"/ok", status_ok_handler, []}  % returns ok if service working<br>        , {"/openc2", openc2_handler, []}    % handles the meat of openc2<br>        , {"/init", init_handler, []}    % handles starting/restarting the sim<br>        ]<br>      }<br>    ],<br></div><div><br></div><div>I assume I'm not configuring xref correctly to let it know about cowboy. I run xref using rebar 3 from the app directory. I assumed rebar3's knowledge about dependencies would inform xref (which it must or I'd get a host of other errors) - but then why do these warnings appear?<br></div><div><br></div><div>Not sure if related but I also get:<br></div><div>Warning: ocas_app:start/0 is unused export (Xref)<br></div><div>This is the main start routine so I guess it makes sense it isn't called from anything else.<br></div><div><br></div><div>Duncan Sparrell</div><div>sFractal Consulting LLC</div><div>iPhone, iTypo, iApologize</div></span></body></html>