Search code examples
visual-studiocoding-stylestylecop

StyleCop Spelling Rules and Hyperlinks


Is there a way to disable StyleCop spell-check for hyperlinks? I really like the rule feature, but it's complaining about misspelled words in a lot of my hyperlinks.


Solution

  • I found 2 possible workarounds for this:

    1) Attempt to CamelCase your hyperlinks.

    I have a couple of issues with this approach. First off, I like all my hyperlinks to be lowercase, if possible; I'm OCD about it. Second (and more importantly), case matters on some hyperlinks. So doing this to get past the style error, but potentially breaks your hyperlinks.

    2) Throw your hyperlinks inside a <see href=""/> tag.

    I have found that StyleCop will not attempt to enforce it's spell check feature in this case.