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
We regularly use <seealso href="..."> in our XML comments to reference a URL that we may have sourced part of our code from. However, MEN002 triggers in some of these situations even though XML attributes cannot be broken across multiple lines. We are forced to use a pragma suppression for MEN002 around the whole XML comment in these cases. I was going to ask that this be added as an extension of AllowLongUriLines, but I imagine there could be other really long XML attribute values that aren't a URI. We've switched to using Roslynator RCS0056 for the time being since it also has a code fix provider, but it seems to skip analyzing XML comments altogether.
The text was updated successfully, but these errors were encountered:
Thanks for the suggestion and info! I've implemented this in v3.0.10. I made it part of the AllowLongUriLines logic since I only support long URLs in href attributes on see and seealso tags. If someone is using long attributes on other XML comment tags, then there's often a way to shorten them (e.g., a using directive for shorter cref attributes).
I previously didn't know that the see and seealso tags supported href, so that's great to learn! I've put a lot of http(s) URLs into remarks comment blocks over the years, and they'd have been better off in <see href="..."/> tags.
I also didn't know Roslynator had a similar rule. I'd hate to try to write a smart C# line wrapping code fixer! That sounds like a nightmare, so I'll leave the line wrapping up to humans. :-)
We regularly use
<seealso href="...">
in our XML comments to reference a URL that we may have sourced part of our code from. However, MEN002 triggers in some of these situations even though XML attributes cannot be broken across multiple lines. We are forced to use apragma
suppression for MEN002 around the whole XML comment in these cases. I was going to ask that this be added as an extension ofAllowLongUriLines
, but I imagine there could be other really long XML attribute values that aren't a URI. We've switched to using Roslynator RCS0056 for the time being since it also has a code fix provider, but it seems to skip analyzing XML comments altogether.The text was updated successfully, but these errors were encountered: