tools: update check-imports using function
Currently, the do_exist
function that performs the checks for unused
types declared with using declarations, only matches the name of the
using declarations. The means that some unused using declarations are
not detected. For example having both a using Maybe;
and a using MaybeLocal
and only using MaybeLocal
would not be reported.
This commit attempts to take into account the above mentioned case and
also others where the name of the using declaration type is used in name
of a variables or function call. For example, using Just;
, will now be
reported as unused even if there are calls to the FromJust
function.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines