Skip to content

Graindoc: Consider warning or adding undocumented params to the param table. #2281

@spotandjake

Description

@spotandjake

I noticed if you document a program like:

module Main
/**
 * @param a: This is the first
 */
provide let test = (a, b) => a + b

The output parameter table only has an entry for a, while this isn't the end of the world because the output signature is still correct I think it would still be beneficial to output the b param to the table with type info and a blank description. Alternatively we might want to consider emitting a warning (maybe we allow a --lint flag on graindoc? this is a bigger discussion). The reason the current behaviour is problematic is it's easy to miss undocumented parameters and then the parameter table (which as a user reading docs I would consider a source of truth) isn't complete and doesn't match the function signature.

Metadata

Metadata

Assignees

Labels

good second issueGreat issues if you're familiar with contributing to Grain.graindocIssues related to Graindoc

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions