How to use roslynator packages for custom analysers #1213
Replies: 3 comments 3 replies
-
Hi, Thank you for the question. I would separate this issue into two parts: .NET API extending Roslyn API (packages Roslynator.Core etc.)I added this page about how to use .NET API in a custom analyzer package. Usage of testing frameworkI prepared PR that makes lot of types public which makes the development of unit test easier. And here is PR that updates docs. Any comments of the PRs are welcome. Nevertheless, technically this PR introduces a breaking change which mean that it should be merged when next major version is released which is usually when next major version of Roslyn is released. I have to think about it whether to merge it earlier. The good news is that there very simple workaround: just copy project "Tests.Common" to your project and use it. Then the development experience will be virtually the same as with the PR merged. |
Beta Was this translation helpful? Give feedback.
-
Any info on this? These are the files I am referring to The (new) docs on unit testing also reference them |
Beta Was this translation helpful? Give feedback.
-
@nathanpovo Roslynator 4.6.0 has been released. It contains changes from #1214 Documentation has been updated accordingly https://josefpihrt.github.io/docs/roslynator/testing |
Beta Was this translation helpful? Give feedback.
-
How possible it is to use the roslynator packages to write your own custom packages?
The docs mention that some of the packages are available for developers to be able to write and test their custom analysers
roslynator/README.md
Lines 50 to 63 in 32c1804
However, I could not find out how to actually use them. The documentation does not go into detail on this.
The unit tests in the solution use a number of internal types (making it impossible for me to use them in a custom roslyn analyser). There are also a number of auto-generated c# classes in this repo (that are referenced by the unit tests), but there is no info on how these were generated.
Beta Was this translation helpful? Give feedback.
All reactions