78 references to CheckResultSeverity
Microsoft.Build (40)
BuildCheck\API\BuildCheckResult.cs (4)
30
internal BuildEventArgs ToEventArgs(
CheckResultSeverity
severity)
33
CheckResultSeverity
.Suggestion => new BuildCheckResultMessage(this),
34
CheckResultSeverity
.Warning => new BuildCheckResultWarning(this),
35
CheckResultSeverity
.Error => new BuildCheckResultError(this),
BuildCheck\API\CheckConfiguration.cs (10)
24
Severity =
CheckResultSeverity
.None
42
public
CheckResultSeverity
? Severity { get; init; }
54
if (Severity.HasValue && Severity.Value !=
CheckResultSeverity
.Default)
56
return !Severity.Value.Equals(
CheckResultSeverity
.None);
101
private static
CheckResultSeverity
? TryExtractSeverity(Dictionary<string, string>? config)
111
return
CheckResultSeverity
.None;
113
return
CheckResultSeverity
.Default;
115
return
CheckResultSeverity
.Suggestion;
117
return
CheckResultSeverity
.Warning;
119
return
CheckResultSeverity
.Error;
BuildCheck\Checks\DoubleWritesCheck.cs (1)
26
new CheckConfiguration() { Severity =
CheckResultSeverity
.Warning });
BuildCheck\Checks\NoEnvironmentVariablePropertyCheck.cs (1)
18
new CheckConfiguration() { Severity =
CheckResultSeverity
.Suggestion });
BuildCheck\Checks\PreferProjectReferenceCheck.cs (1)
18
new CheckConfiguration() { RuleId = RuleId, Severity =
CheckResultSeverity
.Warning });
BuildCheck\Checks\PropertiesUsageCheck.cs (3)
20
new CheckConfiguration() { RuleId = "BC0201", Severity =
CheckResultSeverity
.Warning, EvaluationCheckScope = EvaluationCheckScope.ProjectFileOnly });
25
new CheckConfiguration() { RuleId = "BC0202", Severity =
CheckResultSeverity
.Warning, EvaluationCheckScope = EvaluationCheckScope.ProjectFileOnly });
30
new CheckConfiguration() { RuleId = "BC0203", Severity =
CheckResultSeverity
.Suggestion, EvaluationCheckScope = EvaluationCheckScope.ProjectFileOnly });
BuildCheck\Checks\SharedOutputPathCheck.cs (1)
18
new CheckConfiguration() { RuleId = RuleId, Severity =
CheckResultSeverity
.Warning });
BuildCheck\Infrastructure\CheckConfigurationEffective.cs (4)
13
public CheckConfigurationEffective(string ruleId, EvaluationCheckScope evaluationCheckScope,
CheckResultSeverity
severity)
15
if (severity ==
CheckResultSeverity
.Default)
33
public
CheckResultSeverity
Severity { get; }
35
public bool IsEnabled => Severity >=
CheckResultSeverity
.Suggestion;
BuildCheck\Infrastructure\CheckWrapper.cs (5)
132
case
CheckResultSeverity
.Suggestion:
135
case
CheckResultSeverity
.Warning:
138
case
CheckResultSeverity
.Error:
141
case
CheckResultSeverity
.Default:
142
case
CheckResultSeverity
.None:
BuildCheck\Infrastructure\ConfigurationProvider.cs (3)
283
private
CheckResultSeverity
GetSeverityValue(CheckConfiguration editorConfigValue, CheckConfiguration defaultValue)
285
CheckResultSeverity
? resultSeverity = null;
289
if (editorConfigValue.Severity != null && editorConfigValue.Severity !=
CheckResultSeverity
.Default)
BuildCheck\Utilities\CheckResultSeverityExtensions.cs (7)
9
public static DiagnosticSeverity? ToDiagnosticSeverity(this
CheckResultSeverity
? severity)
19
public static DiagnosticSeverity ToDiagnosticSeverity(this
CheckResultSeverity
severity)
23
CheckResultSeverity
.Default => DiagnosticSeverity.Default,
24
CheckResultSeverity
.None => DiagnosticSeverity.None,
25
CheckResultSeverity
.Suggestion => DiagnosticSeverity.Suggestion,
26
CheckResultSeverity
.Warning => DiagnosticSeverity.Warning,
27
CheckResultSeverity
.Error => DiagnosticSeverity.Error,
Microsoft.Build.BuildCheck.UnitTests (38)
CheckConfiguration_Test.cs (11)
35
[InlineData("error",
CheckResultSeverity
.Error)]
36
[InlineData("ERROR",
CheckResultSeverity
.Error)]
37
[InlineData("suggestion",
CheckResultSeverity
.Suggestion)]
38
[InlineData("SUGGESTION",
CheckResultSeverity
.Suggestion)]
39
[InlineData("warning",
CheckResultSeverity
.Warning)]
40
[InlineData("WARNING",
CheckResultSeverity
.Warning)]
41
[InlineData("NONE",
CheckResultSeverity
.None)]
42
[InlineData("none",
CheckResultSeverity
.None)]
43
[InlineData("default",
CheckResultSeverity
.Default)]
44
[InlineData("DEFAULT",
CheckResultSeverity
.Default)]
45
public void CreateCheckConfiguration_Severity(string parameter,
CheckResultSeverity
? expected)
CheckConfigurationEffectiveTests.cs (11)
15
[InlineData("ruleId", EvaluationCheckScope.ProjectFileOnly,
CheckResultSeverity
.Warning, true)]
16
[InlineData("ruleId2", EvaluationCheckScope.ProjectFileOnly,
CheckResultSeverity
.Warning, true)]
17
[InlineData("ruleId", EvaluationCheckScope.ProjectFileOnly,
CheckResultSeverity
.Error, false)]
21
CheckResultSeverity
secondSeverity,
27
severity:
CheckResultSeverity
.Warning);
38
[InlineData(
CheckResultSeverity
.Warning, true)]
39
[InlineData(
CheckResultSeverity
.Suggestion, true)]
40
[InlineData(
CheckResultSeverity
.Error, true)]
41
[InlineData(
CheckResultSeverity
.None, false)]
42
public void CheckConfigurationInternal_Constructor_SeverityConfig(
CheckResultSeverity
severity, bool isEnabledExpected)
60
severity:
CheckResultSeverity
.Default);
ConfigurationProvider_Tests.cs (15)
120
buildConfig.Severity.ShouldBe(
CheckResultSeverity
.Error);
219
[InlineData(
CheckResultSeverity
.Warning,
CheckResultSeverity
.Warning, true)]
220
[InlineData(
CheckResultSeverity
.Error,
CheckResultSeverity
.Error, true)]
221
[InlineData(
CheckResultSeverity
.Default,
CheckResultSeverity
.Warning, true)]
222
[InlineData(
CheckResultSeverity
.Suggestion,
CheckResultSeverity
.Suggestion, true)]
223
[InlineData(
CheckResultSeverity
.None,
CheckResultSeverity
.None, false)]
224
[InlineData(null,
CheckResultSeverity
.Warning, true)]
225
public void GetConfigurationProvider_MergesSeverity_Correctly(
CheckResultSeverity
? checkResultSeverity,
CheckResultSeverity
expectedSeverity, bool expectedEnablment)
235
Severity =
CheckResultSeverity
.Warning
TaskInvocationAnalysisDataTests.cs (1)
28
new CheckConfiguration() { Severity =
CheckResultSeverity
.Warning });