- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.2k
[ILLink analyzer] Add analyzer support for feature checks #94944
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| Tagging subscribers to 'linkable-framework': @eerhardt, @vitek-karas, @LakshanF, @sbomer, @joperezr, @marek-safar Issue DetailsAdds support for annotating static boolean properties with  Adds two new warnings for: 
 See #94625 for notes on the design. 
 | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
        
          
                src/tools/illink/test/Mono.Linker.Tests.Cases/DataFlow/FeatureCheckAttributeDataFlow.cs
          
            Show resolved
            Hide resolved
        
              
          
                src/tools/illink/src/ILLink.RoslynAnalyzer/DataFlow/FeatureChecksValue.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                src/tools/illink/src/ILLink.RoslynAnalyzer/ISymbolExtensions.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                src/tools/illink/src/ILLink.RoslynAnalyzer/ISymbolExtensions.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                src/tools/illink/src/ILLink.RoslynAnalyzer/TrimAnalysis/TrimAnalysisReturnValuePattern.cs.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                src/tools/illink/src/ILLink.RoslynAnalyzer/TrimAnalysis/TrimAnalysisReturnValuePattern.cs.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                src/tools/illink/src/ILLink.RoslynAnalyzer/TrimAnalysis/TrimAnalysisReturnValuePattern.cs.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                src/tools/illink/test/Mono.Linker.Tests.Cases/DataFlow/FeatureCheckAttributeDataFlow.cs
          
            Show resolved
            Hide resolved
        
      …cksValue.cs Co-authored-by: Jackson Schuster <[email protected]>
Co-authored-by: Jackson Schuster <[email protected]>
- Add more detail to feature check validation message - Use existing attribute helper to get AttributeData by attribute name - Replace unnecessary ImmutableArray Builder - Invert some if conditions to return early - Rename TrimAnalysisReturnValuePattern -> FeatureCheckReturnValuePattern
Adds support for annotating static boolean properties with
[FeatureCheckAttribute(typeof(RequiresDynamicCodeAttribute))], causing the property to be treated as a guard for analyzer warnings about the correspondingRequiresattribute.Adds two new warnings for:
FeatureCheckAttributeapplied to a non-static or non-bool propertySee #94625 for notes on the design.
See #96859 for the API proposal.