-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrity filter #22
Comments
Really good idea. Also could warn for name mismatch... really easy to get the doc out of date with the code, that's the problem with every single dynamically typed language. |
I'm wondering whether this issue would be made irrelevant with SassDoc/sassdoc#304. |
@hugogiraudel For a map yep, but not for function/mixins arguments I guess. |
SassDoc/sassdoc#304 should be thought as a way for SassDoc to be more aware about the code. Function and mixin arguments should be quite easy to parse. |
I had that issue in mind, but I feel like what's described in there is addressing only part of the problem (default values). Here is just a fairly dumb workaround that can be used right away. If we go the "parser way", it would be interesting to be able to create and fill a full annotation from code. There will be quite some decisions to take. |
Only the type might be tricky in case the parameter has no default value. Else, you can guess.
You don’t. Either you let the parser quick grab parameters, or you document them yourselves.
If a parameter is documented, the parser does not do anything. |
Then we loose the main idea behind the two issues: keeping comments and code in sync :) |
Idea: add a new filter that compare the number of documented params and effective code params.
Same for map properties.
Warn in console if not equal.
I've been working with mixins at 10+ params (sigh) recently and it's really easy to forget to update the comments in case you add or remove a param.
The text was updated successfully, but these errors were encountered: