diff --git a/DevSkim-DotNet/Microsoft.DevSkim.LanguageServer/ConfigHelpers.cs b/DevSkim-DotNet/Microsoft.DevSkim.LanguageServer/ConfigHelpers.cs index 690f08b1..79e550e2 100644 --- a/DevSkim-DotNet/Microsoft.DevSkim.LanguageServer/ConfigHelpers.cs +++ b/DevSkim-DotNet/Microsoft.DevSkim.LanguageServer/ConfigHelpers.cs @@ -41,7 +41,7 @@ internal static void SetScannerSettings(IConfiguration configuration) StaticScannerSettings.RuleProcessorOptions = OptionsFromConfiguration(configuration); StaticScannerSettings.IgnoreDefaultRuleSet = configuration.GetValue($"{Section}:ignores:ignoreDefaultRules"); StaticScannerSettings.CustomRulePaths = CompileList(configuration, "rules:customRulesPaths"); - StaticScannerSettings.IgnoreRuleIds = CompileList(configuration, "ignores:ignoreRuleList"); + StaticScannerSettings.IgnoreRuleIds = configuration.GetValue($"{Section}:ignores:ignoreRulesList").Split(','); List fileIgnoreRegexes = new(); foreach (string potentialRegex in CompileList(configuration, "ignores:ignoreFiles")) { diff --git a/DevSkim-DotNet/Microsoft.DevSkim.LanguageServer/Program.cs b/DevSkim-DotNet/Microsoft.DevSkim.LanguageServer/Program.cs index a6d46271..ec8d70b8 100644 --- a/DevSkim-DotNet/Microsoft.DevSkim.LanguageServer/Program.cs +++ b/DevSkim-DotNet/Microsoft.DevSkim.LanguageServer/Program.cs @@ -17,22 +17,21 @@ public static void Main(string[] args) private static async Task MainAsync(string[] args) { - #if DEBUG - // Debugger.Launch(); - // while (!Debugger.IsAttached) - // { - // await Task.Delay(100); - // } +#if DEBUG + //while (!Debugger.IsAttached) + //{ + // await Task.Delay(100); + //} Log.Logger = new LoggerConfiguration() .Enrich.FromLogContext() .WriteTo.File("devskim-server-log.txt", rollingInterval: RollingInterval.Day) .MinimumLevel.Verbose() .CreateLogger(); - #else - // Creates a "silent" logger - Log.Logger = new LoggerConfiguration().CreateLogger(); - #endif +#else + // Creates a "silent" logger + Log.Logger = new LoggerConfiguration().CreateLogger(); +#endif Log.Logger.Debug("Configuring server..."); IObserver workDone = null!; diff --git a/DevSkim-VSCode-Plugin/package-lock.json b/DevSkim-VSCode-Plugin/package-lock.json index c2ab3bab..04ad5993 100644 --- a/DevSkim-VSCode-Plugin/package-lock.json +++ b/DevSkim-VSCode-Plugin/package-lock.json @@ -13,7 +13,7 @@ "@types/node": "^14.x", "@typescript-eslint/eslint-plugin": "^5.10.1", "@typescript-eslint/parser": "^5.10.1", - "@vscode/vsce": "^2.14.0", + "@vscode/vsce": "^2.18.0", "esbuild": "^0.14.14", "eslint": "^8.8.0", "nerdbank-gitversioning": "^3.4.255", @@ -304,9 +304,9 @@ } }, "node_modules/@vscode/vsce": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.17.0.tgz", - "integrity": "sha512-W4HN5MtTVj/mroQU1d82bUEeWM3dUykMFnMYZPtZ6jrMiHN1PUoN3RGcS896N0r2rIq8KpWDtufcQHgK8VfgpA==", + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.18.0.tgz", + "integrity": "sha512-tUA3XoKx5xjoi3EDcngk0VUYMhvfXLhS4s7CntpLPh1qtLYtgSCexTIMUHkCy6MqyozRW98bdW3a2yHPEADRnQ==", "dev": true, "dependencies": { "azure-devops-node-api": "^11.0.1", @@ -315,6 +315,7 @@ "commander": "^6.1.0", "glob": "^7.0.6", "hosted-git-info": "^4.0.2", + "jsonc-parser": "^3.2.0", "leven": "^3.1.0", "markdown-it": "^12.3.2", "mime": "^1.3.4", @@ -1985,6 +1986,12 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, + "node_modules/jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "dev": true + }, "node_modules/keytar": { "version": "7.7.0", "resolved": "https://registry.npmjs.org/keytar/-/keytar-7.7.0.tgz", @@ -3349,9 +3356,9 @@ } }, "@vscode/vsce": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.17.0.tgz", - "integrity": "sha512-W4HN5MtTVj/mroQU1d82bUEeWM3dUykMFnMYZPtZ6jrMiHN1PUoN3RGcS896N0r2rIq8KpWDtufcQHgK8VfgpA==", + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.18.0.tgz", + "integrity": "sha512-tUA3XoKx5xjoi3EDcngk0VUYMhvfXLhS4s7CntpLPh1qtLYtgSCexTIMUHkCy6MqyozRW98bdW3a2yHPEADRnQ==", "dev": true, "requires": { "azure-devops-node-api": "^11.0.1", @@ -3360,6 +3367,7 @@ "commander": "^6.1.0", "glob": "^7.0.6", "hosted-git-info": "^4.0.2", + "jsonc-parser": "^3.2.0", "keytar": "^7.7.0", "leven": "^3.1.0", "markdown-it": "^12.3.2", @@ -4603,6 +4611,12 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, + "jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "dev": true + }, "keytar": { "version": "7.7.0", "resolved": "https://registry.npmjs.org/keytar/-/keytar-7.7.0.tgz", diff --git a/DevSkim-VSCode-Plugin/package.json b/DevSkim-VSCode-Plugin/package.json index 5900ac75..9b4e5b13 100644 --- a/DevSkim-VSCode-Plugin/package.json +++ b/DevSkim-VSCode-Plugin/package.json @@ -73,8 +73,7 @@ "title": "Scan all files in the workspace" } ], - "configuration": - [ + "configuration": [ { "order": 10, "id": "MS-CST-E.vscode-devskim.rules", @@ -176,7 +175,7 @@ } }, { - "order": 40, + "order": 40, "id": "MS-CST-E.vscode-devskim.ignores", "title": "Ignores", "properties": { @@ -238,7 +237,7 @@ "type": "boolean", "default": true, "description": "Scan files on save." - }, + }, "MS-CST-E.vscode-devskim.triggers.scanOnChange": { "type": "boolean", "default": true, @@ -271,10 +270,10 @@ ], "scripts": { "clean": "npm run clean:net && npm run clean:out && npm run clean:modules && npm run clean:vsix", - "clean:net": "npx --quiet rimraf devskimBinaries", - "clean:out": "npx --quiet rimraf **/out **/tsconfig.tsbuildinfo", - "clean:modules": "npx --quiet rimraf **/node_modules", - "clean:vsix": "npx --quiet rimraf *.vsix", + "clean:net": "npx --quiet -y rimraf devskimBinaries", + "clean:out": "npx --quiet -y rimraf --glob **/out && npx --quiet -y rimraf --glob **/tsconfig.tsbuildinfo", + "clean:modules": "npx --quiet -y rimraf --glob **/node_modules", + "clean:vsix": "npx --quiet -y rimraf --glob *.vsix", "net-setup": "dotnet publish -c Debug -f net7.0 ../DevSkim-DotNet/Microsoft.DevSkim.LanguageServer -o devskimBinaries", "net-setup:release": "dotnet publish -c Release -f net7.0 ../DevSkim-DotNet/Microsoft.DevSkim.LanguageServer -o devskimBinaries", "setup": "npm install && npm run net-setup", @@ -289,7 +288,8 @@ "esbuild-base": "esbuild ./client/extension.ts --bundle --outfile=client/out/extension.js --external:vscode --format=cjs --platform=node", "esbuild": "npm run esbuild-base -- --sourcemap", "esbuild-watch": "npm run esbuild-base -- --sourcemap --watch", - "pack-ext": "npm run clean:out && npm run clean:modules && npm run setup:release && node ./scripts/setPackageVersion.js && ((node ./scripts/checkPreReleaseFlag.js && (vsce package --pre-release || echo 'Pre-Release build failed')) || (vsce package || echo 'Release build failed')) && node ./scripts/resetPackageVersion.js" + "pack-ext": "npm run clean:out && npm run clean:modules && npm run setup:release && node ./scripts/setPackageVersion.js && ((node ./scripts/checkPreReleaseFlag.js && (vsce package --pre-release || echo 'Pre-Release build failed')) || (vsce package || echo 'Release build failed')) && node ./scripts/resetPackageVersion.js", + "pack-ext:debug": "npm run clean:out && npm run clean:modules && npm run setup && node ./scripts/setPackageVersion.js && ((node ./scripts/checkPreReleaseFlag.js && (vsce package --pre-release || echo 'Pre-Release build failed')) || (vsce package || echo 'Release build failed')) && node ./scripts/resetPackageVersion.js" }, "devDependencies": { "@types/node": "^14.x", @@ -299,6 +299,6 @@ "eslint": "^8.8.0", "nerdbank-gitversioning": "^3.4.255", "typescript": "^4.5.5", - "@vscode/vsce": "^2.14.0" + "@vscode/vsce": "^2.18.0" } }