feat: check command -@param/@returns tag validation#19
Merged
Zih0 merged 7 commits intofeat/check-commandfrom Mar 12, 2026
Merged
feat: check command -@param/@returns tag validation#19Zih0 merged 7 commits intofeat/check-commandfrom
Zih0 merged 7 commits intofeat/check-commandfrom
Conversation
Add ValidationError/ValidationResult types and abstract Validator<T> base class using Template Method pattern (validate -> collectErrors).
Add EMPTY_PARSED_JSDOC constant and getJSDocParameterNames helper for centralized JSDoc parameter name extraction with nested support.
Add findMissingDocs, findUnusedDocs (difference-based detection) and collectPropertySignaturePaths (recursive path collection).
Validate interface property/method JSDoc coverage including nested properties, optional/readonly modifiers. 13 test cases.
Swap findUnusedDocs(jsDocNames, validTargets) to findUnusedDocs(validTargets, jsDocNames) so both find*Docs functions take (codeSymbols, jsDocNames) consistently.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Zih0
added a commit
that referenced
this pull request
Mar 13, 2026
…and (#20) * feat: check command -@param/@returns tag validation (#19) * feat(check): add validation types and Validator base class Add ValidationError/ValidationResult types and abstract Validator<T> base class using Template Method pattern (validate -> collectErrors). * feat(check): add JSDoc utility functions Add EMPTY_PARSED_JSDOC constant and getJSDocParameterNames helper for centralized JSDoc parameter name extraction with nested support. * feat(check): add common validator utility functions Add findMissingDocs, findUnusedDocs (difference-based detection) and collectPropertySignaturePaths (recursive path collection). * feat(check): add InterfaceValidator with tests Validate interface property/method JSDoc coverage including nested properties, optional/readonly modifiers. 13 test cases. * fix: remove 'as const' assertion from missing and unused docs types * refactor(check): unify findUnusedDocs parameter order Swap findUnusedDocs(jsDocNames, validTargets) to findUnusedDocs(validTargets, jsDocNames) so both find*Docs functions take (codeSymbols, jsDocNames) consistently. * fix(check): include interface methods in missing docs check * fix: format * feat(check): add validator utility functions Add collectParameterPaths and collectPropertyAssignmentPaths utilities for resolving nested dot-separated paths from function parameters and object literal assignments. Add JSDoc to existing collectPropertySignaturePaths. * feat(check): add TypeAliasValidator with tests * feat(check): add ObjectLiteralValidator with tests * feat(check): add FunctionValidator with tests * feat(check): add validation pipeline with tests * refactor(check): integrate validation pipeline into check command * docs(check): enhance documentation for check command to include validation of @param and @returns tags * feat(check): add @Property tag parsing to JSDocParser * feat(check): validate @Property tags for interface, type alias, and object literal * docs(check): update documentation to reflect @Property validation
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.
Changes
@publictag@paramand@returnstags@paramtags that don't match actual parametersvalidatePublicfunction for testabilityEach declaration type has its own validator with specific validation targets:
InterfaceValidatorTODO
Currently, the
buildcommand treats params, properties and members as@paramI think each of them should be handled separately