Skip to content

fix(scope): warn on empty scope segments#70

Merged
Evenss merged 1 commit into
ob-labs:mainfrom
wananing:fix/scope-lint-empty-segments
Jun 18, 2026
Merged

fix(scope): warn on empty scope segments#70
Evenss merged 1 commit into
ob-labs:mainfrom
wananing:fix/scope-lint-empty-segments

Conversation

@wananing

Copy link
Copy Markdown
Contributor

Flag repeated, leading, or trailing slashes in scope linting by detecting empty path segments.

Fixes #56.

Summary

Make scope linting report malformed scopes that contain empty path segments, such as acme//pay.

Solution Description

  • Detect empty scope path segments by checking scope.split("/").
  • Emit a lint warning for repeated, leading, or trailing slashes.
  • Add a unit test covering _lint_scope("acme//pay").

Verified with:

  • uv run ruff check src/ tests/
  • uv run ruff format --check src/ tests/
  • uv run pytest tests/ -q

Flag repeated, leading, or trailing slashes in scope linting by detecting empty path segments.

Fixes ob-labs#56.
@webup webup requested a review from Evenss June 18, 2026 07:03

@Evenss Evenss left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Evenss Evenss merged commit d1d5260 into ob-labs:main Jun 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add scope lint warning for repeated slashes

2 participants