Skip to content

Commit a1b156e

Browse files
committed
Refactor schemamd and functionmd packages to internal/
1 parent cc6300a commit a1b156e

28 files changed

+14
-17
lines changed

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ The `validate` subcommand can be used to validate the provider website documenta
158158
|---------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
159159
| `InvalidDirectoriesCheck` | Checks for valid subdirectory structure and throws an error if an invalid Terraform Provider documentation subdirectory is found. |
160160
| `MixedDirectoriesCheck` | Throws an error if both legacy documentation (`/website/docs`) and registry documentation (`/docs`) are found. |
161-
| `NumberOfFilesCheck` | Throws an error if the number of files in a directory is larger than the registry limit. |
162-
| `FileSizeCheck` | Throws an error if the documentation file is above the registry storage limit. |
161+
| `NumberOfFilesCheck` | Throws an error if the number of files in a directory is larger than the public registry limit. |
162+
| `FileSizeCheck` | Throws an error if the documentation file is above the public registry storage limit. |
163163
| `FileExtensionCheck` | Throws an error if the extension of the given file is not a valid registry documentation extension. |
164164
| `FrontMatterCheck` | Checks the YAML frontmatter of documentation for missing required fields or invalid fields. |
165165
| `FileMismatchCheck` | Throws an error if the names/number of resources/datasources/functions in the provider schema does not match the names/number of files in the corresponding documentation directory |
@@ -327,12 +327,6 @@ Your help and patience is truly appreciated.
327327

328328
## Contributing
329329

330-
## Go Compatibility
331-
332-
This project follows the [support policy](https://golang.org/doc/devel/release.html#policy) of Go as its support policy. The two latest major releases of Go are supported by the project.
333-
334-
Currently, that means Go **1.21** or later must be used when including this project as a dependency.
335-
336330
### License Headers
337331
All source code files in this repository (excluding autogenerated files like `go.mod`, prose, and files excluded in [.copywrite.hcl](.copywrite.hcl)) must have a license header at the top.
338332

functionmd/render.go renamed to internal/functionmd/render.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
tfjson "github.com/hashicorp/terraform-json"
1212

13-
"github.com/hashicorp/terraform-plugin-docs/schemamd"
13+
"github.com/hashicorp/terraform-plugin-docs/internal/schemamd"
1414
)
1515

1616
// RenderArguments returns a Markdown formatted string of the function arguments.

functionmd/render_test.go renamed to internal/functionmd/render_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/google/go-cmp/cmp"
1313
tfjson "github.com/hashicorp/terraform-json"
1414

15-
"github.com/hashicorp/terraform-plugin-docs/functionmd"
15+
"github.com/hashicorp/terraform-plugin-docs/internal/functionmd"
1616
)
1717

1818
func TestRenderArguments(t *testing.T) {

internal/provider/template.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ import (
1616

1717
tfjson "github.com/hashicorp/terraform-json"
1818

19-
"github.com/hashicorp/terraform-plugin-docs/functionmd"
19+
"github.com/hashicorp/terraform-plugin-docs/internal/functionmd"
2020
"github.com/hashicorp/terraform-plugin-docs/internal/mdplain"
21+
"github.com/hashicorp/terraform-plugin-docs/internal/schemamd"
2122
"github.com/hashicorp/terraform-plugin-docs/internal/tmplfuncs"
22-
"github.com/hashicorp/terraform-plugin-docs/schemamd"
2323
)
2424

2525
const (
File renamed without changes.
File renamed without changes.
File renamed without changes.

schemamd/render_test.go renamed to internal/schemamd/render_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import (
1111

1212
"github.com/google/go-cmp/cmp"
1313
tfjson "github.com/hashicorp/terraform-json"
14-
"github.com/hashicorp/terraform-plugin-docs/schemamd"
14+
15+
"github.com/hashicorp/terraform-plugin-docs/internal/schemamd"
1516
)
1617

1718
func TestRender(t *testing.T) {

schemamd/write_attribute_description_test.go renamed to internal/schemamd/write_attribute_description_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
tfjson "github.com/hashicorp/terraform-json"
1212
"github.com/zclconf/go-cty/cty"
1313

14-
"github.com/hashicorp/terraform-plugin-docs/schemamd"
14+
"github.com/hashicorp/terraform-plugin-docs/internal/schemamd"
1515
)
1616

1717
func TestWriteAttributeDescription(t *testing.T) {

schemamd/write_block_type_description_test.go renamed to internal/schemamd/write_block_type_description_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import (
99

1010
"github.com/google/go-cmp/cmp"
1111
tfjson "github.com/hashicorp/terraform-json"
12-
"github.com/hashicorp/terraform-plugin-docs/schemamd"
12+
13+
"github.com/hashicorp/terraform-plugin-docs/internal/schemamd"
1314
)
1415

1516
func TestWriteBlockTypeDescription(t *testing.T) {

schemamd/write_nested_attribute_type_description_test.go renamed to internal/schemamd/write_nested_attribute_type_description_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ import (
99

1010
"github.com/google/go-cmp/cmp"
1111
tfjson "github.com/hashicorp/terraform-json"
12-
"github.com/hashicorp/terraform-plugin-docs/schemamd"
1312
"github.com/zclconf/go-cty/cty"
13+
14+
"github.com/hashicorp/terraform-plugin-docs/internal/schemamd"
1415
)
1516

1617
func TestWriteNestedAttributeTypeDescription(t *testing.T) {
File renamed without changes.

schemamd/write_type_test.go renamed to internal/schemamd/write_type_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/google/go-cmp/cmp"
1212
"github.com/zclconf/go-cty/cty"
1313

14-
"github.com/hashicorp/terraform-plugin-docs/schemamd"
14+
"github.com/hashicorp/terraform-plugin-docs/internal/schemamd"
1515
)
1616

1717
func TestWriteType(t *testing.T) {

0 commit comments

Comments
 (0)