You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Diagnostics type variables are collections of diagnostics returned from code. They can include a mixture of Error or Warning diagnostics. Calling code can receive a diagnostics list and use HasErrors or HasWarnings to check if the diagnostics includes at least one diagnostic with that severity level.
It'd be useful to add a Warnings() method to Diagnostics that returns all the contained warning diagnostics within a new Diagnostics collection.
This task came up during a PR I was working on, and I figured it'd be a useful good first issue for anyone wanting an easy start to begin contributing.
Hi @momowind-su, if you’re interested in contributing to Terraform, please begin by reviewing the contributing guide and following the process outlined there. Thanks for your interest!
Terraform Version
Use Cases
Diagnostics type variables are collections of diagnostics returned from code. They can include a mixture of Error or Warning diagnostics. Calling code can receive a diagnostics list and use
HasErrors
orHasWarnings
to check if the diagnostics includes at least one diagnostic with that severity level.It'd be useful to add a
Warnings()
method toDiagnostics
that returns all the contained warning diagnostics within a new Diagnostics collection.Attempted Solutions
N/A
Proposal
I imagine the method would look very similar to:
terraform/internal/command/junit/junit.go
Lines 358 to 369 in 0bbcfdd
References
terraform test
output to include test failure details inside<failure>
elements, use the error message as themessage
attribute #36316 (comment)The text was updated successfully, but these errors were encountered: