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

Migrate most of remaining docs from old-docs #383

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ repo_url: https://github.com/mrparkers/terraform-provider-keycloak
nav:
- Getting Started: index.md
- Data Sources:
- keycloak_group: data_sources/keycloak_group.md
- keycloak_openid_client: data_sources/keycloak_openid_client.md
- keycloak_realm: data_sources/keycloak_realm.md
- keycloak_realm_keys: data_sources/keycloak_realm_keys.md
- keycloak_role: data_sources/keycloak_role.md
- keycloak_saml_client_installation_provider: data_sources/keycloak_saml_client_installation_provider.md
- keycloak_group: data-sources/keycloak_group.md
- keycloak_openid_client: data-sources/keycloak_openid_client.md
- keycloak_realm: data-sources/keycloak_realm.md
- keycloak_realm_keys: data-sources/keycloak_realm_keys.md
- keycloak_role: data-sources/keycloak_role.md
- keycloak_saml_client_installation_provider: data-sources/keycloak_saml_client_installation_provider.md
- Resources:
- keycloak_realm: resources/keycloak_realm.md
- keycloak_realm_events: resources/keycloak_realm_events.md
Expand Down
46 changes: 46 additions & 0 deletions scripts/check-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/bash
#
# Hacky shell script to find potentially missing documentation.
# Relies on the fact that, so far, most of the source code
# filenames mirror their respective doc filename. Does not do any
# parsing (of either golang or markdown) to try and build a 100%
# accurate list, the intention is this quickly gets you a short list
# of 10-15 things to check manually.
#
# Usage:
# $ cd <git-wd-root>
# $ ./scripts/check-docs.sh


for code_file in $(ls provider)
do

if [[ "$code_file" == *"test.go" ]]; then
# echo "$code_file is a test file, ignoring"
continue
fi

doc_file=$(echo $code_file | sed -e 's|\.go|\.md|g')
if [[ "$code_file" == "resource_"* ]]; then
doc_file=$(echo $doc_file | sed -e 's|^resource_|docs/resources/|g')
# echo "Looking for $doc_file"
if [[ ! -f "$doc_file" ]]; then
echo "$doc_file does not exist."
fi

continue
fi

if [[ "$code_file" == "data_source_"* ]]; then
doc_file=$(echo $doc_file | sed -e 's|^data_source_|docs/data-sources/|g')
# echo "Looking for $doc_file"
if [[ ! -f "$doc_file" ]]; then
echo "$doc_file does not exist."
fi

continue
fi

echo "No doc file found automatically for $code_file"

done