Skip to content

feat: check command -@param/@returns tag validation#19

Merged
Zih0 merged 7 commits intofeat/check-commandfrom
feat/check-interface-validator
Mar 12, 2026
Merged

feat: check command -@param/@returns tag validation#19
Zih0 merged 7 commits intofeat/check-commandfrom
feat/check-interface-validator

Conversation

@Zih0
Copy link
Collaborator

@Zih0 Zih0 commented Mar 12, 2026

Changes

  • Validate JSDoc completeness for exports with @public tag
  • Detect missing @param and @returns tags
  • Detect unused @param tags that don't match actual parameters
  • Extract validatePublic function for testability

Each declaration type has its own validator with specific validation targets:

Declaration Validator Validates
interface InterfaceValidator properties, methods
...

TODO

Currently, the build command treats params, properties and members as @param
I think each of them should be handled separately

Zih0 added 7 commits March 12, 2026 15:08
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.
@vercel
Copy link

vercel bot commented Mar 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docflow-docs Ready Ready Preview, Comment Mar 12, 2026 1:58pm

Request Review

@Zih0 Zih0 merged commit 45ad040 into feat/check-command Mar 12, 2026
2 of 3 checks passed
@Zih0 Zih0 deleted the feat/check-interface-validator branch March 12, 2026 13:59
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
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.

1 participant