26 instantiations of CheckConfiguration
CustomCheck (2)
Check1.cs (1)
17
new
CheckConfiguration
(),
Check2.cs (1)
17
new
CheckConfiguration
());
CustomCheck2 (1)
Check3.cs (1)
17
new
CheckConfiguration
());
ErrorCustomCheck (3)
ErrorOnInitializeCheck.cs (1)
18
new
CheckConfiguration
());
ErrorOnRegisteredAction.cs (1)
18
new
CheckConfiguration
());
ErrorWhenRegisteringActions.cs (1)
18
new
CheckConfiguration
());
Microsoft.Build (10)
BuildCheck\API\CheckConfiguration.cs (3)
21
public static CheckConfiguration Default { get; } =
new
()
27
public static CheckConfiguration Null { get; } =
new
();
70
internal static CheckConfiguration Create(Dictionary<string, string>? configDictionary) =>
new
()
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 });
Microsoft.Build.BuildCheck.UnitTests (10)
BuildCheckManagerProviderTests.cs (1)
99
new
CheckConfiguration
());
ConfigurationProvider_Tests.cs (2)
228
CheckConfiguration checkConfiguration = new
CheckConfiguration
()
233
CheckConfiguration defaultValue = new
CheckConfiguration
()
TaskInvocationAnalysisDataTests.cs (1)
28
new
CheckConfiguration
() { Severity = CheckResultSeverity.Warning });
TestAssets\CustomCheck\Check1.cs (1)
17
new
CheckConfiguration
(),
TestAssets\CustomCheck\Check2.cs (1)
17
new
CheckConfiguration
());
TestAssets\CustomCheck2\Check3.cs (1)
17
new
CheckConfiguration
());
TestAssets\ErrorCustomCheck\ErrorOnInitializeCheck.cs (1)
18
new
CheckConfiguration
());
TestAssets\ErrorCustomCheck\ErrorOnRegisteredAction.cs (1)
18
new
CheckConfiguration
());
TestAssets\ErrorCustomCheck\ErrorWhenRegisteringActions.cs (1)
18
new
CheckConfiguration
());
51 references to CheckConfiguration
Microsoft.Build (35)
BuildCheck\API\CheckConfiguration.cs (5)
21
public static
CheckConfiguration
Default { get; } = new()
27
public static
CheckConfiguration
Null { get; } = new();
64
/// Creates a <see cref="
CheckConfiguration
"/> object based on the provided configuration dictionary.
69
/// <returns>A new instance of <see cref="
CheckConfiguration
"/> with the specified settings.</returns>
70
internal static
CheckConfiguration
Create(Dictionary<string, string>? configDictionary) => new()
BuildCheck\API\CheckRule.cs (3)
27
CheckConfiguration
defaultConfiguration,
51
CheckConfiguration
defaultConfiguration)
93
public
CheckConfiguration
DefaultConfiguration { get; }
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (2)
243
CheckConfiguration
[] userEditorConfigs =
301
CheckConfiguration
[] userEditorConfigs =
BuildCheck\Infrastructure\CheckConfigurationEffective.cs (2)
26
new(string.Empty,
CheckConfiguration
.Default.EvaluationCheckScope!.Value,
27
CheckConfiguration
.Default.Severity!.Value);
BuildCheck\Infrastructure\CheckWrapper.cs (1)
82
IReadOnlyList<
CheckConfiguration
> editorConfigs)
BuildCheck\Infrastructure\ConfigurationProvider.cs (19)
23
private readonly ConcurrentDictionary<string,
CheckConfiguration
> _checkConfiguration = new ConcurrentDictionary<string,
CheckConfiguration
>(StringComparer.InvariantCultureIgnoreCase);
109
public
CheckConfiguration
[] GetUserConfigurations(
126
CheckConfiguration
[] userConfigs,
229
internal
CheckConfiguration
GetUserConfiguration(string projectFullPath, string ruleId)
233
var
editorConfigValue = _checkConfiguration.GetOrAdd(cacheKey, (key) =>
235
CheckConfiguration
? editorConfig =
CheckConfiguration
.Null;
241
editorConfig =
CheckConfiguration
.Create(config);
262
CheckConfiguration
defaultConfig,
263
CheckConfiguration
editorConfig)
272
CheckConfiguration
defaultConfig)
276
CheckConfiguration
editorConfigValue,
277
CheckConfiguration
defaultValue,
278
Func<
CheckConfiguration
, T?> propertyGetter) where T : struct
281
EnsureNonNull(propertyGetter(
CheckConfiguration
.Default));
283
private CheckResultSeverity GetSeverityValue(
CheckConfiguration
editorConfigValue,
CheckConfiguration
defaultValue)
294
resultSeverity ??= defaultValue.Severity ?? EnsureNonNull(
CheckConfiguration
.Default.Severity);
BuildCheck\Infrastructure\CustomConfigurationData.cs (1)
12
/// The configuration data that is recognized by the infrastructure is passed as <see cref="
CheckConfiguration
"/>.
BuildCheck\Infrastructure\IConfigurationProvider.cs (2)
11
CheckConfiguration
[] GetUserConfigurations(
20
CheckConfiguration
[] userConfigs,
Microsoft.Build.BuildCheck.UnitTests (16)
BuildCheckManagerProviderTests.cs (2)
75
public CheckConfigurationEffective[] GetMergedConfigurations(
CheckConfiguration
[] userConfigs, Check check) => [];
77
public
CheckConfiguration
[] GetUserConfigurations(string projectFullPath, IReadOnlyList<string> ruleIds) => [];
CheckConfiguration_Test.cs (11)
17
var
buildConfig =
CheckConfiguration
.Create(null);
27
var
buildConfig =
CheckConfiguration
.Create(new Dictionary<string, string>());
52
var
buildConfig =
CheckConfiguration
.Create(config);
72
var
buildConfig =
CheckConfiguration
.Create(config);
92
var
buildConfig =
CheckConfiguration
.Create(config);
113
CheckConfiguration
.Create(config);
ConfigurationProvider_Tests.cs (3)
115
var
buildConfig = configurationProvider.GetUserConfiguration(Path.Combine(workFolder1.Path, "test.csproj"), "rule_id");
228
CheckConfiguration
checkConfiguration = new CheckConfiguration()
233
CheckConfiguration
defaultValue = new CheckConfiguration()