sgb-io / codehawk-cli

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

Main dir arg isn't always respected #111

Closed sgb-io closed 1 year ago

sgb-io commented 2 years ago

e.g. codehawk packages/foo - this doesn't work as expected

sgb-io commented 2 years ago

I think this is due to codehawk.ts L34 where cwd() is used in "cli context". It's easily solved by not using cwd for the walkSync call. Q: is there actually a usecase for using cwd? I can't think of one at time of writing.

Note: there is a related problem in that it is assumed there is a single coverage dir and it uses the same wonky cwd logic at the moment.

sgb-io commented 1 year ago

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