- 
                Notifications
    
You must be signed in to change notification settings  - Fork 121
 
Fix related to XML suppressions not working #705
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
base: main
Are you sure you want to change the base?
Fix related to XML suppressions not working #705
Conversation
Changes: - Added xml suppression comments syntax requirements in comments.json - Added a test class for testing suppression comments. File: DevSkimRuleProcessorTests.cs
| 
           /azp run  | 
    
| 
          
Azure Pipelines successfully started running 3 pipeline(s). | 
    
| 
           /azp run  | 
    
| 
          
Azure Pipelines successfully started running 3 pipeline(s). | 
    
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.
Pull Request Overview
This PR fixes an issue where XML suppression comments were not working in DevSkim. The fix adds XML-specific comment syntax definitions and introduces comprehensive test coverage for suppression functionality across multiple languages.
Key changes:
- Added XML comment syntax (
<!-- -->) to the comments configuration - Created new test class 
DevSkimRuleProcessorTests.cswith unit tests for suppression generation across various languages - Enhanced existing 
SuppressionsTest.cswith integration tests specifically for XML suppressions 
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description | 
|---|---|
| DevSkim-DotNet/Microsoft.DevSkim/resources/comments.json | Added XML comment syntax definition with prefix <!-- and suffix --> | 
| DevSkim-DotNet/Microsoft.DevSkim.Tests/SuppressionsTest.cs | Added XML-specific integration tests and TestContext property | 
| DevSkim-DotNet/Microsoft.DevSkim.Tests/DevSkimRuleProcessorTests.cs | New test class covering suppression generation for multiple languages including XML | 
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
        
          
                DevSkim-DotNet/Microsoft.DevSkim.Tests/DevSkimRuleProcessorTests.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
      | 
           This looks like it'd be the correct way to specify this to me. The test failures I think are a pipeline permission issue, maybe some setting needs to be updated?  | 
    
…evSkimRuleProcessorTests
          
 Yes, the assert statements are in the correct format. And Dan is checking on the pipeline permissions issue. I cleaned up the other unused test method as well.  | 
    
| 
           @vamsipolavarapu-msft To be able to merge you need to accept the CLA and also add an update to the changelog to satisfy the CI check.  | 
    
| 
           @microsoft-github-policy-service agree company="Microsoft"  | 
    
Enabling suppressions for XML files to address bug microsoft#588.
| 
           /azp run  | 
    
| 
          
Azure Pipelines successfully started running 3 pipeline(s). | 
    

Fix related to XML suppressions not working (#588).
Changes: