Open stephentoub opened 2 years ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
Tagging subscribers to this area: @dotnet/area-system-runtime See info in area-owners.md if you want to be subscribed.
Author: | stephentoub |
---|---|
Assignees: | - |
Labels: | `area-System.Runtime`, `untriaged`, `code-analyzer` |
Milestone: | - |
https://github.com/dotnet/runtime/pull/62995 added the new StringSyntaxAttribute, and we annotated a bunch of APIs with it, for the three syntaxes currently identified: Regex, DateTimeFormat, and Json.
Visual Studio will look for these and use it to influence its colorization, IntelliSense, etc., but we can also use them to help warn developers at dev time / build time when they've written something that will produce run-time failures. We can add an analyzer for each syntax that will warn on the literal provided, e.g. these would warn