sgb-io / codehawk-cli

Codehawk is a static analysis tool for JavaScript projects.
MIT License
50 stars 4 forks source link

[bug?] Times Used/Depended On #113

Closed 1000i100 closed 1 year ago

1000i100 commented 1 year ago

Times Used/Depended On Always display 1 in my project, but some of my files are import more than one time. Do you only look for require ?

sgb-io commented 1 year ago

@1000i100 codehawk-cli doesn't detect dependencies directly (this is carried out by typhonjs-escomplex), but it does do some file/patch matching to add the numbers up.

If you have an example, I'd be happy to look at this. Also, please include what OS you are using.

1000i100 commented 1 year ago

Here is the project i've tried it again : https://git.duniter.org/libs/g1lib.js I'm on Linux, TuxedoOS based on Ubuntu 20.04 I will do the 22.04 update soon). I'm using node v16.4.1 or node v19.2.0 if i need v18+ features.

sgb-io commented 1 year ago

Verification is needed, but at a glance, I don't think codehawk-cli currently supports .mjs, which would explain the problem. Shouldn't be too hard to fix.

sgb-io commented 1 year ago

Closing due to https://github.com/sgb-io/codehawk-cli/issues/122

FTA doesn't currently support "times depended on" currently, but if this is something you are interested in, please file an issue in the FTA repo. Thanks!