8000 Add --ignore-constructors switch to find-symbol command · Issue #1616 · dotnet/roslynator · GitHub
[go: up one dir, main page]

Skip to content
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

Add --ignore-constructors switch to find-symbol command #1616

Open
mykhailopylyp opened this issue Feb 5, 2025 · 1 comment
Open

Add --ignore-constructors switch to find-symbol command #1616

mykhailopylyp opened this issue Feb 5, 2025 · 1 comment

Comments

@mykhailopylyp
Copy link

Adding a --ignore-constructors option to the find-symbol command would be very useful. I'm currently removing unused code, but because dependency injection hides explicit constructor references, nearly all of my constructors are being removed.

Do you know any way around it without modifying code or adding skip attributes to each constructor?

In the meantime, I managed to clone the codebase and apply the needed change.

@josefpihrt
Copy link
Collaborator

Hi,

There's a parameter --symbol-kind (https://josefpihrt.github.io/docs/roslynator/cli/commands/find-symbol/#--symbol-kind) which acceppts space-separated list of symbols to include. constructor could be added as one of the value and then there could be a new parameter --ignored-symbol-kind with similar functionality as --symbol-kind but it would exclude specified symbol kinds.

Usage:

roslynator find-symbol --ignore-symbol-kind constructor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
0