简体   繁体   中英

How do I get code analysis to ignore line breaks in my resource files?

Is there a way to get code analysis to ignore line breaks <br> when giving me spelling warnings about text in my resource files? I know I can add them to my code analysis dictionary but I'm pretty sure there is a way to get them ignored without that.

The warning is the standard CA1703 warning which for br tags gives me something like:

correct the spelling of 'br' in string value 'blah blah <br> blah'

This is a normal winform project using Visual Studio 2010.

Add a file called CustomDictionary.xml to your project

That looks something like

<?xml version="1.0" encoding="utf-8" ?>
<Dictionary>
  <Words>
    <Recognized>
      <Word>br</Word>
    </Recognized>
  </Words>
</Dictionary>

or may be <br>, may be, never used it on tags.

More info on it here VS Code Analysis and dictionaries

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM