Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validate: allow resources.md.tmpl and data-sources.md.tmpl to pass validation #184

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,9 @@
# 0.14.0 (Unreleased)

BUG FIXES:

* cmd/validate: allow top level templates (`resources.md.tmpl` and `data-sources.md.tmpl`) to pass validation ([#184](https://github.com/hashicorp/terraform-plugin-docs/pull/184)).

# 0.13.0 (July 8, 2022)

ENHANCEMENTS:
Expand Down
7 changes: 6 additions & 1 deletion internal/provider/validate.go
Expand Up @@ -34,7 +34,6 @@ func Validate(ui cli.Ui) error {
return err
}
}
return err
case dirExists("docs"):
ui.Info("detected static docs directory, running checks")
return validateStaticDocs(ui, "docs")
Expand All @@ -43,6 +42,8 @@ func Validate(ui cli.Ui) error {
return validateLegacyWebsite(ui, "website")
}

ui.Info("validation checks complete, no issues detected!")

return nil
}

Expand All @@ -55,6 +56,10 @@ func validateTemplates(ui cli.Ui, dir string) error {
checkAllowedFiles(
"index.md",
"index.md.tmpl",
"resources.md",
"resources.md.tmpl",
"data-sources.md",
"data-sources.md.tmpl",
),
checkAllowedDirs(
"data-sources",
Expand Down