Re-enable StyleCop when running in command line builds.

This commit is contained in:
marcind 2012-08-15 11:18:43 -07:00
Родитель 897bf750a6
Коммит b3c69ca033
2 изменённых файлов: 10 добавлений и 4 удалений

Просмотреть файл

@ -271,7 +271,7 @@ namespace System.Web.Mvc.Html
{
if (html.ViewContext.ViewData.Model is Color)
{
Color color = ((Color) html.ViewContext.ViewData.Model);
Color color = (Color)html.ViewContext.ViewData.Model;
value = String.Format(CultureInfo.InvariantCulture, "#{0:X2}{1:X2}{2:X2}", color.R, color.G, color.B);
}
else

Просмотреть файл

@ -3,11 +3,10 @@
<StyleCopMsBuildRunner Include="$(WebStackRootPath)packages\**\StyleCop.dll"/>
</ItemGroup>
<PropertyGroup>
<IsStyleCopEnabled Condition=" '$(StyleCopMsBuildRunner)' != '' ">$(StyleCopEnabled)</IsStyleCopEnabled>
<IsStyleCopEnabled Condition=" '$(StyleCopMsBuildRunner)' == '' ">false</IsStyleCopEnabled>
<IsStyleCopEnabled>$(StyleCopEnabled)</IsStyleCopEnabled>
</PropertyGroup>
<UsingTask AssemblyFile="@(StyleCopMsBuildRunner)" TaskName="StyleCopTask" Condition=" '$(IsStyleCopEnabled)' != 'false' " />
<UsingTask AssemblyFile="@(StyleCopMsBuildRunner)" TaskName="StyleCopTask" Condition=" '@(StyleCopMsBuildRunner)' != '' " />
<PropertyGroup>
<BuildDependsOn>$(BuildDependsOn);StyleCop</BuildDependsOn>
@ -79,6 +78,13 @@
<!-- Define target: StyleCop -->
<Target Name="StyleCop" Condition="'$(IsStyleCopEnabled)' != 'false'">
<PropertyGroup>
<StyleCopMsBuildRunner>@(StyleCopMsBuildRunner)</StyleCopMsBuildRunner>
</PropertyGroup>
<Error Text="Multiple StyleCop copies detected. Please clean out your packages folder and try again."
Condition=" $(StyleCopMsBuildRunner.Contains(';')) " />
<Message Text="Running Style Analysis..." Importance="high" />
<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