Closed guitarrapc closed 13 hours ago
You may be aware, but you can use a details tag by setting comment templates in a configuration file.
https://suzuki-shunsuke.github.io/tfcmt/config
But I think it's useful if we can use a details tag easily by option (environment variable, command line, configuration).
e.g.
terraform:
plan:
disable_label: false
wrap_warning_with_details: true
max_warning_lines: 10 # If the number of lines of warning exceeds this setting, the warning is wrapped with a details tag
I don't come up with good names instead of max_warning_lines
.
Thank you for the advice. I am aware of the config except for warnings :) I agree with you that using the config offers flexible configuration, however, modifying the config comes with an extra knowledge cost to keep it up to date with tfcmt versioning.
But I think it's useful if we can use a details tag easily by option (environment variable, command line, configuration).
I think it would be good to keep the default config but allow changing the comment style if needed. Key looks good to me.
The new option -skip-warning
has been added at v4.14.0.
https://github.com/suzuki-shunsuke/tfcmt/releases/tag/v4.14.0
This option is different from the request of this issue but maybe it is helpful if you want to suppress warning.
Thank you, I've use it and works as expected!
Looks like we can close the issue. Should I close it?
Thank you. Let me close this issue.
Feature Overview
Support using
<details>
tag if warnings exists, which is like whatChange Result (Click Me)
do.Why is the feature needed?
When there are many warnings, comments can become too long for the Warning section. Each warning requires 9 lines, so if there are 10 warnings, that totals 90 lines.
As you know, the best practice is to fix all warnings. However, some AWSProvider v5 resources may have potential issues that could leave warnings until v6.
Example Code
No response
note
No response