Skip to content

Change to not throw when a validator is not of type AttributeValidator#431

Merged
natemcmaster merged 1 commit intonatemcmaster:mainfrom
skirchner989:FixInvalidCastToAttributeValidator
Jan 22, 2021
Merged

Change to not throw when a validator is not of type AttributeValidator#431
natemcmaster merged 1 commit intonatemcmaster:mainfrom
skirchner989:FixInvalidCastToAttributeValidator

Conversation

@skirchner989
Copy link
Contributor

Found an issue adding validators via the builder that were not of the AttributeValidator type.

This is the error encountered:

System.InvalidCastException: Unable to cast object of type 'ArgumentMustBeValidEnvironmentContext' to type 'McMaster.Extensions.CommandLineUtils.Validation.AttributeValidator'.
   at System.Linq.Enumerable.<CastIterator>d__97`1.MoveNext()

@codecov
Copy link

codecov bot commented Jan 20, 2021

Codecov Report

Merging #431 (e691cc3) into main (1d6e1a5) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #431   +/-   ##
=======================================
  Coverage   82.00%   82.00%           
=======================================
  Files         106      106           
  Lines        3284     3284           
=======================================
  Hits         2693     2693           
  Misses        591      591           
Impacted Files Coverage Δ
...mandLineUtils/HelpText/DefaultHelpTextGenerator.cs 99.34% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1d6e1a5...e691cc3. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants