Clean up, validation attributes added, EventIds removed from logs #21
Annotations
10 warnings
build:
EerieLeap/Controllers/ConfigControllerBase.cs#L8
Do not declare visible instance fields (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1051)
|
build:
EerieLeap/Hardware/SpiAdc.cs#L20
In externally visible method 'void SpiAdc.Configure(AdcConfig config)', validate parameter 'config' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)
|
build:
EerieLeap/Repositories/JsonConfigurationRepository.cs#L24
In externally visible method 'JsonConfigurationRepository.JsonConfigurationRepository(ILogger logger, IOptions<ConfigurationOptions> options, JsonSerializerOptions? readOptions = null, JsonSerializerOptions? writeOptions = null)', validate parameter 'options' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)
|
build:
EerieLeap/Utilities/ExpressionEvaluator.cs#L31
In externally visible method 'double ExpressionEvaluator.EvaluateWithSensors(string expression, Dictionary<string, double> sensorValues)', validate parameter 'sensorValues' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)
|
build:
EerieLeap/Repositories/JsonConfigurationRepository.cs#L75
Modify 'SaveAsync' to catch a more specific allowed exception type, or rethrow the exception (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1031)
|
build:
EerieLeap/Utilities/DataAnnotations/RequiredForVirtualSensorAttribute.cs#L13
In externally visible method 'ValidationResult? RequiredForVirtualSensorAttribute.IsValid(object? value, ValidationContext validationContext)', validate parameter 'validationContext' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)
|
build:
EerieLeap/Utilities/DataAnnotations/RequiredForPhysicalSensorAttribute.cs#L13
In externally visible method 'ValidationResult? RequiredForPhysicalSensorAttribute.IsValid(object? value, ValidationContext validationContext)', validate parameter 'validationContext' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)
|
build:
EerieLeap/Repositories/JsonConfigurationRepository.cs#L101
Modify 'DeleteAsync' to catch a more specific allowed exception type, or rethrow the exception (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1031)
|
build:
EerieLeap/Utilities/Converters/HexByteArrayConverter.cs#L41
In externally visible method 'void HexByteArrayConverter.Write(Utf8JsonWriter writer, byte[]? value, JsonSerializerOptions options)', validate parameter 'writer' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)
|
build:
EerieLeap/Utilities/Converters/HexNumberConverter.cs#L57
In externally visible method 'void HexNumberConverter<T>.Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options)', validate parameter 'writer' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)
|