terraform/tfdiags
Martin Atkins c06675c616 command: New -compact-warnings option
When warnings appear in isolation (not accompanied by an error) it's
reasonable to want to defer resolving them for a while because they are
not actually blocking immediate work.

However, our warning messages tend to be long by default in order to
include all of the necessary context to understand the implications of
the warning, and that can make them overwhelming when combined with other
output.

As a compromise, this adds a new CLI option -compact-warnings which is
supported for all the main operation commands and which uses a more
compact format to print out warnings as long as they aren't also
accompanied by errors.

The default remains unchanged except that the threshold for consolidating
warning messages is reduced to one so that we'll now only show one of
each distinct warning summary.

Full warning messages are always shown if there's at least one error
included in the diagnostic set too, because in that case the warning
message could contain additional context to help understand the error.
2019-12-10 11:53:14 -08:00
..
config_traversals.go tfdiags: FormatErrorPrefixed 2018-10-16 19:14:11 -07:00
consolidate_warnings.go command: New -compact-warnings option 2019-12-10 11:53:14 -08:00
consolidate_warnings_test.go command: New -compact-warnings option 2019-12-10 11:53:14 -08:00
contextual.go fix diagnostics handling 2019-11-21 09:14:50 -05:00
contextual_test.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
diagnostic.go Version tools per Go convention under tools.go 2019-10-17 22:23:39 +02:00
diagnostic_base.go tfdiags: Expose expression evaluation information from diagnostics 2018-10-18 17:12:01 -07:00
diagnostics.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
diagnostics_test.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
doc.go tfdiags: new package for normalizing error and warning messages 2017-10-06 11:46:07 -07:00
error.go tfdiags: Expose expression evaluation information from diagnostics 2018-10-18 17:12:01 -07:00
hcl.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
rpc_friendly.go tfdiags: Expose expression evaluation information from diagnostics 2018-10-18 17:12:01 -07:00
rpc_friendly_test.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
severity_string.go stringer: Regenerate files with latest version 2019-05-13 15:34:27 +01:00
simple_warning.go tfdiags: Expose expression evaluation information from diagnostics 2018-10-18 17:12:01 -07:00
source_range.go tfdiags: SourceRange.StartString 2017-10-06 11:46:07 -07:00
sourceless.go tfdiags: Simple helper for creating "sourceless" diagnostics 2018-10-16 18:24:10 -07:00