You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In short, unless the analysis requires IL analysis, the linker and the analyzer should produce the same warnings, and the analyzer should produce a strict subset of the total linker warnings.
At the high level, we need to confirm this as best we can using some complex repos. We should turn on the analyzer and verify that no more warnings are produced and that similar value is provided by the analyzer as by the linker. Repos:
dotnet/runtime
dotnet/aspnetcore
See #2580 for issues that additionally block integration of the feature branch.
Decided not to implement this: [DAM analyzer] Add support for attribute warning suppressions #2579 - [ ] PreserveDependencyAlanyzer: IL2003, IL2004, IL2005, IL2033 - [ ] DynamicDependencyAttributeAnalyzer: IL2033, IL2034, IL2035, IL2036, IL2037, - [ ] Misc.: IL2032, IL2057, IL2059
There are some that fit into analyzers we already have: - [ ] IL2027: Multiple instances of a Requires* attribute (fits into Requires*Analyzer),
@tlakollo noted: The only way we generate IL2027 is when we have RUC specified in an xml file and RUC specified in the member, so I think is a warning that I would put in the xml analyzer side.
IL2041: DAM is not allowed on methods (fits into DAMAnalyzer), - [ ] IL2042: Cannot determine backing field of a property (fits into DAMAnalyzer),
IL2043: DAM on property conflicts with the same attribute on its accessor method (fits into DAMAnalyzer),
IL2050: Pinvoke method declares a parameter with COM marshalling (we must add an analyzer for this, although I don't see anything particularly difficult for supporting this warning), - [ ] IL2056: Annotated a property which has its backing field already annotated (fits into DAMAnalyzer)
Finally, there are issues where we know the linker behavior needs to be fixed, and the analyzer work should be done in parallel: - [ ] #2158
Arrays - [ ] foreach over arrays is complicated and analyzer doesn't see the array access -> the iterator variable is evaluated as TopValue which means it won't cause any warnings. Unlike linker which will see it as unannotated value which will cause warnings.
The text was updated successfully, but these errors were encountered:
In short, unless the analysis requires IL analysis, the linker and the analyzer should produce the same warnings, and the analyzer should produce a strict subset of the total linker warnings.
At the high level, we need to confirm this as best we can using some complex repos. We should turn on the analyzer and verify that no more warnings are produced and that similar value is provided by the analyzer as by the linker. Repos:
See #2580 for issues that additionally block integration of the feature branch.
I think these are the analyzers we are currently missing, together with the related warnings:
XmlAnalyzer: IL2001, IL2002, IL2007-IL2025, IL2029-IL2031, IL2038-IL2040, IL2044, IL2045, IL2048, IL2049, IL2051-IL2054- [ ] PreserveDependencyAlanyzer: IL2003, IL2004, IL2005, IL2033- [ ] DynamicDependencyAttributeAnalyzer: IL2033, IL2034, IL2035, IL2036, IL2037,- [ ] Misc.: IL2032, IL2057, IL2059There are some that fit into analyzers we already have:
- [ ] IL2027: Multiple instances of a Requires* attribute (fits into Requires*Analyzer),- [ ] IL2042: Cannot determine backing field of a property (fits into DAMAnalyzer),- [ ] IL2056: Annotated a property which has its backing field already annotated (fits into DAMAnalyzer)Finally, there are issues where we know the linker behavior needs to be fixed, and the analyzer work should be done in parallel:
- [ ] #2158Compiler generated backing fields
- [ ] #2628Arrays
- [ ]foreach
over arrays is complicated and analyzer doesn't see the array access -> the iterator variable is evaluated as TopValue which means it won't cause any warnings. Unlike linker which will see it as unannotated value which will cause warnings.The text was updated successfully, but these errors were encountered: