Skip to content

Commit

Permalink
Merge pull request #216 from Alexhuszagh/docstodo
Browse files Browse the repository at this point in the history
Update our docs checker to ensure no TODOs exist.
  • Loading branch information
Alexhuszagh authored Jan 12, 2025
2 parents 0ffc65c + 1696287 commit a654076
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions scripts/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,15 @@ async def validate_links() -> None:
continue
with path.open(encoding='utf-8') as file:
data = file.read()
parser.feed(path.name, data)
if 'SKIP_LINKS' not in os.environ:
parser.feed(path.name, data)
if 'SKIP_TODO' not in os.environ:
if 'TODO' in data:
raise ValueError(f'Found TODO in documentation for file "{path.name}".')

# deduplicate and validate all our links
await parser.validate()
if 'SKIP_LINKS' not in os.environ:
await parser.validate()
print(f'Processed and validated {len(parser.links)} links...')


Expand Down Expand Up @@ -238,7 +243,7 @@ async def main() -> None:

if 'SKIP_TOML' not in os.environ:
validate_toml()
if 'SKIP_LINKS' not in os.environ:
if 'SKIP_LINKS' not in os.environ or 'SKIP_TODO' not in os.environ:
await validate_links()
if 'SKIP_FORMAT' not in os.environ:
sys.exit(validate_format())
Expand Down

0 comments on commit a654076

Please sign in to comment.