madge icon indicating copy to clipboard operation
madge copied to clipboard

Reported file paths should be relative to root for easier opening inside vscode

Open hornta opened this issue 3 years ago • 0 comments

Right now it appears as if the reported file paths are relative to the actual program inside of node_modules/bin or perhaps node_module/marge.

Take a look at this output:

$ C:\Users\hornta\Documents\kraftbot\node_modules\.bin\madge ./examples/basic/basic.ts --circular --extensions ts
Processed 590 files (2.9s) (8 warnings)

✖ Found 22 circular dependencies!

1) ../../src/bot/block-behaviour.ts > ../../src/bot/empty-fluid.ts > ../../src/bot/blocks/air-block.ts > ../../src/bot/block.ts
2) ../../src/bot/blocks/air-block.ts > ../../src/bot/block.ts > ../../src/bot/block-state.ts > ../../src/bot/block-state-base.ts > ../../src/bot/block-state-cache.ts > ../../src/bot/collision-context.ts > ../../src/bot/entity-collision-context.ts > ../../src/bot/item-stack.ts

vscode make each file path clickable but it can't find the file upon click because it begins with ../../

If the file path were to be like this: src/bot/block-behaviour.ts then vscode would be able to open the file straight from console. Maybe could be a configuration setting?

hornta avatar Aug 14 '21 20:08 hornta