Merge pull request #7382 from Mailaender/stylecop-plus
Added support for StyleCop+
This commit is contained in:
@@ -129,7 +129,7 @@ namespace OpenRA.FileFormats
|
||||
type = stream.ReadASCII(4);
|
||||
}
|
||||
else
|
||||
throw new NotSupportedException("Vqa uses unknown Subtype : {0}".F(type));
|
||||
throw new NotSupportedException("Vqa uses unknown Subtype: {0}".F(type));
|
||||
}
|
||||
|
||||
/*var length = */stream.ReadUInt16();
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
|
||||
var console = new StyleCopConsole(null, false, null, null, true);
|
||||
var project = new CodeProject(0, projectPath, new Configuration(null));
|
||||
foreach (var filePath in Directory.GetFiles(projectPath, "*.cs", SearchOption.AllDirectories))
|
||||
foreach (var filePath in Directory.GetFiles(projectPath, "*.cs", SearchOption.AllDirectories).Where(p => !p.Contains(".Designer")))
|
||||
console.Core.Environment.AddSourceCode(project, filePath, null);
|
||||
|
||||
console.ViolationEncountered += OnViolationEncountered;
|
||||
|
||||
@@ -360,5 +360,35 @@
|
||||
</Rules>
|
||||
<AnalyzerSettings />
|
||||
</Analyzer>
|
||||
<Analyzer AnalyzerId="StyleCopPlus.StyleCopPlusRules">
|
||||
<Rules>
|
||||
<Rule Name="CheckAllowedIndentationCharacters">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="CheckWhetherLastCodeLineIsEmpty">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="CodeLineMustNotBeLongerThan">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="MethodMustNotContainMoreLinesThan">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="AdvancedNamingRules">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
</Rules>
|
||||
<AnalyzerSettings />
|
||||
</Analyzer>
|
||||
</Analyzers>
|
||||
</StyleCopSettings>
|
||||
8
thirdparty/fetch-thirdparty-deps.ps1
vendored
8
thirdparty/fetch-thirdparty-deps.ps1
vendored
@@ -9,6 +9,14 @@ if (!(Test-Path "nuget.exe"))
|
||||
(New-Object System.Net.WebClient).DownloadFile("http://nuget.org/nuget.exe", $target)
|
||||
}
|
||||
|
||||
if (!(Test-Path "StyleCopPlus.dll"))
|
||||
{
|
||||
echo "Fetching StyleCopPlus from NuGet."
|
||||
./nuget.exe install StyleCopPlus.MSBuild -Version 4.7.49.5
|
||||
cp StyleCopPlus.MSBuild.4.7.49.5/tools/StyleCopPlus.dll .
|
||||
rmdir StyleCopPlus.MSBuild.4.7.49.5 -Recurse
|
||||
}
|
||||
|
||||
if (!(Test-Path "StyleCop.dll"))
|
||||
{
|
||||
echo "Fetching StyleCop files from NuGet."
|
||||
|
||||
7
thirdparty/fetch-thirdparty-deps.sh
vendored
7
thirdparty/fetch-thirdparty-deps.sh
vendored
@@ -3,6 +3,13 @@
|
||||
# Die on any error for Travis CI to automatically retry:
|
||||
set -e
|
||||
|
||||
if [ ! -f StyleCopPlus.dll ]; then
|
||||
echo "Fetching StyleCopPlus from nuget"
|
||||
nuget install StyleCopPlus.MSBuild -Version 4.7.49.5
|
||||
cp ./StyleCopPlus.MSBuild.4.7.49.5/tools/StyleCopPlus.dll .
|
||||
rm -rf StyleCopPlus.MSBuild.4.7.49.5
|
||||
fi
|
||||
|
||||
if [ ! -f StyleCop.dll ]; then
|
||||
echo "Fetching StyleCop files from nuget"
|
||||
nuget install StyleCop.MSBuild -Version 4.7.49.0
|
||||
|
||||
Reference in New Issue
Block a user