mirror of
https://github.com/terraform-docs/terraform-docs.git
synced 2026-03-27 04:48:33 +07:00
feat: Add new flag 'read-comments' to optionally process comments as description
fixes issue #552 - process description from comments Signed-off-by: Poojitha Bikki <50849668+poojitha-bikki@users.noreply.github.com> - fix module tests Signed-off-by: Poojitha Bikki <50849668+poojitha-bikki@users.noreply.github.com> - optionally read comments for output vars description Signed-off-by: Poojitha Bikki <50849668+poojitha-bikki@users.noreply.github.com> - set default to true Signed-off-by: Poojitha Bikki <50849668+poojitha-bikki@users.noreply.github.com> - run make docs Signed-off-by: Poojitha Bikki <50849668+poojitha-bikki@users.noreply.github.com> - change option name Signed-off-by: Poojitha Bikki <50849668+poojitha-bikki@users.noreply.github.com> - add option in doc generator; make docs Signed-off-by: Poojitha Bikki <50849668+poojitha-bikki@users.noreply.github.com> - add config 'ReadComments' Signed-off-by: Poojitha Bikki <50849668+poojitha-bikki@users.noreply.github.com> - Fix alphabetic order for 'ReadComments' setting Signed-off-by: Poojitha Bikki <50849668+poojitha-bikki@users.noreply.github.com> - add read-comments in docs Signed-off-by: Poojitha Bikki <50849668+poojitha-bikki@users.noreply.github.com> - add test for readcomments option Signed-off-by: Poojitha Bikki <50849668+poojitha-bikki@users.noreply.github.com> - update 'read-comments' flag description Co-authored-by: Khosrow Moossavi <khos2ow@gmail.com> Signed-off-by: Poojitha Bikki <50849668+poojitha-bikki@users.noreply.github.com>
This commit is contained in:
@@ -81,6 +81,8 @@ func NewCommand() *cobra.Command {
|
||||
cmd.PersistentFlags().BoolVar(&config.OutputValues.Enabled, "output-values", false, "inject output values into outputs (default false)")
|
||||
cmd.PersistentFlags().StringVar(&config.OutputValues.From, "output-values-from", "", "inject output values from file into outputs (default \"\")")
|
||||
|
||||
cmd.PersistentFlags().BoolVar(&config.Settings.ReadComments, "read-comments", true, "use comments as description when description is empty")
|
||||
|
||||
// formatter subcommands
|
||||
cmd.AddCommand(asciidoc.NewCommand(runtime, config))
|
||||
cmd.AddCommand(json.NewCommand(runtime, config))
|
||||
|
||||
Reference in New Issue
Block a user