From 7628ebd2d32878867e536cdf8081d33882bb1c93 Mon Sep 17 00:00:00 2001 From: jricke Date: Tue, 21 Jul 2015 23:44:29 -0500 Subject: [PATCH] add /ruleset as a command line switch for FxCop task. Added RuleSet property to be set from MSBuild. --- Source/MSBuild.Community.Tasks/FxCop.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Source/MSBuild.Community.Tasks/FxCop.cs b/Source/MSBuild.Community.Tasks/FxCop.cs index ff09bcc8..5aa56f77 100644 --- a/Source/MSBuild.Community.Tasks/FxCop.cs +++ b/Source/MSBuild.Community.Tasks/FxCop.cs @@ -187,7 +187,15 @@ public ITaskItem[] Rules { get { return _rules; } set { _rules = value; } - } + } + + /// + /// Gets or sets the rule set. + /// + /// + /// The rule set. + /// + public string RuleSet { get; set; } private string _analysisReportFileName; @@ -484,6 +492,11 @@ protected override string GenerateCommandLineCommands() } } + if (!string.IsNullOrEmpty(RuleSet)) + { + _programArguments.AppendFormat("/ruleset:{0} ", RuleSet); + } + if (IncludeSummaryReport) { _programArguments.Append("/s ");