diff --git a/rules/QW0017.md b/rules/QW0017.md index cba8646..3ee92c6 100644 --- a/rules/QW0017.md +++ b/rules/QW0017.md @@ -1,8 +1,8 @@ # QW0017: Apply arithmetic operations on non-nullables only .NET allows arithmetic operations between nullable value types. The outcome of -those operations will potentially by `null` if any of the operants has no value -runtime. This behavior is commonly undesirable, and occurrences are not trivial +those operations will potentially be `null` if any of the operants has no value +at runtime. This behavior is usually undesirable, and occurrences are not trivial to spot, potentially leading to bugs. ## Non-compliant diff --git a/specs/Qowaiv.CodeAnalysis.Specs/Cases/ApplyArithmeticOperationsOnNonNullablesOnly.cs b/specs/Qowaiv.CodeAnalysis.Specs/Cases/ApplyArithmeticOperationsOnNonNullablesOnly.cs index ed709af..de50947 100644 --- a/specs/Qowaiv.CodeAnalysis.Specs/Cases/ApplyArithmeticOperationsOnNonNullablesOnly.cs +++ b/specs/Qowaiv.CodeAnalysis.Specs/Cases/ApplyArithmeticOperationsOnNonNullablesOnly.cs @@ -1,4 +1,3 @@ - using Qowaiv.Financial; class Noncompliant diff --git a/src/Qowaiv.CodeAnalysis.CSharp/README.md b/src/Qowaiv.CodeAnalysis.CSharp/README.md index 2e02b4c..d7159ce 100644 --- a/src/Qowaiv.CodeAnalysis.CSharp/README.md +++ b/src/Qowaiv.CodeAnalysis.CSharp/README.md @@ -17,7 +17,7 @@ Contains [Roslyn](https://docs.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/) (s * [**QW0014** - Define global using statements separately](rules/QW0014.md) * [**QW0015** - Define global using statements in single file](rules/QW0015.md) * [**QW0016** - Prefer regular over positional properties](rules/QW0016.md) -* [**QW0017** - Apply arithmetic operations on non-nullables only ](rules/QW0017.md) +* [**QW0017** - Apply arithmetic operations on non-nullables only](rules/QW0017.md) ## Code fixes * Use Qowaiv.Clock ([QW0001](rules/QW0001.md), [S6354](https://rules.sonarsource.com/csharp/RSPEC-6354)) diff --git a/src/Qowaiv.CodeAnalysis.CSharp/Rules/ArithmeticArgumentsShouldHaveValue.cs b/src/Qowaiv.CodeAnalysis.CSharp/Rules/ArithmeticArgumentsShouldHaveValue.cs index 9b73a80..b88552f 100644 --- a/src/Qowaiv.CodeAnalysis.CSharp/Rules/ArithmeticArgumentsShouldHaveValue.cs +++ b/src/Qowaiv.CodeAnalysis.CSharp/Rules/ArithmeticArgumentsShouldHaveValue.cs @@ -1,4 +1,4 @@ -namespace Qowaiv.CodeAnalysis.Rules; +namespace Qowaiv.CodeAnalysis.Rules; [DiagnosticAnalyzer(LanguageNames.CSharp)] public sealed class ApplyArithmeticOperationsOnNonNullablesOnly() : CodingRule(Rule.ApplyArithmeticOperationsOnNonNullablesOnly)