From 63750c1784493b1d9e5a3059bef40325b2e501b7 Mon Sep 17 00:00:00 2001 From: Khosrow Moossavi Date: Thu, 15 Oct 2020 18:51:30 -0400 Subject: [PATCH] fix: Normalize last empty line of the generated output (#336) Generated output will not have any empty line or carriage return at the end of the last line and one carriage return (\n) will be added when we print that to stdout. Signed-off-by: Khosrow Moossavi --- docs/FORMATS_GUIDE.md | 2 +- docs/formats/asciidoc-document.md | 4 +--- docs/formats/asciidoc-table.md | 4 +--- docs/formats/asciidoc.md | 2 +- docs/formats/json.md | 3 +-- docs/formats/markdown-document.md | 4 +--- docs/formats/markdown-table.md | 4 +--- docs/formats/markdown.md | 2 +- docs/formats/pretty.md | 3 +-- docs/formats/tfvars-hcl.md | 3 +-- docs/formats/tfvars-json.md | 3 +-- docs/formats/tfvars.md | 2 +- docs/formats/toml.md | 4 +--- docs/formats/xml.md | 3 +-- docs/formats/yaml.md | 3 +-- .../testdata/asciidoc/document-HeaderFromADOCFile.golden | 2 +- .../format/testdata/asciidoc/document-HeaderFromMDFile.golden | 2 +- .../format/testdata/asciidoc/document-HeaderFromTFFile.golden | 2 +- .../testdata/asciidoc/document-HeaderFromTXTFile.golden | 2 +- .../testdata/asciidoc/document-IndentationAboveAllowed.golden | 2 +- .../testdata/asciidoc/document-IndentationBelowAllowed.golden | 2 +- .../testdata/asciidoc/document-IndentationOfFour.golden | 2 +- internal/format/testdata/asciidoc/document-NoHeader.golden | 2 +- internal/format/testdata/asciidoc/document-NoInputs.golden | 2 +- internal/format/testdata/asciidoc/document-NoOutputs.golden | 2 +- internal/format/testdata/asciidoc/document-NoProviders.golden | 2 +- .../format/testdata/asciidoc/document-NoRequirements.golden | 2 +- internal/format/testdata/asciidoc/document-OnlyHeader.golden | 2 +- internal/format/testdata/asciidoc/document-OnlyInputs.golden | 2 +- internal/format/testdata/asciidoc/document-OnlyOutputs.golden | 2 +- .../format/testdata/asciidoc/document-OnlyProviders.golden | 2 +- .../format/testdata/asciidoc/document-OnlyRequirements.golden | 2 +- .../format/testdata/asciidoc/document-OutputValues.golden | 2 +- .../asciidoc/document-OutputValuesNoSensitivity.golden | 2 +- internal/format/testdata/asciidoc/document-SortByName.golden | 2 +- .../format/testdata/asciidoc/document-SortByRequired.golden | 2 +- internal/format/testdata/asciidoc/document-SortByType.golden | 2 +- .../format/testdata/asciidoc/document-WithRequired.golden | 2 +- internal/format/testdata/asciidoc/document.golden | 2 +- .../format/testdata/asciidoc/table-HeaderFromADOCFile.golden | 2 +- .../format/testdata/asciidoc/table-HeaderFromMDFile.golden | 2 +- .../format/testdata/asciidoc/table-HeaderFromTFFile.golden | 2 +- .../format/testdata/asciidoc/table-HeaderFromTXTFile.golden | 2 +- .../testdata/asciidoc/table-IndentationAboveAllowed.golden | 2 +- .../testdata/asciidoc/table-IndentationBelowAllowed.golden | 2 +- .../format/testdata/asciidoc/table-IndentationOfFour.golden | 2 +- internal/format/testdata/asciidoc/table-NoHeader.golden | 2 +- internal/format/testdata/asciidoc/table-NoInputs.golden | 2 +- internal/format/testdata/asciidoc/table-NoOutputs.golden | 2 +- internal/format/testdata/asciidoc/table-NoProviders.golden | 2 +- internal/format/testdata/asciidoc/table-NoRequirements.golden | 2 +- internal/format/testdata/asciidoc/table-OnlyHeader.golden | 2 +- internal/format/testdata/asciidoc/table-OnlyInputs.golden | 2 +- internal/format/testdata/asciidoc/table-OnlyOutputs.golden | 2 +- internal/format/testdata/asciidoc/table-OnlyProviders.golden | 2 +- .../format/testdata/asciidoc/table-OnlyRequirements.golden | 2 +- internal/format/testdata/asciidoc/table-OutputValues.golden | 2 +- .../testdata/asciidoc/table-OutputValuesNoSensitivity.golden | 2 +- internal/format/testdata/asciidoc/table-SortByName.golden | 2 +- internal/format/testdata/asciidoc/table-SortByRequired.golden | 2 +- internal/format/testdata/asciidoc/table-SortByType.golden | 2 +- internal/format/testdata/asciidoc/table-WithRequired.golden | 2 +- internal/format/testdata/asciidoc/table.golden | 2 +- .../format/testdata/markdown/document-EscapeCharacters.golden | 2 +- .../testdata/markdown/document-HeaderFromADOCFile.golden | 2 +- .../format/testdata/markdown/document-HeaderFromMDFile.golden | 2 +- .../format/testdata/markdown/document-HeaderFromTFFile.golden | 2 +- .../testdata/markdown/document-HeaderFromTXTFile.golden | 2 +- .../testdata/markdown/document-IndentationAboveAllowed.golden | 2 +- .../testdata/markdown/document-IndentationBelowAllowed.golden | 2 +- .../testdata/markdown/document-IndentationOfFour.golden | 2 +- internal/format/testdata/markdown/document-NoHeader.golden | 2 +- internal/format/testdata/markdown/document-NoInputs.golden | 2 +- internal/format/testdata/markdown/document-NoOutputs.golden | 2 +- internal/format/testdata/markdown/document-NoProviders.golden | 2 +- .../format/testdata/markdown/document-NoRequirements.golden | 2 +- internal/format/testdata/markdown/document-OnlyHeader.golden | 2 +- internal/format/testdata/markdown/document-OnlyInputs.golden | 2 +- internal/format/testdata/markdown/document-OnlyOutputs.golden | 2 +- .../format/testdata/markdown/document-OnlyProviders.golden | 2 +- .../format/testdata/markdown/document-OnlyRequirements.golden | 2 +- .../format/testdata/markdown/document-OutputValues.golden | 2 +- .../markdown/document-OutputValuesNoSensitivity.golden | 2 +- internal/format/testdata/markdown/document-SortByName.golden | 2 +- .../format/testdata/markdown/document-SortByRequired.golden | 2 +- internal/format/testdata/markdown/document-SortByType.golden | 2 +- .../format/testdata/markdown/document-WithRequired.golden | 2 +- internal/format/testdata/markdown/document.golden | 2 +- .../format/testdata/markdown/table-EscapeCharacters.golden | 2 +- .../format/testdata/markdown/table-HeaderFromADOCFile.golden | 2 +- .../format/testdata/markdown/table-HeaderFromMDFile.golden | 2 +- .../format/testdata/markdown/table-HeaderFromTFFile.golden | 2 +- .../format/testdata/markdown/table-HeaderFromTXTFile.golden | 2 +- .../testdata/markdown/table-IndentationAboveAllowed.golden | 2 +- .../testdata/markdown/table-IndentationBelowAllowed.golden | 2 +- .../format/testdata/markdown/table-IndentationOfFour.golden | 2 +- internal/format/testdata/markdown/table-NoHeader.golden | 2 +- internal/format/testdata/markdown/table-NoInputs.golden | 2 +- internal/format/testdata/markdown/table-NoOutputs.golden | 2 +- internal/format/testdata/markdown/table-NoProviders.golden | 2 +- internal/format/testdata/markdown/table-NoRequirements.golden | 2 +- internal/format/testdata/markdown/table-OnlyHeader.golden | 2 +- internal/format/testdata/markdown/table-OnlyInputs.golden | 2 +- internal/format/testdata/markdown/table-OnlyOutputs.golden | 2 +- internal/format/testdata/markdown/table-OnlyProviders.golden | 2 +- .../format/testdata/markdown/table-OnlyRequirements.golden | 2 +- internal/format/testdata/markdown/table-OutputValues.golden | 2 +- .../testdata/markdown/table-OutputValuesNoSensitivity.golden | 2 +- internal/format/testdata/markdown/table-SortByName.golden | 2 +- internal/format/testdata/markdown/table-SortByRequired.golden | 2 +- internal/format/testdata/markdown/table-SortByType.golden | 2 +- internal/format/testdata/markdown/table-WithRequired.golden | 2 +- internal/format/testdata/markdown/table.golden | 2 +- internal/format/testdata/toml/toml-Empty.golden | 2 +- internal/format/testdata/toml/toml-HeaderFromFile.golden | 2 +- internal/format/testdata/toml/toml-NoHeader.golden | 2 +- internal/format/testdata/toml/toml-NoInputs.golden | 2 +- internal/format/testdata/toml/toml-NoOutputs.golden | 2 +- internal/format/testdata/toml/toml-NoProviders.golden | 2 +- internal/format/testdata/toml/toml-NoRequirements.golden | 2 +- internal/format/testdata/toml/toml-OnlyHeader.golden | 2 +- internal/format/testdata/toml/toml-OnlyInputs.golden | 2 +- internal/format/testdata/toml/toml-OnlyOutputs.golden | 2 +- internal/format/testdata/toml/toml-OnlyProviders.golden | 2 +- internal/format/testdata/toml/toml-OnlyRequirements.golden | 2 +- internal/format/testdata/toml/toml-OutputValues.golden | 2 +- internal/format/testdata/toml/toml-SortByName.golden | 2 +- internal/format/testdata/toml/toml-SortByRequired.golden | 2 +- internal/format/testdata/toml/toml-SortByType.golden | 2 +- internal/format/testdata/toml/toml.golden | 2 +- internal/format/toml.go | 3 ++- internal/format/util.go | 2 +- scripts/docs/generate.go | 2 +- 133 files changed, 134 insertions(+), 149 deletions(-) diff --git a/docs/FORMATS_GUIDE.md b/docs/FORMATS_GUIDE.md index 3c8e617..7623546 100644 --- a/docs/FORMATS_GUIDE.md +++ b/docs/FORMATS_GUIDE.md @@ -44,4 +44,4 @@ terraform-docs [PATH] [flags] * [terraform-docs xml](/docs/formats/xml.md) - Generate XML of inputs and outputs * [terraform-docs yaml](/docs/formats/yaml.md) - Generate YAML of inputs and outputs -###### Auto generated by spf13/cobra on 15-Jul-2020 +###### Auto generated by spf13/cobra on 15-Oct-2020 diff --git a/docs/formats/asciidoc-document.md b/docs/formats/asciidoc-document.md index 76eb35e..0669014 100644 --- a/docs/formats/asciidoc-document.md +++ b/docs/formats/asciidoc-document.md @@ -426,6 +426,4 @@ generates the following output: Description: It's unquoted output. - - -###### Auto generated by spf13/cobra on 15-Jul-2020 +###### Auto generated by spf13/cobra on 15-Oct-2020 diff --git a/docs/formats/asciidoc-table.md b/docs/formats/asciidoc-table.md index 365aba6..c56694e 100644 --- a/docs/formats/asciidoc-table.md +++ b/docs/formats/asciidoc-table.md @@ -380,6 +380,4 @@ generates the following output: |unquoted |It's unquoted output. |=== - - -###### Auto generated by spf13/cobra on 15-Jul-2020 +###### Auto generated by spf13/cobra on 15-Oct-2020 diff --git a/docs/formats/asciidoc.md b/docs/formats/asciidoc.md index 4c21635..379439a 100644 --- a/docs/formats/asciidoc.md +++ b/docs/formats/asciidoc.md @@ -40,4 +40,4 @@ terraform-docs asciidoc [PATH] [flags] * [terraform-docs asciidoc document](/docs/formats/asciidoc-document.md) - Generate AsciiDoc document of inputs and outputs * [terraform-docs asciidoc table](/docs/formats/asciidoc-table.md) - Generate AsciiDoc tables of inputs and outputs -###### Auto generated by spf13/cobra on 15-Jul-2020 +###### Auto generated by spf13/cobra on 15-Oct-2020 diff --git a/docs/formats/json.md b/docs/formats/json.md index f44d0b7..9210642 100644 --- a/docs/formats/json.md +++ b/docs/formats/json.md @@ -345,5 +345,4 @@ generates the following output: ] } - -###### Auto generated by spf13/cobra on 15-Jul-2020 +###### Auto generated by spf13/cobra on 15-Oct-2020 diff --git a/docs/formats/markdown-document.md b/docs/formats/markdown-document.md index 84861b7..0daa16a 100644 --- a/docs/formats/markdown-document.md +++ b/docs/formats/markdown-document.md @@ -427,6 +427,4 @@ generates the following output: Description: It's unquoted output. - - -###### Auto generated by spf13/cobra on 15-Jul-2020 +###### Auto generated by spf13/cobra on 15-Oct-2020 diff --git a/docs/formats/markdown-table.md b/docs/formats/markdown-table.md index 444e4bc..fce1a0b 100644 --- a/docs/formats/markdown-table.md +++ b/docs/formats/markdown-table.md @@ -146,6 +146,4 @@ generates the following output: | output-2 | It's output number two. | | unquoted | It's unquoted output. | - - -###### Auto generated by spf13/cobra on 15-Jul-2020 +###### Auto generated by spf13/cobra on 15-Oct-2020 diff --git a/docs/formats/markdown.md b/docs/formats/markdown.md index 30a5ee8..3cea558 100644 --- a/docs/formats/markdown.md +++ b/docs/formats/markdown.md @@ -41,4 +41,4 @@ terraform-docs markdown [PATH] [flags] * [terraform-docs markdown document](/docs/formats/markdown-document.md) - Generate Markdown document of inputs and outputs * [terraform-docs markdown table](/docs/formats/markdown-table.md) - Generate Markdown tables of inputs and outputs -###### Auto generated by spf13/cobra on 15-Jul-2020 +###### Auto generated by spf13/cobra on 15-Oct-2020 diff --git a/docs/formats/pretty.md b/docs/formats/pretty.md index cdf5aba..89c445c 100644 --- a/docs/formats/pretty.md +++ b/docs/formats/pretty.md @@ -245,5 +245,4 @@ generates the following output: - -###### Auto generated by spf13/cobra on 15-Jul-2020 +###### Auto generated by spf13/cobra on 15-Oct-2020 diff --git a/docs/formats/tfvars-hcl.md b/docs/formats/tfvars-hcl.md index f5bc48c..4e343c4 100644 --- a/docs/formats/tfvars-hcl.md +++ b/docs/formats/tfvars-hcl.md @@ -99,5 +99,4 @@ generates the following output: unquoted = "" with-url = "" - -###### Auto generated by spf13/cobra on 15-Jul-2020 +###### Auto generated by spf13/cobra on 15-Oct-2020 diff --git a/docs/formats/tfvars-json.md b/docs/formats/tfvars-json.md index 4bdaa97..9490ced 100644 --- a/docs/formats/tfvars-json.md +++ b/docs/formats/tfvars-json.md @@ -101,5 +101,4 @@ generates the following output: "with-url": "" } - -###### Auto generated by spf13/cobra on 15-Jul-2020 +###### Auto generated by spf13/cobra on 15-Oct-2020 diff --git a/docs/formats/tfvars.md b/docs/formats/tfvars.md index c453ce3..05f6afb 100644 --- a/docs/formats/tfvars.md +++ b/docs/formats/tfvars.md @@ -33,4 +33,4 @@ Generate terraform.tfvars of inputs * [terraform-docs tfvars hcl](/docs/formats/tfvars-hcl.md) - Generate HCL format of terraform.tfvars of inputs * [terraform-docs tfvars json](/docs/formats/tfvars-json.md) - Generate JSON format of terraform.tfvars of inputs -###### Auto generated by spf13/cobra on 15-Jul-2020 +###### Auto generated by spf13/cobra on 15-Oct-2020 diff --git a/docs/formats/toml.md b/docs/formats/toml.md index 44d56df..0520cb8 100644 --- a/docs/formats/toml.md +++ b/docs/formats/toml.md @@ -321,6 +321,4 @@ generates the following output: Name = "random" Version = ">= 2.2.0" - - -###### Auto generated by spf13/cobra on 15-Jul-2020 +###### Auto generated by spf13/cobra on 15-Oct-2020 diff --git a/docs/formats/xml.md b/docs/formats/xml.md index 8f2bf18..f12a2e0 100644 --- a/docs/formats/xml.md +++ b/docs/formats/xml.md @@ -344,5 +344,4 @@ generates the following output: - -###### Auto generated by spf13/cobra on 15-Jul-2020 +###### Auto generated by spf13/cobra on 15-Oct-2020 diff --git a/docs/formats/yaml.md b/docs/formats/yaml.md index bfafb70..d78c349 100644 --- a/docs/formats/yaml.md +++ b/docs/formats/yaml.md @@ -294,5 +294,4 @@ generates the following output: - name: random version: '>= 2.2.0' - -###### Auto generated by spf13/cobra on 15-Jul-2020 +###### Auto generated by spf13/cobra on 15-Oct-2020 diff --git a/internal/format/testdata/asciidoc/document-HeaderFromADOCFile.golden b/internal/format/testdata/asciidoc/document-HeaderFromADOCFile.golden index 01546af..cb3c0a5 100644 --- a/internal/format/testdata/asciidoc/document-HeaderFromADOCFile.golden +++ b/internal/format/testdata/asciidoc/document-HeaderFromADOCFile.golden @@ -358,4 +358,4 @@ Description: It's output number one. === output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/document-HeaderFromMDFile.golden b/internal/format/testdata/asciidoc/document-HeaderFromMDFile.golden index fc877f1..46abf48 100644 --- a/internal/format/testdata/asciidoc/document-HeaderFromMDFile.golden +++ b/internal/format/testdata/asciidoc/document-HeaderFromMDFile.golden @@ -358,4 +358,4 @@ Description: It's output number one. === output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/document-HeaderFromTFFile.golden b/internal/format/testdata/asciidoc/document-HeaderFromTFFile.golden index 02d056f..0e6b316 100644 --- a/internal/format/testdata/asciidoc/document-HeaderFromTFFile.golden +++ b/internal/format/testdata/asciidoc/document-HeaderFromTFFile.golden @@ -358,4 +358,4 @@ Description: It's output number one. === output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/document-HeaderFromTXTFile.golden b/internal/format/testdata/asciidoc/document-HeaderFromTXTFile.golden index 065a42f..a48d971 100644 --- a/internal/format/testdata/asciidoc/document-HeaderFromTXTFile.golden +++ b/internal/format/testdata/asciidoc/document-HeaderFromTXTFile.golden @@ -358,4 +358,4 @@ Description: It's output number one. === output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/document-IndentationAboveAllowed.golden b/internal/format/testdata/asciidoc/document-IndentationAboveAllowed.golden index f7893cc..8e96b2e 100644 --- a/internal/format/testdata/asciidoc/document-IndentationAboveAllowed.golden +++ b/internal/format/testdata/asciidoc/document-IndentationAboveAllowed.golden @@ -387,4 +387,4 @@ Description: It's output number one. === output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/document-IndentationBelowAllowed.golden b/internal/format/testdata/asciidoc/document-IndentationBelowAllowed.golden index f7893cc..8e96b2e 100644 --- a/internal/format/testdata/asciidoc/document-IndentationBelowAllowed.golden +++ b/internal/format/testdata/asciidoc/document-IndentationBelowAllowed.golden @@ -387,4 +387,4 @@ Description: It's output number one. === output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/document-IndentationOfFour.golden b/internal/format/testdata/asciidoc/document-IndentationOfFour.golden index 15e0da9..3f60928 100644 --- a/internal/format/testdata/asciidoc/document-IndentationOfFour.golden +++ b/internal/format/testdata/asciidoc/document-IndentationOfFour.golden @@ -387,4 +387,4 @@ Description: It's output number one. ===== output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/document-NoHeader.golden b/internal/format/testdata/asciidoc/document-NoHeader.golden index 9f77673..c37eb44 100644 --- a/internal/format/testdata/asciidoc/document-NoHeader.golden +++ b/internal/format/testdata/asciidoc/document-NoHeader.golden @@ -349,4 +349,4 @@ Description: It's output number one. === output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/document-NoInputs.golden b/internal/format/testdata/asciidoc/document-NoInputs.golden index 296c49d..63a0364 100644 --- a/internal/format/testdata/asciidoc/document-NoInputs.golden +++ b/internal/format/testdata/asciidoc/document-NoInputs.golden @@ -76,4 +76,4 @@ Description: It's output number one. === output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/document-NoOutputs.golden b/internal/format/testdata/asciidoc/document-NoOutputs.golden index 2bd6f35..6589ce6 100644 --- a/internal/format/testdata/asciidoc/document-NoOutputs.golden +++ b/internal/format/testdata/asciidoc/document-NoOutputs.golden @@ -367,4 +367,4 @@ Description: n/a Type: `object({})` -Default: `{}` +Default: `{}` \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/document-NoProviders.golden b/internal/format/testdata/asciidoc/document-NoProviders.golden index f2dcfb7..693c0da 100644 --- a/internal/format/testdata/asciidoc/document-NoProviders.golden +++ b/internal/format/testdata/asciidoc/document-NoProviders.golden @@ -375,4 +375,4 @@ Description: It's output number one. === output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/document-NoRequirements.golden b/internal/format/testdata/asciidoc/document-NoRequirements.golden index e9a3cf3..50651d4 100644 --- a/internal/format/testdata/asciidoc/document-NoRequirements.golden +++ b/internal/format/testdata/asciidoc/document-NoRequirements.golden @@ -377,4 +377,4 @@ Description: It's output number one. === output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/document-OnlyHeader.golden b/internal/format/testdata/asciidoc/document-OnlyHeader.golden index f4425a9..138e1b4 100644 --- a/internal/format/testdata/asciidoc/document-OnlyHeader.golden +++ b/internal/format/testdata/asciidoc/document-OnlyHeader.golden @@ -34,4 +34,4 @@ followed by another line of text. | Name | Description | |------|-----------------| | Foo | Foo description | -| Bar | Bar description | +| Bar | Bar description | \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/document-OnlyInputs.golden b/internal/format/testdata/asciidoc/document-OnlyInputs.golden index f7878f1..a0f9ef0 100644 --- a/internal/format/testdata/asciidoc/document-OnlyInputs.golden +++ b/internal/format/testdata/asciidoc/document-OnlyInputs.golden @@ -307,4 +307,4 @@ Description: n/a Type: `object({})` -Default: `{}` +Default: `{}` \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/document-OnlyOutputs.golden b/internal/format/testdata/asciidoc/document-OnlyOutputs.golden index 509b98e..4ba600b 100644 --- a/internal/format/testdata/asciidoc/document-OnlyOutputs.golden +++ b/internal/format/testdata/asciidoc/document-OnlyOutputs.golden @@ -16,4 +16,4 @@ Description: It's output number one. === output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/document-OnlyProviders.golden b/internal/format/testdata/asciidoc/document-OnlyProviders.golden index c7c930b..554481e 100644 --- a/internal/format/testdata/asciidoc/document-OnlyProviders.golden +++ b/internal/format/testdata/asciidoc/document-OnlyProviders.golden @@ -8,4 +8,4 @@ The following providers are used by this module: - aws.ident (>= 2.15.0) -- null +- null \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/document-OnlyRequirements.golden b/internal/format/testdata/asciidoc/document-OnlyRequirements.golden index b5096f2..495e31c 100644 --- a/internal/format/testdata/asciidoc/document-OnlyRequirements.golden +++ b/internal/format/testdata/asciidoc/document-OnlyRequirements.golden @@ -6,4 +6,4 @@ The following requirements are needed by this module: - aws (>= 2.15.0) -- random (>= 2.2.0) +- random (>= 2.2.0) \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/document-OutputValues.golden b/internal/format/testdata/asciidoc/document-OutputValues.golden index c3f342b..8cb0329 100644 --- a/internal/format/testdata/asciidoc/document-OutputValues.golden +++ b/internal/format/testdata/asciidoc/document-OutputValues.golden @@ -416,4 +416,4 @@ Description: terraform 0.12 only Value: `` -Sensitive: yes +Sensitive: yes \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/document-OutputValuesNoSensitivity.golden b/internal/format/testdata/asciidoc/document-OutputValuesNoSensitivity.golden index 4e99859..b1417ec 100644 --- a/internal/format/testdata/asciidoc/document-OutputValuesNoSensitivity.golden +++ b/internal/format/testdata/asciidoc/document-OutputValuesNoSensitivity.golden @@ -408,4 +408,4 @@ Value: `1` Description: terraform 0.12 only -Value: `` +Value: `` \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/document-SortByName.golden b/internal/format/testdata/asciidoc/document-SortByName.golden index 1bb6522..76f18d1 100644 --- a/internal/format/testdata/asciidoc/document-SortByName.golden +++ b/internal/format/testdata/asciidoc/document-SortByName.golden @@ -387,4 +387,4 @@ Description: It's output number two. === unquoted -Description: It's unquoted output. +Description: It's unquoted output. \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/document-SortByRequired.golden b/internal/format/testdata/asciidoc/document-SortByRequired.golden index 126a686..40565b8 100644 --- a/internal/format/testdata/asciidoc/document-SortByRequired.golden +++ b/internal/format/testdata/asciidoc/document-SortByRequired.golden @@ -387,4 +387,4 @@ Description: It's output number two. === unquoted -Description: It's unquoted output. +Description: It's unquoted output. \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/document-SortByType.golden b/internal/format/testdata/asciidoc/document-SortByType.golden index b86b6f1..3997e62 100644 --- a/internal/format/testdata/asciidoc/document-SortByType.golden +++ b/internal/format/testdata/asciidoc/document-SortByType.golden @@ -387,4 +387,4 @@ Description: It's output number two. === unquoted -Description: It's unquoted output. +Description: It's unquoted output. \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/document-WithRequired.golden b/internal/format/testdata/asciidoc/document-WithRequired.golden index 88511f3..c0b0533 100644 --- a/internal/format/testdata/asciidoc/document-WithRequired.golden +++ b/internal/format/testdata/asciidoc/document-WithRequired.golden @@ -377,4 +377,4 @@ Description: It's output number one. === output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/document.golden b/internal/format/testdata/asciidoc/document.golden index f7893cc..8e96b2e 100644 --- a/internal/format/testdata/asciidoc/document.golden +++ b/internal/format/testdata/asciidoc/document.golden @@ -387,4 +387,4 @@ Description: It's output number one. === output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/table-HeaderFromADOCFile.golden b/internal/format/testdata/asciidoc/table-HeaderFromADOCFile.golden index c11fe2f..bf5e5d3 100644 --- a/internal/format/testdata/asciidoc/table-HeaderFromADOCFile.golden +++ b/internal/format/testdata/asciidoc/table-HeaderFromADOCFile.golden @@ -267,4 +267,4 @@ object({ |output-2 |It's output number two. |output-1 |It's output number one. |output-0.12 |terraform 0.12 only -|=== +|=== \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/table-HeaderFromMDFile.golden b/internal/format/testdata/asciidoc/table-HeaderFromMDFile.golden index 9c6cf4a..a766cf2 100644 --- a/internal/format/testdata/asciidoc/table-HeaderFromMDFile.golden +++ b/internal/format/testdata/asciidoc/table-HeaderFromMDFile.golden @@ -267,4 +267,4 @@ object({ |output-2 |It's output number two. |output-1 |It's output number one. |output-0.12 |terraform 0.12 only -|=== +|=== \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/table-HeaderFromTFFile.golden b/internal/format/testdata/asciidoc/table-HeaderFromTFFile.golden index d4f60f4..4d3aecb 100644 --- a/internal/format/testdata/asciidoc/table-HeaderFromTFFile.golden +++ b/internal/format/testdata/asciidoc/table-HeaderFromTFFile.golden @@ -267,4 +267,4 @@ object({ |output-2 |It's output number two. |output-1 |It's output number one. |output-0.12 |terraform 0.12 only -|=== +|=== \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/table-HeaderFromTXTFile.golden b/internal/format/testdata/asciidoc/table-HeaderFromTXTFile.golden index a76a0b0..6d3e82c 100644 --- a/internal/format/testdata/asciidoc/table-HeaderFromTXTFile.golden +++ b/internal/format/testdata/asciidoc/table-HeaderFromTXTFile.golden @@ -267,4 +267,4 @@ object({ |output-2 |It's output number two. |output-1 |It's output number one. |output-0.12 |terraform 0.12 only -|=== +|=== \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/table-IndentationAboveAllowed.golden b/internal/format/testdata/asciidoc/table-IndentationAboveAllowed.golden index 32450dd..6ce177a 100644 --- a/internal/format/testdata/asciidoc/table-IndentationAboveAllowed.golden +++ b/internal/format/testdata/asciidoc/table-IndentationAboveAllowed.golden @@ -296,4 +296,4 @@ object({ |output-2 |It's output number two. |output-1 |It's output number one. |output-0.12 |terraform 0.12 only -|=== +|=== \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/table-IndentationBelowAllowed.golden b/internal/format/testdata/asciidoc/table-IndentationBelowAllowed.golden index 32450dd..6ce177a 100644 --- a/internal/format/testdata/asciidoc/table-IndentationBelowAllowed.golden +++ b/internal/format/testdata/asciidoc/table-IndentationBelowAllowed.golden @@ -296,4 +296,4 @@ object({ |output-2 |It's output number two. |output-1 |It's output number one. |output-0.12 |terraform 0.12 only -|=== +|=== \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/table-IndentationOfFour.golden b/internal/format/testdata/asciidoc/table-IndentationOfFour.golden index db80832..b12f249 100644 --- a/internal/format/testdata/asciidoc/table-IndentationOfFour.golden +++ b/internal/format/testdata/asciidoc/table-IndentationOfFour.golden @@ -296,4 +296,4 @@ object({ |output-2 |It's output number two. |output-1 |It's output number one. |output-0.12 |terraform 0.12 only -|=== +|=== \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/table-NoHeader.golden b/internal/format/testdata/asciidoc/table-NoHeader.golden index 652cfec..e401c21 100644 --- a/internal/format/testdata/asciidoc/table-NoHeader.golden +++ b/internal/format/testdata/asciidoc/table-NoHeader.golden @@ -258,4 +258,4 @@ object({ |output-2 |It's output number two. |output-1 |It's output number one. |output-0.12 |terraform 0.12 only -|=== +|=== \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/table-NoInputs.golden b/internal/format/testdata/asciidoc/table-NoInputs.golden index 58e5e30..fda6c04 100644 --- a/internal/format/testdata/asciidoc/table-NoInputs.golden +++ b/internal/format/testdata/asciidoc/table-NoInputs.golden @@ -66,4 +66,4 @@ followed by another line of text. |output-2 |It's output number two. |output-1 |It's output number one. |output-0.12 |terraform 0.12 only -|=== +|=== \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/table-NoOutputs.golden b/internal/format/testdata/asciidoc/table-NoOutputs.golden index 9eb7fa9..00b7552 100644 --- a/internal/format/testdata/asciidoc/table-NoOutputs.golden +++ b/internal/format/testdata/asciidoc/table-NoOutputs.golden @@ -285,4 +285,4 @@ object({ |`object({})` |`{}` -|=== +|=== \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/table-NoProviders.golden b/internal/format/testdata/asciidoc/table-NoProviders.golden index 3c190f6..2c7d41b 100644 --- a/internal/format/testdata/asciidoc/table-NoProviders.golden +++ b/internal/format/testdata/asciidoc/table-NoProviders.golden @@ -285,4 +285,4 @@ object({ |output-2 |It's output number two. |output-1 |It's output number one. |output-0.12 |terraform 0.12 only -|=== +|=== \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/table-NoRequirements.golden b/internal/format/testdata/asciidoc/table-NoRequirements.golden index 24db79c..12c7f01 100644 --- a/internal/format/testdata/asciidoc/table-NoRequirements.golden +++ b/internal/format/testdata/asciidoc/table-NoRequirements.golden @@ -286,4 +286,4 @@ object({ |output-2 |It's output number two. |output-1 |It's output number one. |output-0.12 |terraform 0.12 only -|=== +|=== \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/table-OnlyHeader.golden b/internal/format/testdata/asciidoc/table-OnlyHeader.golden index f4425a9..138e1b4 100644 --- a/internal/format/testdata/asciidoc/table-OnlyHeader.golden +++ b/internal/format/testdata/asciidoc/table-OnlyHeader.golden @@ -34,4 +34,4 @@ followed by another line of text. | Name | Description | |------|-----------------| | Foo | Foo description | -| Bar | Bar description | +| Bar | Bar description | \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/table-OnlyInputs.golden b/internal/format/testdata/asciidoc/table-OnlyInputs.golden index 0caa601..9adbf88 100644 --- a/internal/format/testdata/asciidoc/table-OnlyInputs.golden +++ b/internal/format/testdata/asciidoc/table-OnlyInputs.golden @@ -226,4 +226,4 @@ object({ |`object({})` |`{}` -|=== +|=== \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/table-OnlyOutputs.golden b/internal/format/testdata/asciidoc/table-OnlyOutputs.golden index 0f3b49a..e1cfaac 100644 --- a/internal/format/testdata/asciidoc/table-OnlyOutputs.golden +++ b/internal/format/testdata/asciidoc/table-OnlyOutputs.golden @@ -7,4 +7,4 @@ |output-2 |It's output number two. |output-1 |It's output number one. |output-0.12 |terraform 0.12 only -|=== +|=== \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/table-OnlyProviders.golden b/internal/format/testdata/asciidoc/table-OnlyProviders.golden index d54e030..f21ebf5 100644 --- a/internal/format/testdata/asciidoc/table-OnlyProviders.golden +++ b/internal/format/testdata/asciidoc/table-OnlyProviders.golden @@ -7,4 +7,4 @@ |aws |>= 2.15.0 |aws.ident |>= 2.15.0 |null |n/a -|=== +|=== \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/table-OnlyRequirements.golden b/internal/format/testdata/asciidoc/table-OnlyRequirements.golden index 169d50f..7708644 100644 --- a/internal/format/testdata/asciidoc/table-OnlyRequirements.golden +++ b/internal/format/testdata/asciidoc/table-OnlyRequirements.golden @@ -6,4 +6,4 @@ |terraform |>= 0.12 |aws |>= 2.15.0 |random |>= 2.2.0 -|=== +|=== \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/table-OutputValues.golden b/internal/format/testdata/asciidoc/table-OutputValues.golden index 83021a8..fdd118d 100644 --- a/internal/format/testdata/asciidoc/table-OutputValues.golden +++ b/internal/format/testdata/asciidoc/table-OutputValues.golden @@ -311,4 +311,4 @@ object({ |no |output-1 |It's output number one. |`1` |no |output-0.12 |terraform 0.12 only |`` |yes -|=== +|=== \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/table-OutputValuesNoSensitivity.golden b/internal/format/testdata/asciidoc/table-OutputValuesNoSensitivity.golden index 18535aa..88ad788 100644 --- a/internal/format/testdata/asciidoc/table-OutputValuesNoSensitivity.golden +++ b/internal/format/testdata/asciidoc/table-OutputValuesNoSensitivity.golden @@ -311,4 +311,4 @@ object({ |output-1 |It's output number one. |`1` |output-0.12 |terraform 0.12 only |`` -|=== +|=== \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/table-SortByName.golden b/internal/format/testdata/asciidoc/table-SortByName.golden index b0dcb9b..1a897b8 100644 --- a/internal/format/testdata/asciidoc/table-SortByName.golden +++ b/internal/format/testdata/asciidoc/table-SortByName.golden @@ -296,4 +296,4 @@ object({ |output-1 |It's output number one. |output-2 |It's output number two. |unquoted |It's unquoted output. -|=== +|=== \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/table-SortByRequired.golden b/internal/format/testdata/asciidoc/table-SortByRequired.golden index b35f55c..20027c1 100644 --- a/internal/format/testdata/asciidoc/table-SortByRequired.golden +++ b/internal/format/testdata/asciidoc/table-SortByRequired.golden @@ -296,4 +296,4 @@ object({ |output-1 |It's output number one. |output-2 |It's output number two. |unquoted |It's unquoted output. -|=== +|=== \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/table-SortByType.golden b/internal/format/testdata/asciidoc/table-SortByType.golden index 56e7472..e2cbb63 100644 --- a/internal/format/testdata/asciidoc/table-SortByType.golden +++ b/internal/format/testdata/asciidoc/table-SortByType.golden @@ -296,4 +296,4 @@ object({ |output-1 |It's output number one. |output-2 |It's output number two. |unquoted |It's unquoted output. -|=== +|=== \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/table-WithRequired.golden b/internal/format/testdata/asciidoc/table-WithRequired.golden index c7ce6bc..fc80eaf 100644 --- a/internal/format/testdata/asciidoc/table-WithRequired.golden +++ b/internal/format/testdata/asciidoc/table-WithRequired.golden @@ -331,4 +331,4 @@ object({ |output-2 |It's output number two. |output-1 |It's output number one. |output-0.12 |terraform 0.12 only -|=== +|=== \ No newline at end of file diff --git a/internal/format/testdata/asciidoc/table.golden b/internal/format/testdata/asciidoc/table.golden index 32450dd..6ce177a 100644 --- a/internal/format/testdata/asciidoc/table.golden +++ b/internal/format/testdata/asciidoc/table.golden @@ -296,4 +296,4 @@ object({ |output-2 |It's output number two. |output-1 |It's output number one. |output-0.12 |terraform 0.12 only -|=== +|=== \ No newline at end of file diff --git a/internal/format/testdata/markdown/document-EscapeCharacters.golden b/internal/format/testdata/markdown/document-EscapeCharacters.golden index dc2fdf3..95573d6 100644 --- a/internal/format/testdata/markdown/document-EscapeCharacters.golden +++ b/internal/format/testdata/markdown/document-EscapeCharacters.golden @@ -387,4 +387,4 @@ Description: It's output number one. ### output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/markdown/document-HeaderFromADOCFile.golden b/internal/format/testdata/markdown/document-HeaderFromADOCFile.golden index 8cc8fb6..8f3132c 100644 --- a/internal/format/testdata/markdown/document-HeaderFromADOCFile.golden +++ b/internal/format/testdata/markdown/document-HeaderFromADOCFile.golden @@ -358,4 +358,4 @@ Description: It's output number one. ### output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/markdown/document-HeaderFromMDFile.golden b/internal/format/testdata/markdown/document-HeaderFromMDFile.golden index de4346c..686ea41 100644 --- a/internal/format/testdata/markdown/document-HeaderFromMDFile.golden +++ b/internal/format/testdata/markdown/document-HeaderFromMDFile.golden @@ -358,4 +358,4 @@ Description: It's output number one. ### output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/markdown/document-HeaderFromTFFile.golden b/internal/format/testdata/markdown/document-HeaderFromTFFile.golden index e8bf7ac..9c07a69 100644 --- a/internal/format/testdata/markdown/document-HeaderFromTFFile.golden +++ b/internal/format/testdata/markdown/document-HeaderFromTFFile.golden @@ -358,4 +358,4 @@ Description: It's output number one. ### output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/markdown/document-HeaderFromTXTFile.golden b/internal/format/testdata/markdown/document-HeaderFromTXTFile.golden index 4b65428..65701bc 100644 --- a/internal/format/testdata/markdown/document-HeaderFromTXTFile.golden +++ b/internal/format/testdata/markdown/document-HeaderFromTXTFile.golden @@ -358,4 +358,4 @@ Description: It's output number one. ### output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/markdown/document-IndentationAboveAllowed.golden b/internal/format/testdata/markdown/document-IndentationAboveAllowed.golden index e4e9ce6..ef99b75 100644 --- a/internal/format/testdata/markdown/document-IndentationAboveAllowed.golden +++ b/internal/format/testdata/markdown/document-IndentationAboveAllowed.golden @@ -387,4 +387,4 @@ Description: It's output number one. ### output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/markdown/document-IndentationBelowAllowed.golden b/internal/format/testdata/markdown/document-IndentationBelowAllowed.golden index e4e9ce6..ef99b75 100644 --- a/internal/format/testdata/markdown/document-IndentationBelowAllowed.golden +++ b/internal/format/testdata/markdown/document-IndentationBelowAllowed.golden @@ -387,4 +387,4 @@ Description: It's output number one. ### output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/markdown/document-IndentationOfFour.golden b/internal/format/testdata/markdown/document-IndentationOfFour.golden index cdf193f..ac5ed04 100644 --- a/internal/format/testdata/markdown/document-IndentationOfFour.golden +++ b/internal/format/testdata/markdown/document-IndentationOfFour.golden @@ -387,4 +387,4 @@ Description: It's output number one. ##### output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/markdown/document-NoHeader.golden b/internal/format/testdata/markdown/document-NoHeader.golden index d518b4e..9d96ffd 100644 --- a/internal/format/testdata/markdown/document-NoHeader.golden +++ b/internal/format/testdata/markdown/document-NoHeader.golden @@ -349,4 +349,4 @@ Description: It's output number one. ### output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/markdown/document-NoInputs.golden b/internal/format/testdata/markdown/document-NoInputs.golden index 45c0f17..a491cba 100644 --- a/internal/format/testdata/markdown/document-NoInputs.golden +++ b/internal/format/testdata/markdown/document-NoInputs.golden @@ -76,4 +76,4 @@ Description: It's output number one. ### output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/markdown/document-NoOutputs.golden b/internal/format/testdata/markdown/document-NoOutputs.golden index 2070a22..2681557 100644 --- a/internal/format/testdata/markdown/document-NoOutputs.golden +++ b/internal/format/testdata/markdown/document-NoOutputs.golden @@ -367,4 +367,4 @@ Description: n/a Type: `object({})` -Default: `{}` +Default: `{}` \ No newline at end of file diff --git a/internal/format/testdata/markdown/document-NoProviders.golden b/internal/format/testdata/markdown/document-NoProviders.golden index 30fe9b4..35b0662 100644 --- a/internal/format/testdata/markdown/document-NoProviders.golden +++ b/internal/format/testdata/markdown/document-NoProviders.golden @@ -375,4 +375,4 @@ Description: It's output number one. ### output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/markdown/document-NoRequirements.golden b/internal/format/testdata/markdown/document-NoRequirements.golden index 9bf1a1a..5ef068d 100644 --- a/internal/format/testdata/markdown/document-NoRequirements.golden +++ b/internal/format/testdata/markdown/document-NoRequirements.golden @@ -377,4 +377,4 @@ Description: It's output number one. ### output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/markdown/document-OnlyHeader.golden b/internal/format/testdata/markdown/document-OnlyHeader.golden index f4425a9..138e1b4 100644 --- a/internal/format/testdata/markdown/document-OnlyHeader.golden +++ b/internal/format/testdata/markdown/document-OnlyHeader.golden @@ -34,4 +34,4 @@ followed by another line of text. | Name | Description | |------|-----------------| | Foo | Foo description | -| Bar | Bar description | +| Bar | Bar description | \ No newline at end of file diff --git a/internal/format/testdata/markdown/document-OnlyInputs.golden b/internal/format/testdata/markdown/document-OnlyInputs.golden index 89c7e4a..e315e3e 100644 --- a/internal/format/testdata/markdown/document-OnlyInputs.golden +++ b/internal/format/testdata/markdown/document-OnlyInputs.golden @@ -307,4 +307,4 @@ Description: n/a Type: `object({})` -Default: `{}` +Default: `{}` \ No newline at end of file diff --git a/internal/format/testdata/markdown/document-OnlyOutputs.golden b/internal/format/testdata/markdown/document-OnlyOutputs.golden index c817f1e..a9f8b97 100644 --- a/internal/format/testdata/markdown/document-OnlyOutputs.golden +++ b/internal/format/testdata/markdown/document-OnlyOutputs.golden @@ -16,4 +16,4 @@ Description: It's output number one. ### output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/markdown/document-OnlyProviders.golden b/internal/format/testdata/markdown/document-OnlyProviders.golden index c9d9a15..db83aed 100644 --- a/internal/format/testdata/markdown/document-OnlyProviders.golden +++ b/internal/format/testdata/markdown/document-OnlyProviders.golden @@ -8,4 +8,4 @@ The following providers are used by this module: - aws.ident (>= 2.15.0) -- null +- null \ No newline at end of file diff --git a/internal/format/testdata/markdown/document-OnlyRequirements.golden b/internal/format/testdata/markdown/document-OnlyRequirements.golden index b9c2bbe..d1e42ce 100644 --- a/internal/format/testdata/markdown/document-OnlyRequirements.golden +++ b/internal/format/testdata/markdown/document-OnlyRequirements.golden @@ -6,4 +6,4 @@ The following requirements are needed by this module: - aws (>= 2.15.0) -- random (>= 2.2.0) +- random (>= 2.2.0) \ No newline at end of file diff --git a/internal/format/testdata/markdown/document-OutputValues.golden b/internal/format/testdata/markdown/document-OutputValues.golden index 1bc0f35..8ab2660 100644 --- a/internal/format/testdata/markdown/document-OutputValues.golden +++ b/internal/format/testdata/markdown/document-OutputValues.golden @@ -416,4 +416,4 @@ Description: terraform 0.12 only Value: `` -Sensitive: yes +Sensitive: yes \ No newline at end of file diff --git a/internal/format/testdata/markdown/document-OutputValuesNoSensitivity.golden b/internal/format/testdata/markdown/document-OutputValuesNoSensitivity.golden index 0c597d7..54b331c 100644 --- a/internal/format/testdata/markdown/document-OutputValuesNoSensitivity.golden +++ b/internal/format/testdata/markdown/document-OutputValuesNoSensitivity.golden @@ -408,4 +408,4 @@ Value: `1` Description: terraform 0.12 only -Value: `` +Value: `` \ No newline at end of file diff --git a/internal/format/testdata/markdown/document-SortByName.golden b/internal/format/testdata/markdown/document-SortByName.golden index 938af26..2075598 100644 --- a/internal/format/testdata/markdown/document-SortByName.golden +++ b/internal/format/testdata/markdown/document-SortByName.golden @@ -387,4 +387,4 @@ Description: It's output number two. ### unquoted -Description: It's unquoted output. +Description: It's unquoted output. \ No newline at end of file diff --git a/internal/format/testdata/markdown/document-SortByRequired.golden b/internal/format/testdata/markdown/document-SortByRequired.golden index 7cdd169..bfb2fce 100644 --- a/internal/format/testdata/markdown/document-SortByRequired.golden +++ b/internal/format/testdata/markdown/document-SortByRequired.golden @@ -387,4 +387,4 @@ Description: It's output number two. ### unquoted -Description: It's unquoted output. +Description: It's unquoted output. \ No newline at end of file diff --git a/internal/format/testdata/markdown/document-SortByType.golden b/internal/format/testdata/markdown/document-SortByType.golden index f8c3bf4..c10113b 100644 --- a/internal/format/testdata/markdown/document-SortByType.golden +++ b/internal/format/testdata/markdown/document-SortByType.golden @@ -387,4 +387,4 @@ Description: It's output number two. ### unquoted -Description: It's unquoted output. +Description: It's unquoted output. \ No newline at end of file diff --git a/internal/format/testdata/markdown/document-WithRequired.golden b/internal/format/testdata/markdown/document-WithRequired.golden index 4042352..04d5b51 100644 --- a/internal/format/testdata/markdown/document-WithRequired.golden +++ b/internal/format/testdata/markdown/document-WithRequired.golden @@ -377,4 +377,4 @@ Description: It's output number one. ### output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/markdown/document.golden b/internal/format/testdata/markdown/document.golden index e4e9ce6..ef99b75 100644 --- a/internal/format/testdata/markdown/document.golden +++ b/internal/format/testdata/markdown/document.golden @@ -387,4 +387,4 @@ Description: It's output number one. ### output-0.12 -Description: terraform 0.12 only +Description: terraform 0.12 only \ No newline at end of file diff --git a/internal/format/testdata/markdown/table-EscapeCharacters.golden b/internal/format/testdata/markdown/table-EscapeCharacters.golden index 8e441f1..6bd196b 100644 --- a/internal/format/testdata/markdown/table-EscapeCharacters.golden +++ b/internal/format/testdata/markdown/table-EscapeCharacters.golden @@ -96,4 +96,4 @@ followed by another line of text. | unquoted | It's unquoted output. | | output-2 | It's output number two. | | output-1 | It's output number one. | -| output-0.12 | terraform 0.12 only | +| output-0.12 | terraform 0.12 only | \ No newline at end of file diff --git a/internal/format/testdata/markdown/table-HeaderFromADOCFile.golden b/internal/format/testdata/markdown/table-HeaderFromADOCFile.golden index 5f8a8de..aedc2a3 100644 --- a/internal/format/testdata/markdown/table-HeaderFromADOCFile.golden +++ b/internal/format/testdata/markdown/table-HeaderFromADOCFile.golden @@ -67,4 +67,4 @@ esse cillum dolore eu fugiat nulla pariatur. | unquoted | It's unquoted output. | | output-2 | It's output number two. | | output-1 | It's output number one. | -| output-0.12 | terraform 0.12 only | +| output-0.12 | terraform 0.12 only | \ No newline at end of file diff --git a/internal/format/testdata/markdown/table-HeaderFromMDFile.golden b/internal/format/testdata/markdown/table-HeaderFromMDFile.golden index f6179aa..96f5dc0 100644 --- a/internal/format/testdata/markdown/table-HeaderFromMDFile.golden +++ b/internal/format/testdata/markdown/table-HeaderFromMDFile.golden @@ -67,4 +67,4 @@ esse cillum dolore eu fugiat nulla pariatur. | unquoted | It's unquoted output. | | output-2 | It's output number two. | | output-1 | It's output number one. | -| output-0.12 | terraform 0.12 only | +| output-0.12 | terraform 0.12 only | \ No newline at end of file diff --git a/internal/format/testdata/markdown/table-HeaderFromTFFile.golden b/internal/format/testdata/markdown/table-HeaderFromTFFile.golden index 9218039..c1c9874 100644 --- a/internal/format/testdata/markdown/table-HeaderFromTFFile.golden +++ b/internal/format/testdata/markdown/table-HeaderFromTFFile.golden @@ -67,4 +67,4 @@ esse cillum dolore eu fugiat nulla pariatur. | unquoted | It's unquoted output. | | output-2 | It's output number two. | | output-1 | It's output number one. | -| output-0.12 | terraform 0.12 only | +| output-0.12 | terraform 0.12 only | \ No newline at end of file diff --git a/internal/format/testdata/markdown/table-HeaderFromTXTFile.golden b/internal/format/testdata/markdown/table-HeaderFromTXTFile.golden index 51d1bf2..d2906ba 100644 --- a/internal/format/testdata/markdown/table-HeaderFromTXTFile.golden +++ b/internal/format/testdata/markdown/table-HeaderFromTXTFile.golden @@ -67,4 +67,4 @@ esse cillum dolore eu fugiat nulla pariatur. | unquoted | It's unquoted output. | | output-2 | It's output number two. | | output-1 | It's output number one. | -| output-0.12 | terraform 0.12 only | +| output-0.12 | terraform 0.12 only | \ No newline at end of file diff --git a/internal/format/testdata/markdown/table-IndentationAboveAllowed.golden b/internal/format/testdata/markdown/table-IndentationAboveAllowed.golden index 722f405..4c2987e 100644 --- a/internal/format/testdata/markdown/table-IndentationAboveAllowed.golden +++ b/internal/format/testdata/markdown/table-IndentationAboveAllowed.golden @@ -96,4 +96,4 @@ followed by another line of text. | unquoted | It's unquoted output. | | output-2 | It's output number two. | | output-1 | It's output number one. | -| output-0.12 | terraform 0.12 only | +| output-0.12 | terraform 0.12 only | \ No newline at end of file diff --git a/internal/format/testdata/markdown/table-IndentationBelowAllowed.golden b/internal/format/testdata/markdown/table-IndentationBelowAllowed.golden index 722f405..4c2987e 100644 --- a/internal/format/testdata/markdown/table-IndentationBelowAllowed.golden +++ b/internal/format/testdata/markdown/table-IndentationBelowAllowed.golden @@ -96,4 +96,4 @@ followed by another line of text. | unquoted | It's unquoted output. | | output-2 | It's output number two. | | output-1 | It's output number one. | -| output-0.12 | terraform 0.12 only | +| output-0.12 | terraform 0.12 only | \ No newline at end of file diff --git a/internal/format/testdata/markdown/table-IndentationOfFour.golden b/internal/format/testdata/markdown/table-IndentationOfFour.golden index 99e3104..b161eec 100644 --- a/internal/format/testdata/markdown/table-IndentationOfFour.golden +++ b/internal/format/testdata/markdown/table-IndentationOfFour.golden @@ -96,4 +96,4 @@ followed by another line of text. | unquoted | It's unquoted output. | | output-2 | It's output number two. | | output-1 | It's output number one. | -| output-0.12 | terraform 0.12 only | +| output-0.12 | terraform 0.12 only | \ No newline at end of file diff --git a/internal/format/testdata/markdown/table-NoHeader.golden b/internal/format/testdata/markdown/table-NoHeader.golden index b50612e..d8120da 100644 --- a/internal/format/testdata/markdown/table-NoHeader.golden +++ b/internal/format/testdata/markdown/table-NoHeader.golden @@ -58,4 +58,4 @@ | unquoted | It's unquoted output. | | output-2 | It's output number two. | | output-1 | It's output number one. | -| output-0.12 | terraform 0.12 only | +| output-0.12 | terraform 0.12 only | \ No newline at end of file diff --git a/internal/format/testdata/markdown/table-NoInputs.golden b/internal/format/testdata/markdown/table-NoInputs.golden index e2445eb..4b2f8e2 100644 --- a/internal/format/testdata/markdown/table-NoInputs.golden +++ b/internal/format/testdata/markdown/table-NoInputs.golden @@ -60,4 +60,4 @@ followed by another line of text. | unquoted | It's unquoted output. | | output-2 | It's output number two. | | output-1 | It's output number one. | -| output-0.12 | terraform 0.12 only | +| output-0.12 | terraform 0.12 only | \ No newline at end of file diff --git a/internal/format/testdata/markdown/table-NoOutputs.golden b/internal/format/testdata/markdown/table-NoOutputs.golden index b4723ed..f3d854f 100644 --- a/internal/format/testdata/markdown/table-NoOutputs.golden +++ b/internal/format/testdata/markdown/table-NoOutputs.golden @@ -87,4 +87,4 @@ followed by another line of text. | number_default_zero | n/a | `number` | `0` | | bool_default_false | n/a | `bool` | `false` | | list_default_empty | n/a | `list(string)` | `[]` | -| object_default_empty | n/a | `object({})` | `{}` | +| object_default_empty | n/a | `object({})` | `{}` | \ No newline at end of file diff --git a/internal/format/testdata/markdown/table-NoProviders.golden b/internal/format/testdata/markdown/table-NoProviders.golden index 183608c..a2aa5fa 100644 --- a/internal/format/testdata/markdown/table-NoProviders.golden +++ b/internal/format/testdata/markdown/table-NoProviders.golden @@ -87,4 +87,4 @@ followed by another line of text. | unquoted | It's unquoted output. | | output-2 | It's output number two. | | output-1 | It's output number one. | -| output-0.12 | terraform 0.12 only | +| output-0.12 | terraform 0.12 only | \ No newline at end of file diff --git a/internal/format/testdata/markdown/table-NoRequirements.golden b/internal/format/testdata/markdown/table-NoRequirements.golden index 65e42a1..9b62793 100644 --- a/internal/format/testdata/markdown/table-NoRequirements.golden +++ b/internal/format/testdata/markdown/table-NoRequirements.golden @@ -88,4 +88,4 @@ followed by another line of text. | unquoted | It's unquoted output. | | output-2 | It's output number two. | | output-1 | It's output number one. | -| output-0.12 | terraform 0.12 only | +| output-0.12 | terraform 0.12 only | \ No newline at end of file diff --git a/internal/format/testdata/markdown/table-OnlyHeader.golden b/internal/format/testdata/markdown/table-OnlyHeader.golden index f4425a9..138e1b4 100644 --- a/internal/format/testdata/markdown/table-OnlyHeader.golden +++ b/internal/format/testdata/markdown/table-OnlyHeader.golden @@ -34,4 +34,4 @@ followed by another line of text. | Name | Description | |------|-----------------| | Foo | Foo description | -| Bar | Bar description | +| Bar | Bar description | \ No newline at end of file diff --git a/internal/format/testdata/markdown/table-OnlyInputs.golden b/internal/format/testdata/markdown/table-OnlyInputs.golden index 3a4526b..58c4726 100644 --- a/internal/format/testdata/markdown/table-OnlyInputs.golden +++ b/internal/format/testdata/markdown/table-OnlyInputs.golden @@ -32,4 +32,4 @@ | number_default_zero | n/a | `number` | `0` | | bool_default_false | n/a | `bool` | `false` | | list_default_empty | n/a | `list(string)` | `[]` | -| object_default_empty | n/a | `object({})` | `{}` | +| object_default_empty | n/a | `object({})` | `{}` | \ No newline at end of file diff --git a/internal/format/testdata/markdown/table-OnlyOutputs.golden b/internal/format/testdata/markdown/table-OnlyOutputs.golden index 4365cd9..9a62f63 100644 --- a/internal/format/testdata/markdown/table-OnlyOutputs.golden +++ b/internal/format/testdata/markdown/table-OnlyOutputs.golden @@ -5,4 +5,4 @@ | unquoted | It's unquoted output. | | output-2 | It's output number two. | | output-1 | It's output number one. | -| output-0.12 | terraform 0.12 only | +| output-0.12 | terraform 0.12 only | \ No newline at end of file diff --git a/internal/format/testdata/markdown/table-OnlyProviders.golden b/internal/format/testdata/markdown/table-OnlyProviders.golden index e2bef22..7267758 100644 --- a/internal/format/testdata/markdown/table-OnlyProviders.golden +++ b/internal/format/testdata/markdown/table-OnlyProviders.golden @@ -5,4 +5,4 @@ | tls | n/a | | aws | >= 2.15.0 | | aws.ident | >= 2.15.0 | -| null | n/a | +| null | n/a | \ No newline at end of file diff --git a/internal/format/testdata/markdown/table-OnlyRequirements.golden b/internal/format/testdata/markdown/table-OnlyRequirements.golden index 2608069..2e2afdc 100644 --- a/internal/format/testdata/markdown/table-OnlyRequirements.golden +++ b/internal/format/testdata/markdown/table-OnlyRequirements.golden @@ -4,4 +4,4 @@ |------|---------| | terraform | >= 0.12 | | aws | >= 2.15.0 | -| random | >= 2.2.0 | +| random | >= 2.2.0 | \ No newline at end of file diff --git a/internal/format/testdata/markdown/table-OutputValues.golden b/internal/format/testdata/markdown/table-OutputValues.golden index 6633a19..fedb0b9 100644 --- a/internal/format/testdata/markdown/table-OutputValues.golden +++ b/internal/format/testdata/markdown/table-OutputValues.golden @@ -96,4 +96,4 @@ followed by another line of text. | unquoted | It's unquoted output. |
{
"leon": "cat"
}
| no | | output-2 | It's output number two. |
[
"jack",
"lola"
]
| no | | output-1 | It's output number one. | `1` | no | -| output-0.12 | terraform 0.12 only | `` | yes | +| output-0.12 | terraform 0.12 only | `` | yes | \ No newline at end of file diff --git a/internal/format/testdata/markdown/table-OutputValuesNoSensitivity.golden b/internal/format/testdata/markdown/table-OutputValuesNoSensitivity.golden index 5509f0f..f10a5d0 100644 --- a/internal/format/testdata/markdown/table-OutputValuesNoSensitivity.golden +++ b/internal/format/testdata/markdown/table-OutputValuesNoSensitivity.golden @@ -96,4 +96,4 @@ followed by another line of text. | unquoted | It's unquoted output. |
{
"leon": "cat"
}
| | output-2 | It's output number two. |
[
"jack",
"lola"
]
| | output-1 | It's output number one. | `1` | -| output-0.12 | terraform 0.12 only | `` | +| output-0.12 | terraform 0.12 only | `` | \ No newline at end of file diff --git a/internal/format/testdata/markdown/table-SortByName.golden b/internal/format/testdata/markdown/table-SortByName.golden index 0e5eaac..d4ec377 100644 --- a/internal/format/testdata/markdown/table-SortByName.golden +++ b/internal/format/testdata/markdown/table-SortByName.golden @@ -96,4 +96,4 @@ followed by another line of text. | output-0.12 | terraform 0.12 only | | output-1 | It's output number one. | | output-2 | It's output number two. | -| unquoted | It's unquoted output. | +| unquoted | It's unquoted output. | \ No newline at end of file diff --git a/internal/format/testdata/markdown/table-SortByRequired.golden b/internal/format/testdata/markdown/table-SortByRequired.golden index 2e69dbc..2da4b9a 100644 --- a/internal/format/testdata/markdown/table-SortByRequired.golden +++ b/internal/format/testdata/markdown/table-SortByRequired.golden @@ -96,4 +96,4 @@ followed by another line of text. | output-0.12 | terraform 0.12 only | | output-1 | It's output number one. | | output-2 | It's output number two. | -| unquoted | It's unquoted output. | +| unquoted | It's unquoted output. | \ No newline at end of file diff --git a/internal/format/testdata/markdown/table-SortByType.golden b/internal/format/testdata/markdown/table-SortByType.golden index 7834df8..06d3345 100644 --- a/internal/format/testdata/markdown/table-SortByType.golden +++ b/internal/format/testdata/markdown/table-SortByType.golden @@ -96,4 +96,4 @@ followed by another line of text. | output-0.12 | terraform 0.12 only | | output-1 | It's output number one. | | output-2 | It's output number two. | -| unquoted | It's unquoted output. | +| unquoted | It's unquoted output. | \ No newline at end of file diff --git a/internal/format/testdata/markdown/table-WithRequired.golden b/internal/format/testdata/markdown/table-WithRequired.golden index eeddeb9..a3dff04 100644 --- a/internal/format/testdata/markdown/table-WithRequired.golden +++ b/internal/format/testdata/markdown/table-WithRequired.golden @@ -96,4 +96,4 @@ followed by another line of text. | unquoted | It's unquoted output. | | output-2 | It's output number two. | | output-1 | It's output number one. | -| output-0.12 | terraform 0.12 only | +| output-0.12 | terraform 0.12 only | \ No newline at end of file diff --git a/internal/format/testdata/markdown/table.golden b/internal/format/testdata/markdown/table.golden index 722f405..4c2987e 100644 --- a/internal/format/testdata/markdown/table.golden +++ b/internal/format/testdata/markdown/table.golden @@ -96,4 +96,4 @@ followed by another line of text. | unquoted | It's unquoted output. | | output-2 | It's output number two. | | output-1 | It's output number one. | -| output-0.12 | terraform 0.12 only | +| output-0.12 | terraform 0.12 only | \ No newline at end of file diff --git a/internal/format/testdata/toml/toml-Empty.golden b/internal/format/testdata/toml/toml-Empty.golden index 8ca1a47..c4b4ad0 100644 --- a/internal/format/testdata/toml/toml-Empty.golden +++ b/internal/format/testdata/toml/toml-Empty.golden @@ -2,4 +2,4 @@ header = "" inputs = [] outputs = [] providers = [] -requirements = [] +requirements = [] \ No newline at end of file diff --git a/internal/format/testdata/toml/toml-HeaderFromFile.golden b/internal/format/testdata/toml/toml-HeaderFromFile.golden index c21de3b..61b050d 100644 --- a/internal/format/testdata/toml/toml-HeaderFromFile.golden +++ b/internal/format/testdata/toml/toml-HeaderFromFile.golden @@ -275,4 +275,4 @@ header = "This header comes from a custom file\n\nLorem ipsum dolor sit amet, co [[requirements]] Name = "random" - Version = ">= 2.2.0" + Version = ">= 2.2.0" \ No newline at end of file diff --git a/internal/format/testdata/toml/toml-NoHeader.golden b/internal/format/testdata/toml/toml-NoHeader.golden index 5fe523b..b934f31 100644 --- a/internal/format/testdata/toml/toml-NoHeader.golden +++ b/internal/format/testdata/toml/toml-NoHeader.golden @@ -275,4 +275,4 @@ header = "" [[requirements]] Name = "random" - Version = ">= 2.2.0" + Version = ">= 2.2.0" \ No newline at end of file diff --git a/internal/format/testdata/toml/toml-NoInputs.golden b/internal/format/testdata/toml/toml-NoInputs.golden index f9f58e0..566929d 100644 --- a/internal/format/testdata/toml/toml-NoInputs.golden +++ b/internal/format/testdata/toml/toml-NoInputs.golden @@ -47,4 +47,4 @@ inputs = [] [[requirements]] Name = "random" - Version = ">= 2.2.0" + Version = ">= 2.2.0" \ No newline at end of file diff --git a/internal/format/testdata/toml/toml-NoOutputs.golden b/internal/format/testdata/toml/toml-NoOutputs.golden index 2d00c1e..b0ea1ca 100644 --- a/internal/format/testdata/toml/toml-NoOutputs.golden +++ b/internal/format/testdata/toml/toml-NoOutputs.golden @@ -260,4 +260,4 @@ outputs = [] [[requirements]] Name = "random" - Version = ">= 2.2.0" + Version = ">= 2.2.0" \ No newline at end of file diff --git a/internal/format/testdata/toml/toml-NoProviders.golden b/internal/format/testdata/toml/toml-NoProviders.golden index 508e0e6..ab7834a 100644 --- a/internal/format/testdata/toml/toml-NoProviders.golden +++ b/internal/format/testdata/toml/toml-NoProviders.golden @@ -256,4 +256,4 @@ providers = [] [[requirements]] Name = "random" - Version = ">= 2.2.0" + Version = ">= 2.2.0" \ No newline at end of file diff --git a/internal/format/testdata/toml/toml-NoRequirements.golden b/internal/format/testdata/toml/toml-NoRequirements.golden index 650dac0..97d3a59 100644 --- a/internal/format/testdata/toml/toml-NoRequirements.golden +++ b/internal/format/testdata/toml/toml-NoRequirements.golden @@ -264,4 +264,4 @@ requirements = [] [[providers]] name = "null" alias = "" - version = "" + version = "" \ No newline at end of file diff --git a/internal/format/testdata/toml/toml-OnlyHeader.golden b/internal/format/testdata/toml/toml-OnlyHeader.golden index f0b0ea2..1b19797 100644 --- a/internal/format/testdata/toml/toml-OnlyHeader.golden +++ b/internal/format/testdata/toml/toml-OnlyHeader.golden @@ -2,4 +2,4 @@ header = "Usage:\n\nExample of 'foo_bar' module in `foo_bar.tf`.\n\n- list item inputs = [] outputs = [] providers = [] -requirements = [] +requirements = [] \ No newline at end of file diff --git a/internal/format/testdata/toml/toml-OnlyInputs.golden b/internal/format/testdata/toml/toml-OnlyInputs.golden index 2d9de50..985a4a0 100644 --- a/internal/format/testdata/toml/toml-OnlyInputs.golden +++ b/internal/format/testdata/toml/toml-OnlyInputs.golden @@ -230,4 +230,4 @@ requirements = [] type = "object({})" description = "" required = false - [inputs.default] + [inputs.default] \ No newline at end of file diff --git a/internal/format/testdata/toml/toml-OnlyOutputs.golden b/internal/format/testdata/toml/toml-OnlyOutputs.golden index c42ce9b..b6d2aab 100644 --- a/internal/format/testdata/toml/toml-OnlyOutputs.golden +++ b/internal/format/testdata/toml/toml-OnlyOutputs.golden @@ -17,4 +17,4 @@ requirements = [] [[outputs]] name = "output-0.12" - description = "terraform 0.12 only" + description = "terraform 0.12 only" \ No newline at end of file diff --git a/internal/format/testdata/toml/toml-OnlyProviders.golden b/internal/format/testdata/toml/toml-OnlyProviders.golden index c8fe164..c3d8f78 100644 --- a/internal/format/testdata/toml/toml-OnlyProviders.golden +++ b/internal/format/testdata/toml/toml-OnlyProviders.golden @@ -21,4 +21,4 @@ requirements = [] [[providers]] name = "null" alias = "" - version = "" + version = "" \ No newline at end of file diff --git a/internal/format/testdata/toml/toml-OnlyRequirements.golden b/internal/format/testdata/toml/toml-OnlyRequirements.golden index 821ccd4..8712ac8 100644 --- a/internal/format/testdata/toml/toml-OnlyRequirements.golden +++ b/internal/format/testdata/toml/toml-OnlyRequirements.golden @@ -13,4 +13,4 @@ providers = [] [[requirements]] Name = "random" - Version = ">= 2.2.0" + Version = ">= 2.2.0" \ No newline at end of file diff --git a/internal/format/testdata/toml/toml-OutputValues.golden b/internal/format/testdata/toml/toml-OutputValues.golden index 0d8e5d9..69d6d72 100644 --- a/internal/format/testdata/toml/toml-OutputValues.golden +++ b/internal/format/testdata/toml/toml-OutputValues.golden @@ -281,4 +281,4 @@ header = "Usage:\n\nExample of 'foo_bar' module in `foo_bar.tf`.\n\n- list item [[requirements]] Name = "random" - Version = ">= 2.2.0" + Version = ">= 2.2.0" \ No newline at end of file diff --git a/internal/format/testdata/toml/toml-SortByName.golden b/internal/format/testdata/toml/toml-SortByName.golden index bae0dee..ff0cc41 100644 --- a/internal/format/testdata/toml/toml-SortByName.golden +++ b/internal/format/testdata/toml/toml-SortByName.golden @@ -275,4 +275,4 @@ header = "Usage:\n\nExample of 'foo_bar' module in `foo_bar.tf`.\n\n- list item [[requirements]] Name = "random" - Version = ">= 2.2.0" + Version = ">= 2.2.0" \ No newline at end of file diff --git a/internal/format/testdata/toml/toml-SortByRequired.golden b/internal/format/testdata/toml/toml-SortByRequired.golden index 1666bbf..7ebaa0a 100644 --- a/internal/format/testdata/toml/toml-SortByRequired.golden +++ b/internal/format/testdata/toml/toml-SortByRequired.golden @@ -275,4 +275,4 @@ header = "Usage:\n\nExample of 'foo_bar' module in `foo_bar.tf`.\n\n- list item [[requirements]] Name = "random" - Version = ">= 2.2.0" + Version = ">= 2.2.0" \ No newline at end of file diff --git a/internal/format/testdata/toml/toml-SortByType.golden b/internal/format/testdata/toml/toml-SortByType.golden index 67180d1..d33a5c2 100644 --- a/internal/format/testdata/toml/toml-SortByType.golden +++ b/internal/format/testdata/toml/toml-SortByType.golden @@ -275,4 +275,4 @@ header = "Usage:\n\nExample of 'foo_bar' module in `foo_bar.tf`.\n\n- list item [[requirements]] Name = "random" - Version = ">= 2.2.0" + Version = ">= 2.2.0" \ No newline at end of file diff --git a/internal/format/testdata/toml/toml.golden b/internal/format/testdata/toml/toml.golden index f7e41b9..0ffdca8 100644 --- a/internal/format/testdata/toml/toml.golden +++ b/internal/format/testdata/toml/toml.golden @@ -275,4 +275,4 @@ header = "Usage:\n\nExample of 'foo_bar' module in `foo_bar.tf`.\n\n- list item [[requirements]] Name = "random" - Version = ">= 2.2.0" + Version = ">= 2.2.0" \ No newline at end of file diff --git a/internal/format/toml.go b/internal/format/toml.go index a6cae03..29ebd84 100644 --- a/internal/format/toml.go +++ b/internal/format/toml.go @@ -2,6 +2,7 @@ package format import ( "bytes" + "strings" "github.com/BurntSushi/toml" @@ -50,5 +51,5 @@ func (t *TOML) Print(module *tfconf.Module, settings *print.Settings) (string, e return "", err } - return buffer.String(), nil + return strings.TrimSuffix(buffer.String(), "\n"), nil } diff --git a/internal/format/util.go b/internal/format/util.go index 7d3b0ac..7d2159e 100644 --- a/internal/format/util.go +++ b/internal/format/util.go @@ -25,7 +25,7 @@ func sanitize(markdown string) string { // Remove multiple consecutive blank lines result = regexp.MustCompile(`(\r?\n){3,}`).ReplaceAllString(result, "$1$1") - result = regexp.MustCompile(`(\r?\n){2,}$`).ReplaceAllString(result, "$1") + result = regexp.MustCompile(`(\r?\n){2,}$`).ReplaceAllString(result, "") return result } diff --git a/scripts/docs/generate.go b/scripts/docs/generate.go index 78ed7ae..842101c 100644 --- a/scripts/docs/generate.go +++ b/scripts/docs/generate.go @@ -179,7 +179,7 @@ func printExample(buf *bytes.Buffer, name string) error { buf.WriteString(fmt.Sprintf(" %s\n", s)) } } - buf.WriteString("\n\n") + buf.WriteString("\n") return nil }