Skip to content

Aggregate exceptions when parsing a settings hashtable #1275

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

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
f8f8083
Annotatively research current state of exception handling surrounding…
travisclagrone Jun 18, 2019
b75dced
Throw a contextful terminating error if processing the argument of 'I…
travisclagrone Jun 18, 2019
6648344
Refine id and category of error for when processing value of `Invoke-…
travisclagrone Jun 18, 2019
0472359
Revert "Annotatively research current state of exception handling sur…
travisclagrone Jun 18, 2019
a012dec
Do not attempt id and category inference for the error to throw when …
travisclagrone Jun 18, 2019
88ab1ec
Remove `using System.IO`
travisclagrone Jun 23, 2019
2faab31
Revert "Remove `using System.IO`"
travisclagrone Jun 23, 2019
05f6795
Remove unused local variable, 'validKeys'
travisclagrone Jun 22, 2019
cc3323b
Remove GetDictionaryFromHashtable(Hashtable)
travisclagrone Jun 22, 2019
70035d6
Validate that no key is null
travisclagrone Jun 22, 2019
e3037f7
Validate that every key is a string
travisclagrone Jun 22, 2019
b6ac61b
Validate that no value is null
travisclagrone Jun 22, 2019
4cf6aca
Validate that every key is unique, ignoring case
travisclagrone Jun 22, 2019
3a5380b
Extract validation of "Rules" setting dictionary type from method Str…
travisclagrone Jun 23, 2019
4ace3b9
Extract validation of dictionary key case-insensitivity from method S…
travisclagrone Jun 23, 2019
cfd7037
Extract validation of "Rules" setting values dictionary types from me…
travisclagrone Jun 23, 2019
0736242
Remove method Settings.ConvertToRuleArgumentType(Dictionary<string, o…
travisclagrone Jun 23, 2019
c1e9da5
Merge branch 'refactor-out-ConvertToRuleArgumentType' into refactor-o…
travisclagrone Jun 23, 2019
ef510c9
Refactor validation of setting "Rules" type to accommodate finer-fide…
travisclagrone Jun 23, 2019
cd031f8
Validate that each key of the "Rules" setting is nonnull
travisclagrone Jun 23, 2019
0193e28
Validate that each key of the "Rules" setting is a string
travisclagrone Jun 23, 2019
74df2e1
Validate that each key of the "Rules" setting is unique, ignoring case
travisclagrone Jun 23, 2019
5baba1e
Validate that each value of the "Rules" setting is nonnull
travisclagrone Jun 23, 2019
b495b24
Refactor validation that each value of the "Rules" setting is a dicti…
travisclagrone Jun 23, 2019
f55735f
Validate that each setting rule argument key is nonnull
travisclagrone Jun 23, 2019
062bbd3
Validate that each setting rule argument key is of type string
travisclagrone Jun 23, 2019
051f345
Validate that each setting rule argument key is unique, ignore case
travisclagrone Jun 23, 2019
ac1b17a
Validate that each setting rule argument value is nonnull
travisclagrone Jun 23, 2019
1cfaa67
Assign parse of settings "Rules" to Settings.ruleArguments
travisclagrone Jun 23, 2019
072e2f5
Merge branch 'refactor-out-GetDictionaryFromHashTable' into aggregate…
travisclagrone Jun 23, 2019
98ec8f2
Validate (explicitly) that each setting key is nonnnull
travisclagrone Jun 23, 2019
5a65743
Clean up validation that each setting key is a string type
travisclagrone Jun 23, 2019
7862461
Clean up validation that each setting key is unique, ignoring case
travisclagrone Jun 23, 2019
526ed3a
Clean up validation that each setting value is nonnull
travisclagrone Jun 23, 2019
ccbeccd
Clean up validation that the value for the 'Rules' setting is a dicti…
travisclagrone Jun 23, 2019
5c56c85
Clean up validation that each 'Rules' setting rule key is nonnull
travisclagrone Jun 23, 2019
1adb84a
Clean up validation that each setting rule key is a string type
travisclagrone Jun 23, 2019
feb0409
Clean up validation that each 'Rules' setting key is unique, ignoring…
travisclagrone Jun 23, 2019
5a721ba
Clean up validation that each 'Rules' setting rule value is nonnull
travisclagrone Jun 23, 2019
0f0f4c6
Clean up validation that each 'Rules' setting rule value is a diction…
travisclagrone Jun 23, 2019
8dd5350
Refactor the new 'Setting*' resource strings standard format for exte…
travisclagrone Jun 23, 2019
19fc6d4
Nest remaining successor loops for parsing 'Rules' setting
travisclagrone Jun 23, 2019
9ba1ee9
Remove two now-unused resource strings
travisclagrone Jun 23, 2019
b2ac862
Clean up validation that 'Rules' setting rule argument key is nonnull
travisclagrone Jun 23, 2019
63b5479
Clean up validation that each 'Rules' setting rule argument key is a …
travisclagrone Jun 23, 2019
07cb4e3
Retroactively invoke String.ToLowerInvariant() on ruleName and argume…
travisclagrone Jun 23, 2019
c323a0b
Clean up validation that each 'Rules' setting rule argument key is un…
travisclagrone Jun 24, 2019
12e3652
Clean up validation that each 'Rules' setting rule argument value is …
travisclagrone Jun 24, 2019
237d226
Merge branch 'nest-Rules-setting-loops' into aggregate-settings-file-…
travisclagrone Jun 24, 2019
82bc7d0
Add temp TODOs
travisclagrone Jun 24, 2019
39d0063
Rename GetData interface
travisclagrone Jun 24, 2019
ceda89f
Add TODOs in GetData (now ParseSettingValueAsStrings)
travisclagrone Jun 24, 2019
9f6e324
Validate that the string(s) setting value is nonnull
travisclagrone Jun 24, 2019
6ced092
Convert a single string value to an unary array
travisclagrone Jun 24, 2019
7b85fbe
Validate that the setting value is a collection
travisclagrone Jun 24, 2019
1433176
Validate that each strings setting value element is nonnull
travisclagrone Jun 24, 2019
17a3a42
Validate that each strings setting value element is a string type
travisclagrone Jun 24, 2019
f3a35d2
Tie off refactor GetData, and name it ParseSettingValueStringOrStrings
travisclagrone Jun 24, 2019
82a4c44
Merge branch 'refactor-GetData_object_string' into aggregate-settings…
travisclagrone Jun 24, 2019
6d974f0
Debug overzealous application of string.ToLowerInvariant()
travisclagrone Jun 24, 2019
1c1022c
Standardize legacy method capitalization
travisclagrone Jun 24, 2019
fdc85cf
Update completed TODO comments
travisclagrone Jun 24, 2019
1177b9a
Debug capitalization of setting names in exception messages
travisclagrone Jun 24, 2019
c588917
Scaffold method ParseSettingValueBoolean(object, string)
travisclagrone Jun 24, 2019
275c7a8
Parse settings 'IncludeDefaultRules' and 'RecurseCustomRulePath' with…
travisclagrone Jun 24, 2019
4e68735
Validate that boolean settings value is nonnull
travisclagrone Jun 24, 2019
754c008
Validate that boolean setting value is a boolean type
travisclagrone Jun 24, 2019
be955e3
Complete parsing of boolean setting value
travisclagrone Jun 24, 2019
26a7dde
Debug field assignment when parsing setting 'RecurseCustomRulePath'
travisclagrone Jun 24, 2019
6d89b85
Merge branch 'define-method-ParseSettingValueBoolean_object_string' i…
travisclagrone Jun 24, 2019
dca15a8
Clean up unrecognized setting key handling
travisclagrone Jun 25, 2019
ea0d1b6
Aggregate exceptions within ParseSetingsHashtable(Hashtable)
travisclagrone Jun 25, 2019
f43dc67
Aggregate exceptions in ParseSettingValueBoolean(object, string) by a…
travisclagrone Jun 25, 2019
09222c6
Aggregate exceptions in ParseSettingValueStringOrStrings(object, stri…
travisclagrone Jun 25, 2019
a1b7a8f
Merge branch 'implement-AggregateException-for-ParseSettingsHashtable…
travisclagrone Jun 25, 2019
ff27165
Merge branch 'master' into aggregate-settings-file-exceptions
travisclagrone Jun 30, 2019
cae559c
Debug exceptional element index incrementing in method Settings.Parse…
travisclagrone Jun 30, 2019
cf2504b
Trim trailing whitespace
travisclagrone Jul 4, 2019
c7ff89b
Do not `continue` if a "Rules" setting key is non-unique
travisclagrone Jul 5, 2019
d54384f
Refactor `Settings` constructor to use the guard chain pattern
travisclagrone Jul 5, 2019
25710df
Refactor `ParseSettingsFile(string) => void` to `static ParseSettings…
travisclagrone Jul 5, 2019
215f0e2
Fix sequencing of invocation of `ParseSettingsFileToHashtable` in `Se…
travisclagrone Jul 5, 2019
417347a
Merge branch 'simplify-settings-constructor' into aggregate-settings-…
travisclagrone Jul 5, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Engine/Commands/InvokeScriptAnalyzerCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Collections.ObjectModel;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that this is the only change in this file, I'm assuming this isn't used and can be taken out?

using System.Linq;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
Expand Down
Loading