25 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 (9)
BuildCheck\API\CheckConfiguration.cs (3)
22
public static CheckConfiguration Default { get; } =
new
()
28
public static CheckConfiguration Null { get; } =
new
();
70
internal static CheckConfiguration Create(Dictionary<string, string>? configDictionary) =>
new
()
BuildCheck\Checks\DoubleWritesCheck.cs (1)
29
new
CheckConfiguration
() { Severity = CheckResultSeverity.Warning });
BuildCheck\Checks\NoEnvironmentVariablePropertyCheck.cs (1)
18
new
CheckConfiguration
() { Severity = CheckResultSeverity.Suggestion });
BuildCheck\Checks\PropertiesUsageCheck.cs (3)
22
new
CheckConfiguration
() { Severity = CheckResultSeverity.Warning, EvaluationCheckScope = EvaluationCheckScope.ProjectFileOnly });
27
new
CheckConfiguration
() { Severity = CheckResultSeverity.Warning, EvaluationCheckScope = EvaluationCheckScope.ProjectFileOnly });
32
new
CheckConfiguration
() { Severity = CheckResultSeverity.Suggestion, EvaluationCheckScope = EvaluationCheckScope.ProjectFileOnly });
BuildCheck\Checks\SharedOutputPathCheck.cs (1)
22
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)
27
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
());
50 references to CheckConfiguration
Microsoft.Build (34)
BuildCheck\API\CheckConfiguration.cs (5)
22
public static
CheckConfiguration
Default { get; } = new()
28
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 (2)
18
CheckConfiguration
defaultConfiguration)
58
public
CheckConfiguration
DefaultConfiguration { get; }
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (2)
232
CheckConfiguration
[] userEditorConfigs =
282
CheckConfiguration
[] userEditorConfigs =
BuildCheck\Infrastructure\CheckConfigurationEffective.cs (2)
27
new(string.Empty,
CheckConfiguration
.Default.EvaluationCheckScope!.Value,
28
CheckConfiguration
.Default.Severity!.Value);
BuildCheck\Infrastructure\CheckWrapper.cs (1)
84
IReadOnlyList<
CheckConfiguration
> editorConfigs)
BuildCheck\Infrastructure\ConfigurationProvider.cs (19)
24
private readonly ConcurrentDictionary<string,
CheckConfiguration
> _checkConfiguration = new ConcurrentDictionary<string,
CheckConfiguration
>(StringComparer.InvariantCultureIgnoreCase);
110
public
CheckConfiguration
[] GetUserConfigurations(
127
CheckConfiguration
[] userConfigs,
230
internal
CheckConfiguration
GetUserConfiguration(string projectFullPath, string ruleId)
234
var
editorConfigValue = _checkConfiguration.GetOrAdd(cacheKey, (key) =>
236
CheckConfiguration
? editorConfig =
CheckConfiguration
.Null;
242
editorConfig =
CheckConfiguration
.Create(config);
263
CheckConfiguration
defaultConfig,
264
CheckConfiguration
editorConfig)
273
CheckConfiguration
defaultConfig)
277
CheckConfiguration
editorConfigValue,
278
CheckConfiguration
defaultValue,
279
Func<
CheckConfiguration
, T?> propertyGetter) where T : struct
282
EnsureNonNull(propertyGetter(
CheckConfiguration
.Default));
284
private CheckResultSeverity GetSeverityValue(
CheckConfiguration
editorConfigValue,
CheckConfiguration
defaultValue)
295
resultSeverity ??= defaultValue.Severity ?? EnsureNonNull(
CheckConfiguration
.Default.Severity);
BuildCheck\Infrastructure\CustomConfigurationData.cs (1)
16
/// 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()