From 34f9aa485fb9ad8c746a236876d8371203b185d0 Mon Sep 17 00:00:00 2001 From: Kapil Borle Date: Fri, 11 Mar 2016 21:27:00 -0800 Subject: [PATCH 1/2] Fix loading custom rules that do not have comment help Add conditions to check if indexing does not take place on a null valued Value property. If a PowerShell based custom rule does't have comment based help, the engine throws an error. This occurs because the lack of comment based help results in a null value for the Value property of the dynamically typed description variable. --- Engine/ScriptAnalyzer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Engine/ScriptAnalyzer.cs b/Engine/ScriptAnalyzer.cs index 1e7227b47..07b891ae3 100644 --- a/Engine/ScriptAnalyzer.cs +++ b/Engine/ScriptAnalyzer.cs @@ -764,8 +764,8 @@ private List GetExternalRule(string[] moduleNames) { dynamic description = helpContent[0].Properties["Description"]; - if (null != description) - { + if (null != description && null != description.Value && description.Value.GetType().IsArray) + { desc = description.Value[0].Text; } } From 7d766f14d23ab3da5409ebe163f7ff6e021fcbfe Mon Sep 17 00:00:00 2001 From: Kapil Borle Date: Mon, 14 Mar 2016 15:08:24 -0700 Subject: [PATCH 2/2] Change appveyor os image to WMF 5 --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 50865ac4c..6c3e376d6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ -# WS2012R2 image with April WMF5.0 -os: unstable +# Image with WMF5.0 RTM +os: "WMF 5" # clone directory clone_folder: c:\projects\psscriptanalyzer