You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
I'm encountering warnings with the following common StyleCop rules:
SA1629:Documentation text should end with a period
e.g., hard to get something like <url>https://foo:port</url> to have a trailing period.
SA1612:Element parameter documentation should match element parameters
This is especially problematic when using a class argument for e.g., in an Azure Function that abstracts away multiple (actual) arguments and lets the infrastructure handle query-string parsing. A typical function may look like public async Task<IActionResult> Run([HttpTrigger(...)CompositeType args, HttpRequest req) {}, where CompsiteType actually represents something like class {public string a; public int b;}. The OpenApi documentation would require two <param> xml elements corresponding to a and b in this instance, whereas the C# expectation is that only one <param> element corresponding to args is written in the xml doc-comment.
SA1611:Element parameters should be documented
This is also similar to SA1612.
In addition to these, CS1573 (Parameter has no matching param tag in the XML comment) and CS1572 (XML comment has a param tag, but there is no parameter by that name) warnings are also generated - which roughly represent the same problem.
These can be suppressed using pragmas or [SuppressMessage] attributes, of course. That said, (a) it would be great to have clear guidelines for dealing with these sorts of conflicts and (b) over time, some thought could be put into changes either here (or even to StyleCop) to provide better control over suppressing these sorts of warnings more elegantly.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm encountering warnings with the following common StyleCop rules:
<url>https://foo:port</url>
to have a trailing period.class
argument for e.g., in an Azure Function that abstracts away multiple (actual) arguments and lets the infrastructure handle query-string parsing. A typical function may look likepublic async Task<IActionResult> Run([HttpTrigger(...)CompositeType args, HttpRequest req) {}
, whereCompsiteType
actually represents something likeclass {public string a; public int b;}
. The OpenApi documentation would require two<param>
xml elements corresponding toa
andb
in this instance, whereas the C# expectation is that only one<param>
element corresponding toargs
is written in the xml doc-comment.In addition to these, CS1573 (Parameter has no matching param tag in the XML comment) and CS1572 (XML comment has a param tag, but there is no parameter by that name) warnings are also generated - which roughly represent the same problem.
These can be suppressed using pragmas or
[SuppressMessage]
attributes, of course. That said, (a) it would be great to have clear guidelines for dealing with these sorts of conflicts and (b) over time, some thought could be put into changes either here (or even to StyleCop) to provide better control over suppressing these sorts of warnings more elegantly.The text was updated successfully, but these errors were encountered: