Skip to content
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

SA1600 fires for internal interfaces even if documentInternalElements is false #3888

Open
ds1709 opened this issue Sep 2, 2024 · 2 comments

Comments

@ds1709
Copy link

ds1709 commented Sep 2, 2024

As described, SA1600 fires warning for internal interfaces even if documentInternalElements option set to false. Works correct for classes.
My stylecop.json

{
  "settings": {
    "orderingRules": { "usingDirectivesPlacement": "outsideNamespace" },
    "documentationRules": {
      "documentInternalElements": false,
      "documentationCulture": "ru-RU"
    }
  }
}
@bjornhellander
Copy link
Contributor

This is by design, although not without problems. See https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/Configuration.md#documentation-requirements, specifically the description for documentInterfaces:

Specifies whether interface members need to be documented. When true, all interface members require documentation, regardless of accessibility.

Note that although it says "interface members", this also applies to interfaces themselves.

If you do not require documentation specifically for interfaces, then you can set documentInterfaces to false. That would mean that the remaining documentation settings would apply equally for interfaces and other types.

Duplicate of #2934. This also links to a request to make SA1600 etc more configurable.

@ds1709
Copy link
Author

ds1709 commented Sep 3, 2024

Setting documentInterfaces to false solves the problem partialy. It not requires to document internal interfaces now, but it also not requires to document members of public interfaces, but requires to document interface itself.
image

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

No branches or pull requests

2 participants