Microsoft DevBlog: How to Write a Roslyn Analyzer (devblogs.microsoft.com) 12 points by DDerTyp 6y ago ↗ HN
[–] Nelkins 6y ago ↗ Analyzers (but not Roslyn-based) can also be created for F# code using https://github.com/ionide/FSharp.Analyzers.SDK.Here's a cool example that type checks SQL statements embedded in your code as you go: https://github.com/Zaid-Ajaj/Npgsql.FSharp.Analyzer
[–] valleyjo 6y ago ↗ My team wrote an analyzer to prevent use of DateTime.Now and enforce DateTime.UtcNow instead. Helps us prevent weird time bugs. Neat stuff. The code for it took me a while to get used to, lots of strange looking syntax and types.
2 comments
[ 2.9 ms ] story [ 18.9 ms ] threadHere's a cool example that type checks SQL statements embedded in your code as you go: https://github.com/Zaid-Ajaj/Npgsql.FSharp.Analyzer