-
Notifications
You must be signed in to change notification settings - Fork 511
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
Add option to ignore documentation errors on internal members and types #2361
Comments
You can use stylecop.json to configure the documentation requirements which are relevant to your projects. If the available options do not provide the flexibility you need, feel free to open a new issue describing your proposed addition. 😄 |
Thanks @sharwell
Also the doc example indicates there's an |
...actually it seems as if all this does is not require documentation. If you do provide some documentation but doesn't follow all the rules, you still get warnings. We should be allowed to use I still think this issue is valid and should be re-opened, as I'm doing exactly what you asked: Asked for another setting to ignore doc errors on internal members. This is different from requiring documentation in the first place. |
@dotMorten The table is correct; the example should be updated.
In general this is the intended behavior.
Sure |
Thanks! Here's my proposal then: {
"settings": {
"documentationRules": {
"ignoreWarningsOnInternalElements": true,
"ignoreWarningsOnPrivateElements": true
}
} Alternatively specify which warnings you want to ignore on non-public members: {
"settings": {
"documentationRules": {
"ignoreWarningsOnInternalElements": [1601,1604,1621],
"ignoreWarningsOnPrivateElements": [1601,1604,1621]
}
} |
@dotMorten Is there some reason why the internal documentation can't be updated? It sounds like the warnings being reported are legitimate and in my experience not particularly difficult to adhere to. I would expect the following when
If you have counterexamples for these behaviors they can be filed as bugs without needing a new proposed option. Also let me know if there are other diagnostic IDs you are seeing. |
Yes, we get over 500 warnings on internal members (and that's after lots of clean-up). Warnings like I don't use the proper Often documenting just the summary and not worrying about the obvious parameter description is sufficient for internal members. It's sad that removing the entire doc tags is easier than allowing the devs to at least add a little that gives other devs on the team some intellisense for the method. We know what a constructor does, but might need more specifics up front instead for internal consumption of internal members which is quite often the case. It's better than the current state that encourages getting away with less doc over more doc. Sure in a perfect world we have extensive documentation for all bits - public and internal, but it's a trade-off between no doc or too much doc, and striking the right balance. |
This is also supposed to work (i.e. |
...right but it triggers warnings if wording isn't correct for the summary, if |
I need some time to think about this. Would be interested in feedback from others too. |
We are also dissatisfied with the current behavior, which, based on what @sharwell posted earlier, should be considered buggy. Basically, I'm glad to hear that this is not the desired behavior. I may be able to look into fixing this, if no one else has the time or interest. |
@m-akinc If you can, please file specific bugs for each case you find. This will save a whole bunch of time for whoever ends up working on the issues. 👍 |
@dotMorten @m-akinc I created pull request #2447 to fix the behavior of SA1604, SA1611, SA1615, and SA1618. |
It looks like the remaining rules that need to be tested (and updated if they fail) are:
|
@dotMorten This should be substantially improved in today's release (1.1.0-beta004) |
@sharwell I think SA1629 should also be disabled when
|
The documentation checkers are really useful for ensure consistency and completeness of XML doc for later generating API reference documentation. However if you put a
<summary>
tag on an internal member for your own sake, but don't follow all the rules for documenting the entire member as the rules dictate, you get a lot of warnings.Most of the warnings aren't really that important for internal documentation, as most of it pertain to generating API doc. I'd like to be able to turn off the documentation checks for anything not public.
Or a general pattern to set the global suppression of a rule to only apply to public/internal/etc. (as long as we all promise not to misuse them 😄 )
The text was updated successfully, but these errors were encountered: