Skip to content

[Feature] Allow ignoring warnings #69

Description

@ETHAN-MENDEL

Is your feature request related to a problem? Please describe.

I'm always frustrated when I see a bunch of warnings in my report for devDependencies that are expected/okay to be missing at runtime

Describe the solution you'd like

I'd like an option/param to the cli to let me specify which kinds of skips or miss warning lines to ignore based on the import. ex:

dpdm circular:1 ./**/*.ts --ignore-miss-warning "vscode" --ignore-skip-warning "node_modules\//"

Describe alternatives you've considered

I've written my own js wrapper that parses the output and auto-removes these specific values

const SUPPRESS_PATTERNS = [
    /^\s+\d+\) miss "vscode"/,
    /^\s+\d+\) skip "node_modules\//,
];

const result = spawnSync("dpdm circular:1 ./**/*.ts");

// Filter stdout line-by-line
const lines = (result.stdout || "").split("\n");
const filtered = lines.filter((line) => !SUPPRESS_PATTERNS.some((re) => re.test(line)));

process.stdout.write(filtered.join("\n"));
if (result.stderr) {
    process.stderr.write(result.stderr);
}

process.exit(result.status ?? 0);

native support would be great though!

Additional context

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions