Skip to content

tests(skill-validator): cover collection utilities, predicates, and main CLI#237

Merged
potiuk merged 2 commits into
apache:mainfrom
justinmclean:skill-validator-test-coverage
May 20, 2026
Merged

tests(skill-validator): cover collection utilities, predicates, and main CLI#237
potiuk merged 2 commits into
apache:mainfrom
justinmclean:skill-validator-test-coverage

Conversation

@justinmclean
Copy link
Copy Markdown
Member

37 new tests across 7 classes filling the remaining coverage gaps in test_validator.py.

Changes

tests/test_validator.py — new test cases covering:

  • is_placeholder_url — angle-bracket tokens, ellipsis, real URLs, empty
  • line_has_inline_allow_marker — known markers, plain lines, empty
  • is_path_allowlisted — README/AGENTS, projects/_template, .github/; skill files and arbitrary docs are not allowlisted
  • collect_files_to_check — md files returned, missing dir → [], non-md excluded, recurses into subdirs
  • collect_skill_dirs — immediate child dirs returned, missing dir → {}, files excluded, paths are absolute
  • collect_doc_files — docs/ and projects/_template/ both scanned, missing dirs → {}, non-md excluded, paths are absolute
  • main — returns 0 on valid skills, 1 on hard violations with message, --skip-categories filters violations, --strict promotes soft to hard

…ain CLI

37 new tests across 7 classes:

- is_placeholder_url: angle-bracket tokens, ellipsis, real URLs, empty
- line_has_inline_allow_marker: known markers, plain lines, empty
- is_path_allowlisted: README/AGENTS, projects/_template, .github/,
  skill files and arbitrary docs are not allowlisted
- collect_files_to_check: md files returned, missing dir → [], non-md
  excluded, recurses into subdirs
- collect_skill_dirs: immediate child dirs returned, missing dir → {},
  files excluded, paths are absolute
- collect_doc_files: docs/ and projects/_template/ both scanned, missing
  dirs → {}, non-md excluded, paths are absolute
- main: returns 0 on valid skills, 1 on hard violations with message,
  --skip-categories filters violations, --strict promotes soft to hard

https://claude.ai/code/session_01WEx58ofmTyCe2YhCppV3qN
@justinmclean justinmclean self-assigned this May 20, 2026
Copy link
Copy Markdown
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

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

Nice. more coverage :)

@potiuk potiuk merged commit 319e5c6 into apache:main May 20, 2026
13 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.

3 participants