Using refactoring rules in a ruleset #1089
Replies: 3 comments 1 reply
-
Oh whoops... Did not see discussions were enabled, feel free to convert it to a discussion instead as it's prob. more appropriate there. |
Beta Was this translation helpful? Give feedback.
-
Hi, Unlike analyzers the refactorings cannot be configured through ruleset. Generally speaking, they cannot be configured at all. Luckily, it is possible to enable/disable Roslynator refactorings using EditorConfig files. Please see https://github.com/JosefPihrt/Roslynator/blob/main/docs/Configuration.md for further details. |
Beta Was this translation helpful? Give feedback.
-
Unfortunately not, refactoring can be considered as a one-time operation invoked at the given location. |
Beta Was this translation helpful? Give feedback.
-
Product and Version Used: Roslynator.Analyzers, Roslynator.Formatting.Analyzers,: 4.3.0
Steps to Reproduce:
Add a small program like so
Add
RR0086 | Remove all comments
rule to rulesetRR0086 Remove all comments
Run format command
Actual Behavior:
Expected Behavior:
Additional information
Thank you for the project! Sorry if this might just be my ignorance, but I am trying to multiple of the refactoring rules to automatically apply when running the formatting command, however it seems like I cannot get it to work.
When using the analyzer rules it works perfectly. Am I doing something wrong or is it just not supported to do refactoring rules in the ruleset?
Beta Was this translation helpful? Give feedback.
All reactions