-
Notifications
You must be signed in to change notification settings - Fork 115
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
Rewrite DevSkim to use the Application Inspector Engine #390
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Refactor DevSkim to use AI engine. I'm refactoring it in a separate project, which will then be tested against the original devskim using the same rules to validate behavior, then the "DevSkim.AI" project will be renamed back to "Microsoft.DevSkim" and the old version removed.
Trimmed down to the Analyze and Verify commands by leveraging the refactored AI based engine. Pack command is no longer needed. Multiple rules files are simply embedded. Catalogue command not implemented for now. I'm not clear on how useful it is. Test command not implemented for now. Also not clear how much use it sees.
Adds initial test to validate the default rules. Cleans up the gitignore in the dotnet dir.
CLI Analyze Now Runs and appears to be working. Remainder of Enums which used dashes have been renamed. Now load DevSkim's languages and comments rather than using App inspectors.
Confirmed via some manual testing that new implementation does not miss any matches the old one found. And in fact it finds some matches that were not appearing with old engine.
Requires the git command to be present on the path. Fix #148
public void DenamespacedRule() | ||
{ | ||
var content = @"<?xml version=""1.0"" encoding=""UTF-8""?> | ||
<project xmlns=""http://maven.apache.org/POM/4.0.0"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xsi:schemaLocation=""http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd""> |
Check failure
Code scanning / devskim
Insecure URL
Insecure URL
To allow refactored CLI build to work properly. Will be restored when rewritten extension is added back.
…into gfs/AiRewrite
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is intended to complete #367.
Fixes #389
Fixes #148
Fixes #364
Also planned for this refactor, but not present in this PR:
#384
#385
#383
#381
#343
#303
#289
#217