tests(skill-validator): cover collection utilities, predicates, and main CLI#237
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, emptyline_has_inline_allow_marker— known markers, plain lines, emptyis_path_allowlisted— README/AGENTS, projects/_template, .github/; skill files and arbitrary docs are not allowlistedcollect_files_to_check— md files returned, missing dir →[], non-md excluded, recurses into subdirscollect_skill_dirs— immediate child dirs returned, missing dir →{}, files excluded, paths are absolutecollect_doc_files— docs/ and projects/_template/ both scanned, missing dirs →{}, non-md excluded, paths are absolutemain— returns 0 on valid skills, 1 on hard violations with message,--skip-categoriesfilters violations,--strictpromotes soft to hard