summaryrefslogtreecommitdiffstats
path: root/tools/StyleCop
diff options
context:
space:
mode:
Diffstat (limited to 'tools/StyleCop')
-rw-r--r--tools/StyleCop/Docs/StyleCop.chmbin0 -> 259004 bytes
-rw-r--r--tools/StyleCop/Microsoft.SourceAnalysis.Targets5
-rw-r--r--tools/StyleCop/Microsoft.StyleCop.CSharp.Rules.dllbin0 -> 186752 bytes
-rw-r--r--tools/StyleCop/Microsoft.StyleCop.CSharp.dllbin0 -> 231288 bytes
-rw-r--r--tools/StyleCop/Microsoft.StyleCop.Targets117
-rw-r--r--tools/StyleCop/Microsoft.StyleCop.dllbin0 -> 255848 bytes
-rw-r--r--tools/StyleCop/Settings.StyleCop21
-rw-r--r--tools/StyleCop/StyleCopSettingsEditor.exebin0 -> 20336 bytes
8 files changed, 143 insertions, 0 deletions
diff --git a/tools/StyleCop/Docs/StyleCop.chm b/tools/StyleCop/Docs/StyleCop.chm
new file mode 100644
index 0000000..cf062a0
--- /dev/null
+++ b/tools/StyleCop/Docs/StyleCop.chm
Binary files differ
diff --git a/tools/StyleCop/Microsoft.SourceAnalysis.Targets b/tools/StyleCop/Microsoft.SourceAnalysis.Targets
new file mode 100644
index 0000000..4b4a625
--- /dev/null
+++ b/tools/StyleCop/Microsoft.SourceAnalysis.Targets
@@ -0,0 +1,5 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <!-- This targets file is obsolete and will be removed in a future version of StyleCop. -->
+ <!-- Redirect your imports to the Microsoft.StyleCop.Targets file. -->
+ <Import Project="Microsoft.StyleCop.Targets" />
+</Project>
diff --git a/tools/StyleCop/Microsoft.StyleCop.CSharp.Rules.dll b/tools/StyleCop/Microsoft.StyleCop.CSharp.Rules.dll
new file mode 100644
index 0000000..c9c50f5
--- /dev/null
+++ b/tools/StyleCop/Microsoft.StyleCop.CSharp.Rules.dll
Binary files differ
diff --git a/tools/StyleCop/Microsoft.StyleCop.CSharp.dll b/tools/StyleCop/Microsoft.StyleCop.CSharp.dll
new file mode 100644
index 0000000..80ed66a
--- /dev/null
+++ b/tools/StyleCop/Microsoft.StyleCop.CSharp.dll
Binary files differ
diff --git a/tools/StyleCop/Microsoft.StyleCop.Targets b/tools/StyleCop/Microsoft.StyleCop.Targets
new file mode 100644
index 0000000..9220008
--- /dev/null
+++ b/tools/StyleCop/Microsoft.StyleCop.Targets
@@ -0,0 +1,117 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <!-- Specify where tasks are implemented. -->
+ <UsingTask AssemblyFile="Microsoft.StyleCop.dll" TaskName="StyleCopTask"/>
+
+ <PropertyGroup>
+ <BuildDependsOn>$(BuildDependsOn);StyleCop</BuildDependsOn>
+ <RebuildDependsOn>StyleCopForceFullAnalysis;$(RebuildDependsOn)</RebuildDependsOn>
+ </PropertyGroup>
+
+ <!-- Define StyleCopForceFullAnalysis property. -->
+ <PropertyGroup Condition="('$(SourceAnalysisForceFullAnalysis)' != '') and ('$(StyleCopForceFullAnalysis)' == '')">
+ <StyleCopForceFullAnalysis>$(SourceAnalysisForceFullAnalysis)</StyleCopForceFullAnalysis>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(StyleCopForceFullAnalysis)' == ''">
+ <StyleCopForceFullAnalysis>false</StyleCopForceFullAnalysis>
+ </PropertyGroup>
+
+ <!-- Define StyleCopCacheResults property. -->
+ <PropertyGroup Condition="('$(SourceAnalysisCacheResults)' != '') and ('$(StyleCopCacheResults)' == '')">
+ <StyleCopCacheResults>$(SourceAnalysisCacheResults)</StyleCopCacheResults>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(StyleCopCacheResults)' == ''">
+ <StyleCopCacheResults>true</StyleCopCacheResults>
+ </PropertyGroup>
+
+ <!-- Define StyleCopTreatErrorsAsWarnings property. -->
+ <PropertyGroup Condition="('$(SourceAnalysisTreatErrorsAsWarnings)' != '') and ('$(StyleCopTreatErrorsAsWarnings)' == '')">
+ <StyleCopTreatErrorsAsWarnings>$(SourceAnalysisTreatErrorsAsWarnings)</StyleCopTreatErrorsAsWarnings>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(StyleCopTreatErrorsAsWarnings)' == ''">
+ <StyleCopTreatErrorsAsWarnings>true</StyleCopTreatErrorsAsWarnings>
+ </PropertyGroup>
+
+ <!-- Define StyleCopEnabled property. -->
+ <PropertyGroup Condition="('$(SourceAnalysisEnabled)' != '') and ('$(StyleCopEnabled)' == '')">
+ <StyleCopEnabled>$(SourceAnalysisEnabled)</StyleCopEnabled>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(StyleCopEnabled)' == ''">
+ <StyleCopEnabled>true</StyleCopEnabled>
+ </PropertyGroup>
+
+ <!-- Define StyleCopOverrideSettingsFile property. -->
+ <PropertyGroup Condition="('$(SourceAnalysisOverrideSettingsFile)' != '') and ('$(StyleCopOverrideSettingsFile)' == '')">
+ <StyleCopOverrideSettingsFile>$(SourceAnalysisOverrideSettingsFile)</StyleCopOverrideSettingsFile>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(StyleCopOverrideSettingsFile)' == ''">
+ <StyleCopOverrideSettingsFile> </StyleCopOverrideSettingsFile>
+ </PropertyGroup>
+
+ <!-- Define StyleCopOutputFile property. -->
+ <PropertyGroup Condition="('$(SourceAnalysisOutputFile)' != '') and ('$(StyleCopOutputFile)' == '')">
+ <StyleCopOutputFile>$(SourceAnalysisOutputFile)</StyleCopOutputFile>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(StyleCopOutputFile)' == ''">
+ <StyleCopOutputFile>$(IntermediateOutputPath)StyleCopViolations.xml</StyleCopOutputFile>
+ </PropertyGroup>
+
+ <!-- Define all new properties which do not need to have both StyleCop and SourceAnalysis variations. -->
+ <PropertyGroup>
+ <!-- Specifying 0 will cause StyleCop to use the default violation count limit.
+ Specifying any positive number will cause StyleCop to use that number as the violation count limit.
+ Specifying any negative number will cause StyleCop to allow any number of violations without limit. -->
+ <StyleCopMaxViolationCount Condition="'$(StyleCopMaxViolationCount)' == ''">0</StyleCopMaxViolationCount>
+ </PropertyGroup>
+
+ <!-- Define target: StyleCopForceFullAnalysis -->
+ <Target Name="StyleCopForceFullAnalysis">
+ <CreateProperty Value="true">
+ <Output TaskParameter="Value" PropertyName="StyleCopForceFullAnalysis" />
+ </CreateProperty>
+ </Target>
+
+ <!-- Define target: StyleCop -->
+ <Target Name="StyleCop" Condition="'$(StyleCopEnabled)' != 'false'">
+ <Message Text="Forcing full StyleCop reanalysis." Condition="'$(StyleCopForceFullAnalysis)' == 'true'" Importance="Low" />
+
+ <!-- Determine what files should be checked. Take all Compile items, but exclude those that have
+ set ExcludeFromStyleCop=true or ExcludeFromSourceAnalysis=true. -->
+ <CreateItem Include="@(Compile)" Condition="('%(Compile.ExcludeFromStyleCop)' != 'true') and ('%(Compile.ExcludeFromSourceAnalysis)' != 'true')">
+ <Output TaskParameter="Include" ItemName="StyleCopFiles"/>
+ </CreateItem>
+
+ <Message Text="Analyzing @(StyleCopFiles)" Importance="Low" />
+
+ <!-- Show list of what files should be excluded. checked. Take all Compile items, but exclude those that have
+ set ExcludeFromStyleCop=true or ExcludeFromSourceAnalysis=true. -->
+ <CreateItem Include="@(Compile)" Condition="('%(Compile.ExcludeFromStyleCop)' == 'true') or ('%(Compile.ExcludeFromSourceAnalysis)' == 'true')">
+ <Output TaskParameter="Include" ItemName="StyleCopExcludedFiles"/>
+ </CreateItem>
+
+ <Message Text="Excluding @(StyleCopExcludedFiles)" Importance="Normal" />
+
+ <!-- Run the StyleCop MSBuild task. -->
+ <StyleCopTask
+ ProjectFullPath="$(MSBuildProjectFile)"
+ SourceFiles="@(StyleCopFiles)"
+ AdditionalAddinPaths="@(StyleCopAdditionalAddinPaths)"
+ ForceFullAnalysis="$(StyleCopForceFullAnalysis)"
+ DefineConstants="$(DefineConstants)"
+ TreatErrorsAsWarnings="$(StyleCopTreatErrorsAsWarnings)"
+ CacheResults="$(StyleCopCacheResults)"
+ OverrideSettingsFile="$(StyleCopOverrideSettingsFile)"
+ OutputFile="$(StyleCopOutputFile)"
+ MaxViolationCount="$(StyleCopMaxViolationCount)"
+ />
+
+ <!-- Make output files cleanable -->
+ <CreateItem Include="$(StyleCopOutputFile)">
+ <Output TaskParameter="Include" ItemName="FileWrites"/>
+ </CreateItem>
+
+ <!-- Add the StyleCop.cache file to the list of files we've written - so they can be cleaned up on a Build Clean. -->
+ <CreateItem Include="StyleCop.Cache" Condition="'$(StyleCopCacheResults)' == 'true'">
+ <Output TaskParameter="Include" ItemName="FileWrites"/>
+ </CreateItem>
+ </Target>
+</Project>
diff --git a/tools/StyleCop/Microsoft.StyleCop.dll b/tools/StyleCop/Microsoft.StyleCop.dll
new file mode 100644
index 0000000..aa995b6
--- /dev/null
+++ b/tools/StyleCop/Microsoft.StyleCop.dll
Binary files differ
diff --git a/tools/StyleCop/Settings.StyleCop b/tools/StyleCop/Settings.StyleCop
new file mode 100644
index 0000000..8be9507
--- /dev/null
+++ b/tools/StyleCop/Settings.StyleCop
@@ -0,0 +1,21 @@
+<StyleCopSettings Version="4.3">
+ <Analyzers>
+ <Analyzer AnalyzerId="Microsoft.StyleCop.CSharp.NamingRules">
+ <AnalyzerSettings>
+ <CollectionProperty Name="Hungarian">
+ <Value>as</Value>
+ <Value>do</Value>
+ <Value>id</Value>
+ <Value>if</Value>
+ <Value>in</Value>
+ <Value>is</Value>
+ <Value>my</Value>
+ <Value>no</Value>
+ <Value>on</Value>
+ <Value>to</Value>
+ <Value>ui</Value>
+ </CollectionProperty>
+ </AnalyzerSettings>
+ </Analyzer>
+ </Analyzers>
+</StyleCopSettings> \ No newline at end of file
diff --git a/tools/StyleCop/StyleCopSettingsEditor.exe b/tools/StyleCop/StyleCopSettingsEditor.exe
new file mode 100644
index 0000000..8f735a4
--- /dev/null
+++ b/tools/StyleCop/StyleCopSettingsEditor.exe
Binary files differ