SourceFileList to ignore linked files

Apr 8, 2011 at 2:08 AM

I'm trying to use <SourceFileList> to ignore linked files from projects that I don't control. I can't figure out the right syntax because the files never get ignored. Can I do relative paths like this? I was using this page as a guide: http://devjitsu.com/blog/2010/06/29/stylecop-file-lists-in-4-4/

This Settings.StyleCop file is in the root of my project.

 

<StyleCopSettings Version="4.3">
  <GlobalSettings>
    <StringProperty Name="MergeSettingsFiles">NoMerge</StringProperty>
    <BooleanProperty Name="WriteCache">False</BooleanProperty>
  </GlobalSettings>
  <Analyzers>
...a bunch of rules...
  </Analyzers>
  <SourceFileList>
    <SourceFile>..\otools\foo\inc\MyFile.cs</SourceFile>
    <Settings>
      <GlobalSettings>
	<StringProperty Name="MergeSettingsFiles">NoMerge</StringProperty>
        <BooleanProperty Name="RulesEnabledByDefault">False</BooleanProperty>
      </GlobalSettings>
    </Settings>
  </SourceFileList>
</StyleCopSettings>

 

 

Apr 12, 2011 at 2:09 AM

StyleCop matches based on FileName only. "MyFile.cs" is sufficient in the <SourceFile> block