Skip to content

Commit ff27165

Browse files
Merge branch 'master' into aggregate-settings-file-exceptions
2 parents a1b7a8f + 88056ac commit ff27165

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

Engine/Commands/InvokeScriptAnalyzerCommand.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,12 +326,12 @@ protected override void BeginProcessing()
326326
? rulePaths
327327
: rulePaths.Concat(settingsCustomRulePath).ToArray();
328328
}
329-
catch (Exception e)
329+
catch (Exception exception)
330330
{
331331
this.ThrowTerminatingError(new ErrorRecord(
332-
e,
333-
"SettingsNotProcessable",
334-
ErrorCategory.NotSpecified,
332+
exception,
333+
"SETTINGS_ERROR",
334+
ErrorCategory.InvalidData,
335335
this.settings));
336336
}
337337

Engine/Strings.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@
238238
<value>Key {0} in the settings is not a string.</value>
239239
</data>
240240
<data name="WrongKeyHashTable" xml:space="preserve">
241-
<value>{0} is not a valid key in the settings hashtable. Valid keys are ExcludeRules, IncludeRules and Severity.</value>
241+
<value>{0} is not a valid key in the settings hashtable. Valid keys are CustomRulePath, ExcludeRules, IncludeRules, IncludeDefaultRules, RecurseCustomRulePath, Rules and Severity.</value>
242242
</data>
243243
<data name="WrongValueHashTable" xml:space="preserve">
244244
<value>Value {0} for key {1} has the wrong data type.</value>

docs/markdown/Invoke-ScriptAnalyzer.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -437,12 +437,14 @@ If the path, the file's or hashtable's content are invalid, it is ignored.
437437
The parameters and values in the profile take precedence over the same parameter and values specified at the command line.
438438
439439
A Script Analyzer profile file is a text file that contains a hash table with one or more of the following keys:
440-
-- Severity
441-
-- IncludeRules
442-
-- ExcludeRules
443-
-- Rules
440+
444441
-- CustomRulePath
442+
-- ExcludeRules
445443
-- IncludeDefaultRules
444+
-- IncludeRules
445+
-- RecurseCustomRulePath
446+
-- Rules
447+
-- Severity
446448
447449
The keys and values in the profile are interpreted as if they were standard parameters and parameter values of Invoke-ScriptAnalyzer.
448450

0 commit comments

Comments
 (0)