Note that there are some explanatory texts on larger screens.

plurals
  1. POAutomatically select correct CodeAnalysis ruleset
    primarykey
    data
    text
    <p>We have a number of large solutions and have a number of ruleset files based on the different project types. For example we have:</p> <ul> <li><p>A Sharepoint Rulesset containing:</p> <ul> <li>Microsoft All Rules</li> <li>MSOCAF rules</li> <li>SPDisposeChecker rule</li> <li>A number of custom rules</li> </ul></li> <li><p>A test project ruleset</p> <ul> <li>Microsoft All Rules</li> <li>Disabled a few naming guideline rules (the use of underscores for example)</li> <li>A number of Test specific rules that similar to TypeMock TestLint</li> <li>A number of custom rules</li> </ul></li> <li><p>A standard ruleset</p> <ul> <li>Microsoft All Rules</li> <li>A number of custom rules</li> </ul></li> </ul> <p>I'd love it if Code Analysis were able to automatically select the right set based on the project type.</p> <p>I haven't found the ideal way to do this. Things I'll consider:</p> <ul> <li>Drop a targets file in the msbuild folder of the build server which derives the project type based on the existence of specific build targets (yuk)</li> <li>Specify the CodeAnalayis Rules file in each target file for each project type (yuk)</li> <li>Create a custom Targets file and include that in every project, set a property in each project to select the correct project type. (yuk)</li> <li>Alter the rules themselves to know whether they're in the correct context (possible for custom rules, not feasible for the default rules).</li> </ul> <p>What we're currently doing:</p> <ul> <li>Specify the ruleset manually for each project.</li> </ul> <p>I'd love to hear ideas for a better solution...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload