Skip to content

Commit

Permalink
Check for language setting in GCP docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gereonvey authored Jul 18, 2023
1 parent 02aa8ff commit 15dd0d4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion checks-checker
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import logging
import re
import sys
import types
from urllib.parse import urlparse
from urllib.parse import urlparse, parse_qs
import glob

import requests
Expand Down Expand Up @@ -45,6 +45,12 @@ def checkUrl(url: str) -> tuple:
parts = urlparse(url)

# formal checks first
if parts.query:
query=parse_qs(parts.query)
if parts.hostname == "cloud.google.com":
if query['hl']:
errors.append(f"Don't request a specific document language (?hl={query['hl'][0]}) in {url}")

if parts.hostname == "documentation.suse.com":
# We should/must use the single-html version for SUSE documentation
# Otherwise links might break if the the document structure changes
Expand Down

0 comments on commit 15dd0d4

Please sign in to comment.