This month is crazy for me. If you have seen my last few posts I was quite occupied. But That doesn’t mean I wasn’t paying attention to the challenge.
Its time for progress update on Chain Analyzer!
A lot of reading the theory.
I won’t lie that it is the hardest project I have ever tried.
Hover, this adventure is good practical example of how I learn!
Roslyn is a complicated subject because of how close it lives to the compiler. If you have seen any of my presentations about how selenium works I quite often finish with saying „we won’t go deeper – this is formal languages land, and it is a dark place.”
Thing is I am glad I had that subject on my studies- this was the only reason why I was able to grasp what is going on here.
I’ve done the first Tutorial on ms page, Which showed me how the terminology here is different from regular c# code.
Which lead me into land on documentation – Syntax Trees, nodes, tokens, trivia and much much more. But it was worth it.
PoC is ready!
Here is link to NuGet if you want to check it out (its called Chain Analyzer).
For now, it works well on simple case ergo no methods that use parameters.
You should see code highlighted in Visual Studio and information in the warnings section.
I am aware of one issue if there parameterised method, it could wrongly count it. This is an excellent example of why TDD is hard. While preparing unit tests, I haven’t thought about such a case.
- Fix pipeline it uses wrong repo.
- Fix an issue with parameters.
- Add a page with an explanation of fixes;
- Make better warning messages.
- Find out how message suppression works.
- Add more features.
That all for now!