roslynator
roslynator copied to clipboard
Add --ignore-constructors switch to find-symbol command
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.
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