Skip to content

Commit

Permalink
Rewrite DevSkim to use the Application Inspector Engine (#390)
Browse files Browse the repository at this point in the history
Refactor DevSkim to use AI engine.

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.
  • Loading branch information
gfs committed Aug 12, 2022
1 parent 8792ba1 commit 36bfd71
Show file tree
Hide file tree
Showing 304 changed files with 1,103 additions and 16,458 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/CLI-codeql-analysis.yml
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: 5.0.x
dotnet-version: 6.0.x

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
Expand All @@ -39,7 +39,6 @@ jobs:

- name: Build DevSkim CLI
run: |
dotnet ../RulePacker/devskim.dll pack ../rules Microsoft.DevSkim/Resources/devskim-rules.json
dotnet restore Microsoft.DevSkim.CLI
dotnet build Microsoft.DevSkim.CLI -c Release
working-directory: ./DevSkim-DotNet
Expand Down
27 changes: 14 additions & 13 deletions .github/workflows/VS-codeql-analysis.yml
@@ -1,17 +1,19 @@
name: "CodeQL (VS)"

on:
push:
branches:
- main
paths:
- DevSkim-DotNet/Microsoft.DevSkim/*
- DevSkim-DotNet/Microsoft.DevSkim.VSExtension/*
pull_request:
branches:
- main
schedule:
- cron: '0 3 * * 3'
# Temporarily disabled until VS extension rewrite
on: workflow_dispatch
# on:
# push:
# branches:
# - main
# paths:
# - DevSkim-DotNet/Microsoft.DevSkim/*
# - DevSkim-DotNet/Microsoft.DevSkim.VSExtension/*
# pull_request:
# branches:
# - main
# schedule:
# - cron: '0 3 * * 3'

jobs:
CodeQL-Build:
Expand All @@ -37,7 +39,6 @@ jobs:

- name: Build DevSkim VS Extension
run: |
dotnet ../RulePacker/devskim.dll pack ../rules Microsoft.DevSkim/Resources/devskim-rules.json
dotnet restore Microsoft.DevSkim.VSExtension
msbuild Microsoft.DevSkim.VSExtension /p:Configuration=Release /p:Platform=AnyCPU
working-directory: ./DevSkim-DotNet
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/publish-wasm-to-gh-pages.yml
@@ -1,8 +1,10 @@
name: Publish Blazor

on:
push:
branches: [ main ]
# Temporarily disabled until Blazor rewrite
on: workflow_dispatch
# on:
# push:
# branches: [ main ]
jobs:
build:

Expand All @@ -16,10 +18,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x

- name: Pack Rules
run: dotnet RulePacker/devskim.dll pack rules DevSkim-DotNet/Microsoft.DevSkim/Resources/devskim-rules.json
dotnet-version: 6.0.x

- name: Build
run: dotnet publish DevSkim-DotNet/Microsoft.DevSkim.Blazor --configuration Release --self-contained -r browser-wasm
Expand Down
5 changes: 2 additions & 3 deletions .gitignore
@@ -1,4 +1,3 @@
*.vsix
DevSkim-DotNet/Microsoft.DevSkim/Resources/devskim-rules.json
DevSkim-DotNet/Microsoft.DevSkim.Blazor/bin/
DevSkim-DotNet/Microsoft.DevSkim.Blazor/obj/
DevSkim-DotNet/Microsoft.DevSkim.sln.DotSettings.user
DevSkim-DotNet/Microsoft.DevSkim.CLI/output.json
24 changes: 9 additions & 15 deletions DevSkim-DotNet/.gitignore
@@ -1,17 +1,11 @@
Microsoft.DevSkim/bin
Microsoft.DevSkim/obj
Microsoft.DevSkim.Tests/bin
Microsoft.DevSkim.Tests/obj
Microsoft.DevSkim.CLI/bin
Microsoft.DevSkim.CLI/obj
Microsoft.DevSkim.CLI.Tests/bin
Microsoft.DevSkim.CLI.Tests/obj
Microsoft.DevSkim.VSExtension/bin
Microsoft.DevSkim.VSExtension/obj
Microsoft.DevSkim.VSExtension.Tests/bin
Microsoft.DevSkim.VSExtension.Tests/obj
TestResults
packages
# Editor Configs
.idea/
.vs/
.vscode/settings.json
*.log

# Build artifacts
**/obj/
**/bin/

# Test Artifacts
TestResults
10 changes: 0 additions & 10 deletions DevSkim-DotNet/Microsoft.DevSkim.Blazor/App.razor

This file was deleted.

24 changes: 0 additions & 24 deletions DevSkim-DotNet/Microsoft.DevSkim.Blazor/CodeFile.cs

This file was deleted.

This file was deleted.

This file was deleted.

184 changes: 0 additions & 184 deletions DevSkim-DotNet/Microsoft.DevSkim.Blazor/Pages/Index.razor

This file was deleted.

0 comments on commit 36bfd71

Please sign in to comment.