1 write to Id
Microsoft.Build (1)
BuildCheck\API\CheckRule.cs (1)
20Id = id;
27 references to Id
Microsoft.Build (21)
BuildCheck\API\BuildCheckResult.cs (3)
32CheckResultSeverity.Warning => new BuildCheckResultWarning(this, CheckRule.Id), 33CheckResultSeverity.Error => new BuildCheckResultError(this, CheckRule.Id), 52_message ??= $"https://aka.ms/buildcheck/codes#{CheckRule.Id} - {string.Format(CheckRule.MessageFormat, MessageArgs)}";
BuildCheck\Checks\PropertiesUsageCheck.cs (7)
51var config = configurationContext.CheckConfig.FirstOrDefault(c => c.RuleId == _usedBeforeInitializedRule.Id) 57config = configurationContext.CheckConfig.FirstOrDefault(c => c.RuleId == _unusedPropertyRule.Id) 63config = configurationContext.CheckConfig.FirstOrDefault(c => c.RuleId == _usedBeforeInitializedRule.Id) 75GetAllowUninitPropsInConditionsConfig(customConfigurationData, _usedBeforeInitializedRule.Id); 77GetAllowUninitPropsInConditionsConfig(customConfigurationData, _initializedAfterUsedRule.Id); 85$"[{_usedBeforeInitializedRule.Id}] and [{_initializedAfterUsedRule.Id}] are not allowed to have differing configuration value for [{_allowUninitPropsInConditionsKey}]");
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (6)
137([SharedOutputPathCheck.SupportedRule.Id], SharedOutputPathCheck.SupportedRule.DefaultConfiguration.IsEnabled ?? false, Construct<SharedOutputPathCheck>), 138([DoubleWritesCheck.SupportedRule.Id], DoubleWritesCheck.SupportedRule.DefaultConfiguration.IsEnabled ?? false, Construct<DoubleWritesCheck>), 139([NoEnvironmentVariablePropertyCheck.SupportedRule.Id], NoEnvironmentVariablePropertyCheck.SupportedRule.DefaultConfiguration.IsEnabled ?? false, Construct<NoEnvironmentVariablePropertyCheck>) 193instance.SupportedRules.Select(r => r.Id).ToArray(), 260!check.SupportedRules.Select(r => r.Id) 265$"The check '{check.FriendlyName}' exposes rules '{check.SupportedRules.Select(r => r.Id).ToCsvString()}', but different rules were declared during registration: '{checkFactoryContext.RuleIds.ToCsvString()}'");
BuildCheck\Infrastructure\BuildEventsProcessor.cs (2)
241$"The check '{checkWrapper.Check.FriendlyName}' reported a result for a rule '{result.CheckRule.Id}' that it does not support."); 248r.RuleId.Equals(result.CheckRule.Id, StringComparison.CurrentCultureIgnoreCase));
BuildCheck\Infrastructure\CheckWrapper.cs (1)
59ruleId: checkRule.Id,
BuildCheck\Infrastructure\ConfigurationProvider.cs (2)
135check.SupportedRules[idx].Id, 259=> GetMergedConfiguration(projectFullPath, checkRule.Id, checkRule.DefaultConfiguration);
Microsoft.Build.BuildCheck.UnitTests (6)
DoubleWritesAnalyzer_Tests.cs (2)
56_registrationContext.Results[0].CheckRule.Id.ShouldBe("BC0102"); 77_registrationContext.Results.ForEach(result => result.CheckRule.Id.ShouldBe("BC0102"));
SharedOutputPathCheck_Tests.cs (3)
88_registrationContext.Results[0].CheckRule.Id.ShouldBe("BC0101"); 89_registrationContext.Results[1].CheckRule.Id.ShouldBe("BC0101"); 133result.CheckRule.Id.ShouldBe("BC0101");
TaskInvocationAnalysisDataTests.cs (1)
67([TestCheck.SupportedRule.Id], true, () => s_testCheck = new TestCheck()),