From 0fe48691e8fcdfc5e50633c042db5e1323987d17 Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Tue, 27 Aug 2019 13:55:00 +0200 Subject: [PATCH] ignore doc fields containing `TODO` --- cmd/struct-markdown/main.go | 4 ++++ .../partials/builder/qemu/_Config-not-required.html.md | 5 ----- .../virtualbox/common/_SSHConfig-not-required.html.md | 3 --- .../builder/vmware/common/_SSHConfig-not-required.html.md | 8 -------- 4 files changed, 4 insertions(+), 16 deletions(-) delete mode 100644 website/source/partials/builder/vmware/common/_SSHConfig-not-required.html.md diff --git a/cmd/struct-markdown/main.go b/cmd/struct-markdown/main.go index d2514d3d2..ccf80b47c 100644 --- a/cmd/struct-markdown/main.go +++ b/cmd/struct-markdown/main.go @@ -105,6 +105,10 @@ func main() { } else { docs = strings.Join(camelcase.Split(field.Names[0].Name), " ") } + + if strings.Contains(docs, "TODO") { + continue + } fieldType := string(b[field.Type.Pos()-1 : field.Type.End()-1]) fieldType = strings.ReplaceAll(fieldType, "*", `\*`) diff --git a/website/source/partials/builder/qemu/_Config-not-required.html.md b/website/source/partials/builder/qemu/_Config-not-required.html.md index 9f1401434..07ac4256a 100644 --- a/website/source/partials/builder/qemu/_Config-not-required.html.md +++ b/website/source/partials/builder/qemu/_Config-not-required.html.md @@ -216,9 +216,4 @@ the new virtual machine. By default this is packer-BUILDNAME, where "BUILDNAME" is the name of the build. Currently, no file extension will be used unless it is specified in this option. - -- `ssh_wait_timeout` (time.Duration) - These are deprecated, but we keep them around for BC - TODO(@mitchellh): remove - -- `run_once` (bool) - TODO(mitchellh): deprecate \ No newline at end of file diff --git a/website/source/partials/builder/virtualbox/common/_SSHConfig-not-required.html.md b/website/source/partials/builder/virtualbox/common/_SSHConfig-not-required.html.md index 0db417ad5..ac86a934d 100644 --- a/website/source/partials/builder/virtualbox/common/_SSHConfig-not-required.html.md +++ b/website/source/partials/builder/virtualbox/common/_SSHConfig-not-required.html.md @@ -10,7 +10,4 @@ - `ssh_skip_nat_mapping` (bool) - Defaults to false. When enabled, Packer does not setup forwarded port mapping for SSH requests and uses ssh_port on the host to communicate to the virtual machine. - -- `ssh_wait_timeout` (time.Duration) - These are deprecated, but we keep them around for BC - TODO(@mitchellh): remove \ No newline at end of file diff --git a/website/source/partials/builder/vmware/common/_SSHConfig-not-required.html.md b/website/source/partials/builder/vmware/common/_SSHConfig-not-required.html.md deleted file mode 100644 index a744bbde8..000000000 --- a/website/source/partials/builder/vmware/common/_SSHConfig-not-required.html.md +++ /dev/null @@ -1,8 +0,0 @@ - - -- `ssh_skip_request_pty` (bool) - These are deprecated, but we keep them around for BC - TODO(@mitchellh): remove - -- `ssh_wait_timeout` (time.Duration) - These are deprecated, but we keep them around for BC - TODO(@mitchellh): remove - \ No newline at end of file