diff --git a/.azure-devops/scraper-ci.yml b/.azure-devops/scraper-ci.yml index 09551f842..33a3aa0f3 100644 --- a/.azure-devops/scraper-ci.yml +++ b/.azure-devops/scraper-ci.yml @@ -24,6 +24,11 @@ jobs: command: test projects: src/Promitor.Scraper.Tests.Unit/Promitor.Scraper.Tests.Unit.csproj + - task: alanwales.resharper-code-analysis.custom-build-task.ResharperCli@1 + displayName: 'Automated code quality checks' + inputs: + SolutionOrProjectPath: src/Promitor.sln + - job: Docker_Job displayName: Build Docker Image Tests condition: succeeded() diff --git a/src/Promitor.Core.Scraping/Configuration/Providers/MetricsDeclarationProvider.cs b/src/Promitor.Core.Scraping/Configuration/Providers/MetricsDeclarationProvider.cs index 3c4cab8a6..af873e851 100644 --- a/src/Promitor.Core.Scraping/Configuration/Providers/MetricsDeclarationProvider.cs +++ b/src/Promitor.Core.Scraping/Configuration/Providers/MetricsDeclarationProvider.cs @@ -9,18 +9,18 @@ namespace Promitor.Core.Scraping.Configuration.Providers { public class MetricsDeclarationProvider : IMetricsDeclarationProvider { - private readonly ConfigurationSerializer configurationSerializer; + private readonly ConfigurationSerializer _configurationSerializer; public MetricsDeclarationProvider(ILogger logger) { - configurationSerializer = new ConfigurationSerializer(logger); + _configurationSerializer = new ConfigurationSerializer(logger); } public virtual MetricsDeclaration Get() { var rawMetricsDeclaration = ReadRawDeclaration(); - var config = configurationSerializer.Deserialize(rawMetricsDeclaration); + var config = _configurationSerializer.Deserialize(rawMetricsDeclaration); return config; } diff --git a/src/Promitor.Core.Scraping/Configuration/Serialization/ConfigurationSerializer.cs b/src/Promitor.Core.Scraping/Configuration/Serialization/ConfigurationSerializer.cs index 707cd5888..7e1634ff8 100644 --- a/src/Promitor.Core.Scraping/Configuration/Serialization/ConfigurationSerializer.cs +++ b/src/Promitor.Core.Scraping/Configuration/Serialization/ConfigurationSerializer.cs @@ -12,10 +12,10 @@ namespace Promitor.Core.Scraping.Configuration.Serialization { public class ConfigurationSerializer { - private readonly ILogger logger; + private readonly ILogger _logger; public ConfigurationSerializer(ILogger logger) { - this.logger = logger; + _logger = logger; } public MetricsDeclaration Deserialize(string rawMetricsDeclaration) @@ -40,7 +40,7 @@ private MetricsDeclaration InterpretYamlStream(YamlStream metricsDeclarationYaml if (rootNode.Children.ContainsKey("azureMetadata")) { var azureMetadataNode = (YamlMappingNode) rootNode.Children[new YamlScalarNode("azureMetadata")]; - var azureMetadataSerializer = new AzureMetadataDeserializer(logger); + var azureMetadataSerializer = new AzureMetadataDeserializer(_logger); azureMetadata = azureMetadataSerializer.Deserialize(azureMetadataNode); } @@ -48,7 +48,7 @@ private MetricsDeclaration InterpretYamlStream(YamlStream metricsDeclarationYaml if (rootNode.Children.ContainsKey("metricDefaults")) { var metricDefaultsNode = (YamlMappingNode) rootNode.Children[new YamlScalarNode("metricDefaults")]; - var metricDefaultsSerializer = new MetricDefaultsDeserializer(logger); + var metricDefaultsSerializer = new MetricDefaultsDeserializer(_logger); metricDefaults = metricDefaultsSerializer.Deserialize(metricDefaultsNode); } @@ -56,7 +56,7 @@ private MetricsDeclaration InterpretYamlStream(YamlStream metricsDeclarationYaml if (rootNode.Children.ContainsKey("metrics")) { var metricsNode = (YamlSequenceNode) rootNode.Children[new YamlScalarNode("metrics")]; - var metricsDeserializer = new MetricsDeserializer(logger); + var metricsDeserializer = new MetricsDeserializer(_logger); metrics = metricsDeserializer.Deserialize(metricsNode); } diff --git a/src/Promitor.Core.Scraping/Exceptions/ScrapingException.cs b/src/Promitor.Core.Scraping/Exceptions/ScrapingException.cs deleted file mode 100644 index e18df611e..000000000 --- a/src/Promitor.Core.Scraping/Exceptions/ScrapingException.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -namespace Promitor.Core.Scraping.Exceptions -{ - public class ScrapingException : Exception - { - public string MetricName { get; } - - public ScrapingException(string metricName, string message) : base(message) - { - MetricName = metricName; - } - } -} \ No newline at end of file diff --git a/src/Promitor.Core.Scraping/Factories/MetricScraperFactory.cs b/src/Promitor.Core.Scraping/Factories/MetricScraperFactory.cs index 6c2344a8d..c70dcda1d 100644 --- a/src/Promitor.Core.Scraping/Factories/MetricScraperFactory.cs +++ b/src/Promitor.Core.Scraping/Factories/MetricScraperFactory.cs @@ -3,7 +3,7 @@ using Promitor.Core.Scraping.Configuration.Model; using Promitor.Core.Scraping.Configuration.Model.Metrics; using Promitor.Core.Scraping.Interfaces; -using Promitor.Core.Scraping.ResouceTypes; +using Promitor.Core.Scraping.ResourceTypes; using Promitor.Core.Telemetry.Interfaces; using Promitor.Integrations.AzureMonitor; diff --git a/src/Promitor.Core.Scraping/ResouceTypes/GenericScraper.cs b/src/Promitor.Core.Scraping/ResourceTypes/GenericScraper.cs similarity index 96% rename from src/Promitor.Core.Scraping/ResouceTypes/GenericScraper.cs rename to src/Promitor.Core.Scraping/ResourceTypes/GenericScraper.cs index d1123462a..ab95de2c2 100644 --- a/src/Promitor.Core.Scraping/ResouceTypes/GenericScraper.cs +++ b/src/Promitor.Core.Scraping/ResourceTypes/GenericScraper.cs @@ -7,7 +7,7 @@ using Promitor.Core.Telemetry.Interfaces; using Promitor.Integrations.AzureMonitor; -namespace Promitor.Core.Scraping.ResouceTypes +namespace Promitor.Core.Scraping.ResourceTypes { internal class GenericScraper : Scraper { diff --git a/src/Promitor.Core.Scraping/ResouceTypes/ServiceBusQueueScraper.cs b/src/Promitor.Core.Scraping/ResourceTypes/ServiceBusQueueScraper.cs similarity index 97% rename from src/Promitor.Core.Scraping/ResouceTypes/ServiceBusQueueScraper.cs rename to src/Promitor.Core.Scraping/ResourceTypes/ServiceBusQueueScraper.cs index 6221f1135..1b57ca010 100644 --- a/src/Promitor.Core.Scraping/ResouceTypes/ServiceBusQueueScraper.cs +++ b/src/Promitor.Core.Scraping/ResourceTypes/ServiceBusQueueScraper.cs @@ -7,7 +7,7 @@ using Promitor.Core.Telemetry.Interfaces; using Promitor.Integrations.AzureMonitor; -namespace Promitor.Core.Scraping.ResouceTypes +namespace Promitor.Core.Scraping.ResourceTypes { public class ServiceBusQueueScraper : Scraper { diff --git a/src/Promitor.Core.Scraping/ResouceTypes/StorageQueueScraper.cs b/src/Promitor.Core.Scraping/ResourceTypes/StorageQueueScraper.cs similarity index 96% rename from src/Promitor.Core.Scraping/ResouceTypes/StorageQueueScraper.cs rename to src/Promitor.Core.Scraping/ResourceTypes/StorageQueueScraper.cs index 6770d8142..f82c69fa2 100644 --- a/src/Promitor.Core.Scraping/ResouceTypes/StorageQueueScraper.cs +++ b/src/Promitor.Core.Scraping/ResourceTypes/StorageQueueScraper.cs @@ -8,7 +8,7 @@ using Promitor.Integrations.AzureMonitor; using Promitor.Integrations.AzureStorage; -namespace Promitor.Core.Scraping.ResouceTypes +namespace Promitor.Core.Scraping.ResourceTypes { public class StorageQueueScraper: Scraper { diff --git a/src/Promitor.Core.Scraping/Scraper.cs b/src/Promitor.Core.Scraping/Scraper.cs index 5814af742..f0229064a 100644 --- a/src/Promitor.Core.Scraping/Scraper.cs +++ b/src/Promitor.Core.Scraping/Scraper.cs @@ -11,6 +11,7 @@ using Promitor.Core.Telemetry.Interfaces; using Promitor.Integrations.AzureMonitor; using MetricDefinition = Promitor.Core.Scraping.Configuration.Model.Metrics.MetricDefinition; +// ReSharper disable All namespace Promitor.Core.Scraping { @@ -105,7 +106,7 @@ private TimeSpan DetermineMetricAggregationInterval(MetricDefinition metricDefin if (MetricDefaults.Aggregation.Interval == null) { - throw new Exception($"No default aggregation interval is configured nor on the metric configuration for '{metricDefinition.Name}'"); + throw new Exception($"No default aggregation interval is configured nor on the metric configuration for '{metricDefinition?.Name}'"); } return MetricDefaults.Aggregation.Interval.Value; diff --git a/src/Promitor.Core.Telemetry/RuntimeLogger.cs b/src/Promitor.Core.Telemetry/RuntimeLogger.cs index f280d6aea..0f87ac564 100644 --- a/src/Promitor.Core.Telemetry/RuntimeLogger.cs +++ b/src/Promitor.Core.Telemetry/RuntimeLogger.cs @@ -1,4 +1,5 @@ using Microsoft.Extensions.Logging.Console; +#pragma warning disable 618 namespace Promitor.Core.Telemetry { diff --git a/src/Promitor.Core/Serialization/Yaml/YamlSerialization.cs b/src/Promitor.Core/Serialization/Yaml/YamlSerialization.cs index 7bff63870..ef84f1a60 100644 --- a/src/Promitor.Core/Serialization/Yaml/YamlSerialization.cs +++ b/src/Promitor.Core/Serialization/Yaml/YamlSerialization.cs @@ -5,12 +5,12 @@ namespace Promitor.Core.Serialization.Yaml { public static class YamlSerialization { - private static readonly INamingConvention NamingConvention = new CamelCaseNamingConvention(); + private static readonly INamingConvention namingConvention = new CamelCaseNamingConvention(); public static ISerializer CreateSerializer() { var builder = new SerializerBuilder(); - builder.WithNamingConvention(NamingConvention); + builder.WithNamingConvention(namingConvention); return builder.Build(); } diff --git a/src/Promitor.Integrations.AzureMonitor/AzureMonitorClient.cs b/src/Promitor.Integrations.AzureMonitor/AzureMonitorClient.cs index 16fc21084..7c4ae5953 100644 --- a/src/Promitor.Integrations.AzureMonitor/AzureMonitorClient.cs +++ b/src/Promitor.Integrations.AzureMonitor/AzureMonitorClient.cs @@ -137,13 +137,13 @@ private async Task GetRelevantMetric(string metricName, AggregationType private MetricValue GetMostRecentMetricValue(string metricName, IReadOnlyList timeSeries, DateTime recordDateTime) { - var timeSerie = timeSeries.FirstOrDefault(); // TODO: Can we really do this? - if (timeSerie == null) + var firstTimeSeries = timeSeries.FirstOrDefault(); // TODO: Can we really do this? + if (firstTimeSeries == null) { throw new MetricInformationNotFoundException(metricName, "No time series was found"); } - var relevantMetricValue = timeSerie.Data.Where(metricValue => metricValue.TimeStamp < recordDateTime) + var relevantMetricValue = firstTimeSeries.Data.Where(metricValue => metricValue.TimeStamp < recordDateTime) .OrderByDescending(metricValue => metricValue.TimeStamp) .FirstOrDefault(); diff --git a/src/Promitor.Scraper.Host/Dockerfile b/src/Promitor.Scraper.Host/Dockerfile index 54d49233e..1ff012042 100644 --- a/src/Promitor.Scraper.Host/Dockerfile +++ b/src/Promitor.Scraper.Host/Dockerfile @@ -4,7 +4,7 @@ COPY Promitor.Core/* Promitor.Core/ COPY Promitor.Core.Scraping/* Promitor.Core.Scraping/ COPY Promitor.Core.Telemetry/* Promitor.Core.Telemetry/ COPY Promitor.Integrations.AzureMonitor/* Promitor.Integrations.AzureMonitor/ -COPY Promitor.Integrations.AzureStorageQueue/* Promitor.Integrations.AzureStorageQueue/ +COPY Promitor.Integrations.AzureStorage/* Promitor.Integrations.AzureStorage/ COPY Promitor.Scraper.Host/* Promitor.Scraper.Host/ RUN dotnet --info RUN dotnet publish Promitor.Scraper.Host/Promitor.Scraper.Host.csproj --configuration release -o app diff --git a/src/Promitor.Scraper.Host/Extensions/IApplicationBuilderExtensions.cs b/src/Promitor.Scraper.Host/Extensions/IApplicationBuilderExtensions.cs index d9e63663f..2cd0d5bf7 100644 --- a/src/Promitor.Scraper.Host/Extensions/IApplicationBuilderExtensions.cs +++ b/src/Promitor.Scraper.Host/Extensions/IApplicationBuilderExtensions.cs @@ -43,4 +43,4 @@ public static IApplicationBuilder UsePrometheusScraper(this IApplicationBuilder return app; } } -} \ No newline at end of file +} diff --git a/src/Promitor.Scraper.Host/Extensions/IServiceCollectionExtensions.cs b/src/Promitor.Scraper.Host/Extensions/IServiceCollectionExtensions.cs index 4630ff071..11086ee8a 100644 --- a/src/Promitor.Scraper.Host/Extensions/IServiceCollectionExtensions.cs +++ b/src/Promitor.Scraper.Host/Extensions/IServiceCollectionExtensions.cs @@ -80,6 +80,7 @@ private static string GetXmlDocumentationPath(IServiceCollection services) return File.Exists(xmlDocumentationPath) ? xmlDocumentationPath : string.Empty; } + // ReSharper disable once UnusedParameter.Local private static void UnobservedJobHandlerHandler(object sender, UnobservedTaskExceptionEventArgs e, IServiceCollection services) { var exceptionTrackerService = services.FirstOrDefault(service => service.ServiceType == typeof(IExceptionTracker)); @@ -89,4 +90,4 @@ private static void UnobservedJobHandlerHandler(object sender, UnobservedTaskExc e.SetObserved(); } } -} \ No newline at end of file +} diff --git a/src/Promitor.Scraper.Host/Extensions/IWebHostExtensions.cs b/src/Promitor.Scraper.Host/Extensions/IWebHostExtensions.cs index 9895cb1c3..8b9e76be7 100644 --- a/src/Promitor.Scraper.Host/Extensions/IWebHostExtensions.cs +++ b/src/Promitor.Scraper.Host/Extensions/IWebHostExtensions.cs @@ -1,10 +1,11 @@ using GuardNet; +using Microsoft.AspNetCore.Hosting; using Promitor.Scraper.Host.Validation; // ReSharper disable once CheckNamespace -namespace Microsoft.AspNetCore.Hosting +namespace Promitor.Scraper.Host.Extensions { - public static class IWebHostExtensions + public static class WebHostExtensions { public static IWebHost ValidateSetup(this IWebHost webHost) { diff --git a/src/Promitor.Scraper.Host/Program.cs b/src/Promitor.Scraper.Host/Program.cs index 098feb319..2eec2b1a5 100644 --- a/src/Promitor.Scraper.Host/Program.cs +++ b/src/Promitor.Scraper.Host/Program.cs @@ -2,6 +2,7 @@ using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; using Promitor.Core; +using Promitor.Scraper.Host.Extensions; namespace Promitor.Scraper.Host { diff --git a/src/Promitor.Scraper.Host/Scheduling/MetricScrapingJob.cs b/src/Promitor.Scraper.Host/Scheduling/MetricScrapingJob.cs index 028af7160..c5a64ce9d 100644 --- a/src/Promitor.Scraper.Host/Scheduling/MetricScrapingJob.cs +++ b/src/Promitor.Scraper.Host/Scheduling/MetricScrapingJob.cs @@ -4,7 +4,6 @@ using System.Threading.Tasks; using CronScheduler.AspNetCore; using GuardNet; -using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; using Promitor.Core; using Promitor.Core.Scraping.Configuration.Model; @@ -35,6 +34,7 @@ public MetricScrapingJob(IMetricsDeclarationProvider metricsDeclarationProvider, } public string CronSchedule { get; set; } + // ReSharper disable once UnassignedGetOnlyAutoProperty public string CronTimeZone { get; } public bool RunImmediately { get; set; } @@ -75,4 +75,4 @@ private async Task ScrapeMetric(AzureMetadata azureMetadata, MetricDefaults metr await scraper.ScrapeAsync(metricDefinitionDefinition); } } -} \ No newline at end of file +} diff --git a/src/Promitor.Scraper.Host/Startup.cs b/src/Promitor.Scraper.Host/Startup.cs index 94a416afc..be29fc2db 100644 --- a/src/Promitor.Scraper.Host/Startup.cs +++ b/src/Promitor.Scraper.Host/Startup.cs @@ -14,7 +14,7 @@ namespace Promitor.Scraper.Host { public class Startup { - public Startup(IHostingEnvironment env) + public Startup() { Configuration = BuildConfiguration(); ScrapeEndpointBasePath = ScrapeEndpoint.GetBasePath(Configuration); diff --git a/src/Promitor.Scraper.Host/Validation/MetricDefinitions/AzureMetricConfigurationValidator.cs b/src/Promitor.Scraper.Host/Validation/MetricDefinitions/AzureMetricConfigurationValidator.cs index 49934b60e..82736990a 100644 --- a/src/Promitor.Scraper.Host/Validation/MetricDefinitions/AzureMetricConfigurationValidator.cs +++ b/src/Promitor.Scraper.Host/Validation/MetricDefinitions/AzureMetricConfigurationValidator.cs @@ -9,7 +9,7 @@ public class AzureMetricConfigurationValidator public AzureMetricConfigurationValidator(MetricDefaults metricDefaults) { - this._metricDefaults = metricDefaults; + _metricDefaults = metricDefaults; } public List Validate(AzureMetricConfiguration azureMetricConfiguration) diff --git a/src/Promitor.Scraper.Host/Validation/MetricDefinitions/Interfaces/IMetricValidator.cs b/src/Promitor.Scraper.Host/Validation/MetricDefinitions/Interfaces/IMetricValidator.cs index 9b1b06852..f6a0217c5 100644 --- a/src/Promitor.Scraper.Host/Validation/MetricDefinitions/Interfaces/IMetricValidator.cs +++ b/src/Promitor.Scraper.Host/Validation/MetricDefinitions/Interfaces/IMetricValidator.cs @@ -11,6 +11,7 @@ public interface IMetricValidator /// /// Metric definition to validate /// List of validation errors + // ReSharper disable once UnusedMember.Global List Validate(TMetricDefinition metricDefinition); } } \ No newline at end of file diff --git a/src/Promitor.Scraper.Host/Validation/MetricDefinitions/MetricAggregationValidator.cs b/src/Promitor.Scraper.Host/Validation/MetricDefinitions/MetricAggregationValidator.cs index 4a89eab81..00499374b 100644 --- a/src/Promitor.Scraper.Host/Validation/MetricDefinitions/MetricAggregationValidator.cs +++ b/src/Promitor.Scraper.Host/Validation/MetricDefinitions/MetricAggregationValidator.cs @@ -9,7 +9,7 @@ public class MetricAggregationValidator public MetricAggregationValidator(MetricDefaults metricDefaults) { - this._metricDefaults = metricDefaults; + _metricDefaults = metricDefaults; } public List Validate(MetricAggregation metricsAggregation) diff --git a/src/Promitor.Scraper.Host/Validation/MetricDefinitions/MetricsValidator.cs b/src/Promitor.Scraper.Host/Validation/MetricDefinitions/MetricsValidator.cs index f742cade5..4d3ae6959 100644 --- a/src/Promitor.Scraper.Host/Validation/MetricDefinitions/MetricsValidator.cs +++ b/src/Promitor.Scraper.Host/Validation/MetricDefinitions/MetricsValidator.cs @@ -10,11 +10,11 @@ namespace Promitor.Scraper.Host.Validation.MetricDefinitions { public class MetricsValidator { - private readonly MetricDefaults metricDefaults; + private readonly MetricDefaults _metricDefaults; public MetricsValidator(MetricDefaults metricDefaults) { - this.metricDefaults = metricDefaults; + _metricDefaults = metricDefaults; } public List Validate(List metrics) @@ -75,7 +75,7 @@ public List Validate(MetricDefinition metric) errorMessages.AddRange(metricDefinitionValidationErrors); - var metricAggregationValidator = new AzureMetricConfigurationValidator(metricDefaults); + var metricAggregationValidator = new AzureMetricConfigurationValidator(_metricDefaults); var metricsConfigurationErrorMessages = metricAggregationValidator.Validate(metric.AzureMetricConfiguration); errorMessages.AddRange(metricsConfigurationErrorMessages); diff --git a/src/Promitor.Scraper.Host/Validation/RuntimeValidator.cs b/src/Promitor.Scraper.Host/Validation/RuntimeValidator.cs index 2b272c2a6..65d2cfe14 100644 --- a/src/Promitor.Scraper.Host/Validation/RuntimeValidator.cs +++ b/src/Promitor.Scraper.Host/Validation/RuntimeValidator.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Console; @@ -7,6 +6,7 @@ using Promitor.Scraper.Host.Validation.Exceptions; using Promitor.Scraper.Host.Validation.Interfaces; using Promitor.Scraper.Host.Validation.Steps; +#pragma warning disable 618 namespace Promitor.Scraper.Host.Validation { diff --git a/src/Promitor.Scraper.Host/Validation/Steps/ConfigurationPathValidationStep.cs b/src/Promitor.Scraper.Host/Validation/Steps/ConfigurationPathValidationStep.cs index 8ed1efa0a..4d230f5d3 100644 --- a/src/Promitor.Scraper.Host/Validation/Steps/ConfigurationPathValidationStep.cs +++ b/src/Promitor.Scraper.Host/Validation/Steps/ConfigurationPathValidationStep.cs @@ -24,8 +24,8 @@ public ValidationResult Run() var configurationPath = Environment.GetEnvironmentVariable(EnvironmentVariables.Configuration.Path); if (string.IsNullOrWhiteSpace(configurationPath)) { - Logger.LogWarning("No scrape configuration path configured, falling back to default one on '{configurationPath}'.", Promitor.Core.Scraping.Constants.Defaults.MetricsDeclarationPath); - configurationPath = Promitor.Core.Scraping.Constants.Defaults.MetricsDeclarationPath; + Logger.LogWarning("No scrape configuration path configured, falling back to default one on '{configurationPath}'.", Core.Scraping.Constants.Defaults.MetricsDeclarationPath); + configurationPath = Core.Scraping.Constants.Defaults.MetricsDeclarationPath; Environment.SetEnvironmentVariable(EnvironmentVariables.Configuration.Path, configurationPath); } @@ -35,7 +35,7 @@ public ValidationResult Run() return ValidationResult.Failure(ComponentName, errorMessage); } - Logger.LogInformation("Scrape configuration found at '{configurationPath}'", Promitor.Core.Scraping.Constants.Defaults.MetricsDeclarationPath); + Logger.LogInformation("Scrape configuration found at '{configurationPath}'", Core.Scraping.Constants.Defaults.MetricsDeclarationPath); return ValidationResult.Successful(ComponentName); } } diff --git a/src/Promitor.Scraper.Host/Validation/Steps/ScrapingScheduleValidationStep.cs b/src/Promitor.Scraper.Host/Validation/Steps/ScrapingScheduleValidationStep.cs index a4878d581..842f252b4 100644 --- a/src/Promitor.Scraper.Host/Validation/Steps/ScrapingScheduleValidationStep.cs +++ b/src/Promitor.Scraper.Host/Validation/Steps/ScrapingScheduleValidationStep.cs @@ -1,5 +1,4 @@ using System; -using System.Linq; using Cronos; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; diff --git a/src/Promitor.Scraper.Tests.Unit/Builders/MetricsDeclarationBuilder.cs b/src/Promitor.Scraper.Tests.Unit/Builders/MetricsDeclarationBuilder.cs index 924dee240..cd2cdd05f 100644 --- a/src/Promitor.Scraper.Tests.Unit/Builders/MetricsDeclarationBuilder.cs +++ b/src/Promitor.Scraper.Tests.Unit/Builders/MetricsDeclarationBuilder.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using Microsoft.Azure.KeyVault.Models; using Microsoft.Azure.Management.Monitor.Fluent.Models; using Microsoft.Extensions.Logging.Abstractions; using Promitor.Core.Scraping.Configuration.Model; diff --git a/src/Promitor.Scraper.Tests.Unit/Serialization/MetricsDeclaration/MetricsDeclarationWithAzureStorageQueueYamlSerializationTests.cs b/src/Promitor.Scraper.Tests.Unit/Serialization/MetricsDeclaration/MetricsDeclarationWithAzureStorageQueueYamlSerializationTests.cs index 9326a5ed2..7faf0d797 100644 --- a/src/Promitor.Scraper.Tests.Unit/Serialization/MetricsDeclaration/MetricsDeclarationWithAzureStorageQueueYamlSerializationTests.cs +++ b/src/Promitor.Scraper.Tests.Unit/Serialization/MetricsDeclaration/MetricsDeclarationWithAzureStorageQueueYamlSerializationTests.cs @@ -1,4 +1,3 @@ -using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; diff --git a/src/Promitor.Scraper.Tests.Unit/Stubs/MetricsDeclarationProviderStub.cs b/src/Promitor.Scraper.Tests.Unit/Stubs/MetricsDeclarationProviderStub.cs index e014d110c..921ca5516 100644 --- a/src/Promitor.Scraper.Tests.Unit/Stubs/MetricsDeclarationProviderStub.cs +++ b/src/Promitor.Scraper.Tests.Unit/Stubs/MetricsDeclarationProviderStub.cs @@ -1,10 +1,9 @@ using Microsoft.Extensions.Logging.Abstractions; using Promitor.Core.Scraping.Configuration.Providers; -using Promitor.Core.Scraping.Configuration.Providers.Interfaces; namespace Promitor.Scraper.Tests.Unit.Stubs { - public class MetricsDeclarationProviderStub : MetricsDeclarationProvider, IMetricsDeclarationProvider + public class MetricsDeclarationProviderStub : MetricsDeclarationProvider { private readonly string _rawMetricsDeclaration; diff --git a/src/Promitor.sln b/src/Promitor.sln index d5183de94..d27a30d86 100644 --- a/src/Promitor.sln +++ b/src/Promitor.sln @@ -36,6 +36,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Promitor.Core", "Promitor.C EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Promitor.Integrations.AzureStorage", "Promitor.Integrations.AzureStorage\Promitor.Integrations.AzureStorage.csproj", "{F929434C-07FB-4B55-A8EE-5C77D8B49809}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B65C1C71-7334-4B28-B42E-EA5924CEAA84}" + ProjectSection(SolutionItems) = preProject + Promitor.sln.DotSettings = Promitor.sln.DotSettings + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/Promitor.sln.DotSettings b/src/Promitor.sln.DotSettings index 96d2083dd..5f5cb44b9 100644 --- a/src/Promitor.sln.DotSettings +++ b/src/Promitor.sln.DotSettings @@ -1,4 +1,10 @@  + SUGGESTION + SUGGESTION + SUGGESTION + SUGGESTION + SUGGESTION + SUGGESTION False NEVER True @@ -8,9 +14,14 @@ CHOP_ALWAYS None False + <Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> True True True True True - True \ No newline at end of file + True + True + True + True \ No newline at end of file