-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation CLI --exclusions arrays (Help Request) #280
Comments
Scratch that... my original --exclusion doesn't work at all... I expect I'm doing CLI arrays wrong. I used the same format as the --extensions (e.g. but it seems that by adding the comma and 2nd criteria breaks it. |
Likewise, I'm trying to run on the CLI & exclusions don't seem to be working. Looks like it's been over a year & nobody has addressed this, just curious if you ever got it working? Specifically, my command is:
My project has frontend files (tsx) under public/, and output compiled js under dist/, both of which should be ignored. However, not only do I see it scanning both of those folders while it runs (not sure if that's typical behavior to scan ignored paths?), but it's reporting warnings in files that are definitely in the frontend .tsx's. So either it's running on those tsx (despite specifying only ts & js), or more likely, it's running on their compiled js in dist (despite the exclude). I'd mention that both "dist" and "public" are also excluded in tsconfig, if that's relevant. I also tried running it with --debug, but if I run it in console, it crashes with out-of-memory, and if I pipe to a file, it gets so big that it literally fills up my SSD (I had to cancel when the log file surpassed 25 gigs). |
Seems like there are multiple issues getting exclude to work as expected.
Seems like some guidance on this might be a good idea, considering that people have been struggling with it for at least 3 years (1st issue is from Jan 2019) Also tried:
But scanning still shows all the dist/ directories, and warnings is still showing imports from files that are definitely either in public/ or dist/. |
@pahen ? |
Great Tool. I love this thing, I'm just struggling to figure out how to use the regex array.
Right now I'm using the following CLI command:
madge --exclude '(test)','^client\/.*$' --image ../myApp-20210326.svg ./
It's properly excluding all my files with the word "test" in them but I can't get it to ignore everything in my '"client" folder. I'm trying to build a tree of just my server at the moment and I want it to ignore this folder. I've tried a few variations on the regex (e.g.
^\/client\/.*$
,^\/client.*$
,(client)
) but it seems to be ignore the full path and only looks at the file name... that or I'm missing something.The text was updated successfully, but these errors were encountered: