From 0d33f8b61546afbb9ae5a56569a38fe99ded5e13 Mon Sep 17 00:00:00 2001 From: Andrei Epure Date: Thu, 6 Jan 2022 18:49:41 +0100 Subject: [PATCH 01/12] Add test cases --- .../TestCases/MagicNumberShouldNotBeUsed.cs | 45 ++++++++++++++++++- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs b/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs index 963bb8cf616..cbba820e6e0 100644 --- a/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs +++ b/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs @@ -1,11 +1,29 @@ using System; +using System.Collections.Generic; namespace Tests.Diagnostics { + [AttributeUsage(AttributeTargets.Method, Inherited = false)] + public class FooAttribute : Attribute + { + public int Baz { get; set; } + public FooAttribute(int Bar, int Bar2 = 0) + { + } + } + + public class FooBar + { + public int Size { get; set; } + } + public class ValidUseCases { private const int MAGIC = 42; + private IntPtr Pointer = new IntPtr(19922); // Compliant, class constructor public readonly int MY_VALUE = 25; + const int ONE_YEAR_IN_SECONDS = 31_557_600; + static readonly int ReadOnlyValue = Bar(999); // Compliant as stored in static readonly public int A { get; set; } = 2; @@ -14,18 +32,29 @@ public static double FooProp get { return 2; } } - public ValidUseCases() + public ValidUseCases(string s, FooBar foo) { int i1 = 0; int i2 = -1; int i3 = 1; int i4 = 42; + var list = new List(42); // Compliant, class constructor + var bigInteger = new IntPtr(1612342); // Compliant, class constructor + var g = new Guid(0xA, 0xB, 0xC, new Byte[] { 0, 1, 2, 3, 4, 5, 6, 7 }); // Compliant, class constructor + long[] values1 = { 30L, 40L }; // Compliant, array initialisation + int[] values2 = new int[] { 100, 200 }; // Compliant, array initialisation + Console.WriteLine(value: 12); // Noncompliant FP - Compliant, named argument for (int i = 0; i < 0; i++) { } + var result = list.Count == 9; // Compliant, single digit for Count + result = list.Count < 4; // Noncompliant FP - Compliant, single digit for Count + result = s.Length == 2; // Noncompliant FP - Compliant, single digit for Length + result = foo.Size == 2; // Noncompliant FP - Compliant, single digit for Size + const int VAL = 15; Console.Write("test"); @@ -36,10 +65,15 @@ public override int GetHashCode() return MY_VALUE * 397; } + [Foo(Bar: 42, Baz = 43)] // Noncompliant FP - Compliant, explicit attribute argument names + // Noncompliant @-1 public void Foo(int value = 42) { var x = -1 < 1; } + + [Foo(42)] // Noncompliant FP -Compliant, attribute with only one argument + public static int Bar(int value) => 0; } public enum MyEnum @@ -56,7 +90,7 @@ public static double FooProp get { return Math.Sqrt(4); } // Noncompliant } - public WrongUseCases() + public WrongUseCases(List list, string s, FooBar foo) { Console.WriteLine(12); // Noncompliant @@ -67,8 +101,15 @@ public WrongUseCases() var array = new string[10]; array[5] = "test"; // Noncompliant + + var result = list.Count == 99; + result = list.Count < 400; // Noncompliant + result = s.Length == 121; // Noncompliant + result = foo.Size == 472; // Noncompliant } + [Foo(42, 43)] // Noncompliant + // Noncompliant@-1 public int GetValue() { return 13; // Noncompliant From 1236cf7af8e5c71a4870d83c202ab14770d2da68 Mon Sep 17 00:00:00 2001 From: Andrei Epure Date: Fri, 7 Jan 2022 13:24:52 +0100 Subject: [PATCH 02/12] Ignore named arguments --- .../Rules/MagicNumberShouldNotBeUsed.cs | 8 +++++++- .../TestCases/MagicNumberShouldNotBeUsed.cs | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs b/analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs index 2e0f45efc2a..11c95ce3012 100644 --- a/analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs +++ b/analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +using System; using System.Collections.Generic; using System.Collections.Immutable; using Microsoft.CodeAnalysis; @@ -68,7 +69,12 @@ private static bool IsExceptionToTheRule(LiteralExpressionSyntax literalExpressi // It's ok to use magic numbers in pragma directives || literalExpression.FirstAncestorOrSelf() != null // It's ok to use magic numbers in property declaration - || IsInsideProperty(literalExpression); + || IsInsideProperty(literalExpression) + || IsNamedArgument(literalExpression); + + private static bool IsNamedArgument(LiteralExpressionSyntax literalExpression) => + literalExpression.Parent is ArgumentSyntax arg + && arg.NameColon is not null; // Inside property we consider magic numbers as exceptions in the following cases: // - A {get; set;} = MAGIC_NUMBER diff --git a/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs b/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs index cbba820e6e0..04a28e3b4ca 100644 --- a/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs +++ b/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs @@ -43,7 +43,7 @@ public ValidUseCases(string s, FooBar foo) var g = new Guid(0xA, 0xB, 0xC, new Byte[] { 0, 1, 2, 3, 4, 5, 6, 7 }); // Compliant, class constructor long[] values1 = { 30L, 40L }; // Compliant, array initialisation int[] values2 = new int[] { 100, 200 }; // Compliant, array initialisation - Console.WriteLine(value: 12); // Noncompliant FP - Compliant, named argument + Console.WriteLine(value: 12); // Compliant, named argument for (int i = 0; i < 0; i++) { From 04eaed993797a0f18889660efc4cc53c710d19a2 Mon Sep 17 00:00:00 2001 From: Andrei Epure Date: Fri, 7 Jan 2022 13:34:52 +0100 Subject: [PATCH 03/12] Ignore attributes when single or named argument --- .../Rules/MagicNumberShouldNotBeUsed.cs | 10 +++++++++- .../TestCases/MagicNumberShouldNotBeUsed.cs | 5 ++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs b/analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs index 11c95ce3012..afd0b1e2240 100644 --- a/analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs +++ b/analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs @@ -70,12 +70,20 @@ private static bool IsExceptionToTheRule(LiteralExpressionSyntax literalExpressi || literalExpression.FirstAncestorOrSelf() != null // It's ok to use magic numbers in property declaration || IsInsideProperty(literalExpression) - || IsNamedArgument(literalExpression); + || IsNamedArgument(literalExpression) + || IsInAllowedAttribute(literalExpression); private static bool IsNamedArgument(LiteralExpressionSyntax literalExpression) => literalExpression.Parent is ArgumentSyntax arg && arg.NameColon is not null; + // Either it is the only argument of the attribute, or it is a named argument. + private static bool IsInAllowedAttribute(LiteralExpressionSyntax literalExpression) => + literalExpression.Parent is AttributeArgumentSyntax arg + && (arg.NameColon is not null + || arg.NameEquals is not null + || (arg.Parent is AttributeArgumentListSyntax argList && argList.Arguments.Count == 1)); + // Inside property we consider magic numbers as exceptions in the following cases: // - A {get; set;} = MAGIC_NUMBER // - A { get { return MAGIC_NUMBER; } } diff --git a/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs b/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs index 04a28e3b4ca..a5212727d93 100644 --- a/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs +++ b/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs @@ -65,14 +65,13 @@ public override int GetHashCode() return MY_VALUE * 397; } - [Foo(Bar: 42, Baz = 43)] // Noncompliant FP - Compliant, explicit attribute argument names - // Noncompliant @-1 + [Foo(Bar: 42, Baz = 43)] // Compliant, explicit attribute argument names public void Foo(int value = 42) { var x = -1 < 1; } - [Foo(42)] // Noncompliant FP -Compliant, attribute with only one argument + [Foo(42)] // Compliant, attribute with only one argument public static int Bar(int value) => 0; } From 58a9de2f4898fe9559b786f18e3af2e3ef7abcbd Mon Sep 17 00:00:00 2001 From: Andrei Epure Date: Fri, 7 Jan 2022 13:59:43 +0100 Subject: [PATCH 04/12] Ignore single digit comparisons for some names --- .../Rules/MagicNumberShouldNotBeUsed.cs | 23 ++++++++++++++++--- .../TestCases/MagicNumberShouldNotBeUsed.cs | 14 +++++++---- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs b/analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs index afd0b1e2240..17bbbb6b75f 100644 --- a/analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs +++ b/analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; using System.Collections.Immutable; +using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; @@ -42,6 +43,8 @@ public sealed class MagicNumberShouldNotBeUsed : SonarDiagnosticAnalyzer private static readonly ISet NotConsideredAsMagicNumbers = new HashSet { "-1", "0", "1" }; + private static readonly string[] AcceptedNamesForSingleDigitComparison = { "size", "count", "length" }; + protected override void Initialize(SonarAnalysisContext context) => context.RegisterSyntaxNodeActionInNonGenerated( c => @@ -71,14 +74,22 @@ private static bool IsExceptionToTheRule(LiteralExpressionSyntax literalExpressi // It's ok to use magic numbers in property declaration || IsInsideProperty(literalExpression) || IsNamedArgument(literalExpression) - || IsInAllowedAttribute(literalExpression); + || IsSingleOrNamedAttributeArgument(literalExpression) + || IsSingleDigitInToleratedComparisons(literalExpression); + + private static bool IsSingleDigitInToleratedComparisons(LiteralExpressionSyntax literalExpression) => + literalExpression.Parent is BinaryExpressionSyntax binaryExpression + && binaryExpression.IsAnyKind(SyntaxKind.EqualsExpression, SyntaxKind.LessThanExpression, SyntaxKind.LessThanOrEqualExpression) + && IsSingleDigit(literalExpression.Token.ValueText) + && ToStringContainsAnyAcceptedNames(binaryExpression); + + private static bool IsSingleDigit(string text) => byte.TryParse(text, out var result) && result <= 9; private static bool IsNamedArgument(LiteralExpressionSyntax literalExpression) => literalExpression.Parent is ArgumentSyntax arg && arg.NameColon is not null; - // Either it is the only argument of the attribute, or it is a named argument. - private static bool IsInAllowedAttribute(LiteralExpressionSyntax literalExpression) => + private static bool IsSingleOrNamedAttributeArgument(LiteralExpressionSyntax literalExpression) => literalExpression.Parent is AttributeArgumentSyntax arg && (arg.NameColon is not null || arg.NameEquals is not null @@ -96,5 +107,11 @@ private static bool IsInsideProperty(SyntaxNode node) var parent = node.Parent; return parent is ReturnStatementSyntax || parent is EqualsValueClauseSyntax; } + + private static bool ToStringContainsAnyAcceptedNames(SyntaxNode syntaxNode) + { + var toString = syntaxNode.ToString().ToLower(); + return AcceptedNamesForSingleDigitComparison.Any(x => toString.Contains(x)); + } } } diff --git a/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs b/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs index a5212727d93..f739a3a101b 100644 --- a/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs +++ b/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs @@ -15,6 +15,8 @@ public FooAttribute(int Bar, int Bar2 = 0) public class FooBar { public int Size { get; set; } + public int COUNT { get; set; } + public int length { get; set; } } public class ValidUseCases @@ -50,10 +52,12 @@ public ValidUseCases(string s, FooBar foo) } - var result = list.Count == 9; // Compliant, single digit for Count - result = list.Count < 4; // Noncompliant FP - Compliant, single digit for Count - result = s.Length == 2; // Noncompliant FP - Compliant, single digit for Length - result = foo.Size == 2; // Noncompliant FP - Compliant, single digit for Size + var result = list.Count == 1; // Compliant, single digit for Count + result = list.Count < 2; // Compliant, single digit for Count + result = s.Length == 3; // Compliant, single digit for Length + result = foo.Size == 4; // Compliant, single digit for Size + result = foo.COUNT == 8; // Compliant, single digit for Size + result = foo.length == 9; // Compliant, single digit for Size const int VAL = 15; @@ -105,6 +109,8 @@ public WrongUseCases(List list, string s, FooBar foo) result = list.Count < 400; // Noncompliant result = s.Length == 121; // Noncompliant result = foo.Size == 472; // Noncompliant + var x = 1; + result = x == 2; // Noncompliant } [Foo(42, 43)] // Noncompliant From 2f7205f5f27e003ea281ab04e2e271d7213fbf0a Mon Sep 17 00:00:00 2001 From: Andrei Epure Date: Fri, 7 Jan 2022 16:17:43 +0100 Subject: [PATCH 05/12] relax more conditions; improve ccov --- .../Rules/MagicNumberShouldNotBeUsed.cs | 47 ++++++++--------- .../TestCases/MagicNumberShouldNotBeUsed.cs | 50 ++++++++++++++++--- 2 files changed, 65 insertions(+), 32 deletions(-) diff --git a/analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs b/analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs index 17bbbb6b75f..220bbeaf3d7 100644 --- a/analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs +++ b/analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs @@ -61,33 +61,41 @@ protected override void Initialize(SonarAnalysisContext context) => private static bool IsExceptionToTheRule(LiteralExpressionSyntax literalExpression) => NotConsideredAsMagicNumbers.Contains(literalExpression.Token.ValueText) - // It's ok to use magic numbers as part of a variable declaration || literalExpression.FirstAncestorOrSelf() != null - // It's ok to use magic numbers as part of a parameter declaration || literalExpression.FirstAncestorOrSelf() != null - // It's ok to use magic numbers as part of an enum declaration || literalExpression.FirstAncestorOrSelf() != null - // It's ok to use magic numbers in the GetHashCode method. Note that I am only checking the method name of the sake of simplicity || literalExpression.FirstAncestorOrSelf()?.Identifier.ValueText == nameof(object.GetHashCode) - // It's ok to use magic numbers in pragma directives || literalExpression.FirstAncestorOrSelf() != null - // It's ok to use magic numbers in property declaration || IsInsideProperty(literalExpression) - || IsNamedArgument(literalExpression) - || IsSingleOrNamedAttributeArgument(literalExpression) - || IsSingleDigitInToleratedComparisons(literalExpression); + || IsSingleDigitInToleratedComparisons(literalExpression) + || IsToleratedArgument(literalExpression); + + // Inside property we consider magic numbers as exceptions in the following cases: + // - A {get; set;} = MAGIC_NUMBER + // - A { get { return MAGIC_NUMBER; } } + private static bool IsInsideProperty(SyntaxNode node) + { + if (node.FirstAncestorOrSelf() == null) + { + return false; + } + var parent = node.Parent; + return parent is ReturnStatementSyntax || parent is EqualsValueClauseSyntax; + } private static bool IsSingleDigitInToleratedComparisons(LiteralExpressionSyntax literalExpression) => literalExpression.Parent is BinaryExpressionSyntax binaryExpression - && binaryExpression.IsAnyKind(SyntaxKind.EqualsExpression, SyntaxKind.LessThanExpression, SyntaxKind.LessThanOrEqualExpression) && IsSingleDigit(literalExpression.Token.ValueText) && ToStringContainsAnyAcceptedNames(binaryExpression); - private static bool IsSingleDigit(string text) => byte.TryParse(text, out var result) && result <= 9; + private static bool IsToleratedArgument(LiteralExpressionSyntax literalExpression) => + IsToleratedMethodArgument(literalExpression) + || IsSingleOrNamedAttributeArgument(literalExpression); - private static bool IsNamedArgument(LiteralExpressionSyntax literalExpression) => + // Named argument or constructor argument. + private static bool IsToleratedMethodArgument(LiteralExpressionSyntax literalExpression) => literalExpression.Parent is ArgumentSyntax arg - && arg.NameColon is not null; + && (arg.NameColon is not null || arg.Parent.Parent is ObjectCreationExpressionSyntax); private static bool IsSingleOrNamedAttributeArgument(LiteralExpressionSyntax literalExpression) => literalExpression.Parent is AttributeArgumentSyntax arg @@ -95,18 +103,7 @@ literalExpression.Parent is AttributeArgumentSyntax arg || arg.NameEquals is not null || (arg.Parent is AttributeArgumentListSyntax argList && argList.Arguments.Count == 1)); - // Inside property we consider magic numbers as exceptions in the following cases: - // - A {get; set;} = MAGIC_NUMBER - // - A { get { return MAGIC_NUMBER; } } - private static bool IsInsideProperty(SyntaxNode node) - { - if (node.FirstAncestorOrSelf() == null) - { - return false; - } - var parent = node.Parent; - return parent is ReturnStatementSyntax || parent is EqualsValueClauseSyntax; - } + private static bool IsSingleDigit(string text) => byte.TryParse(text, out var result) && result <= 9; private static bool ToStringContainsAnyAcceptedNames(SyntaxNode syntaxNode) { diff --git a/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs b/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs index f739a3a101b..417d389d93e 100644 --- a/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs +++ b/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs @@ -7,7 +7,7 @@ namespace Tests.Diagnostics public class FooAttribute : Attribute { public int Baz { get; set; } - public FooAttribute(int Bar, int Bar2 = 0) + public FooAttribute(int Bar = 0, int Bar2 = 0) { } } @@ -17,6 +17,7 @@ public class FooBar public int Size { get; set; } public int COUNT { get; set; } public int length { get; set; } + public int baz { get; set; } } public class ValidUseCases @@ -34,15 +35,22 @@ public static double FooProp get { return 2; } } + public ValidUseCases(int x, int y) { } + public ValidUseCases(string s, FooBar foo) { int i1 = 0; int i2 = -1; int i3 = 1; int i4 = 42; - var list = new List(42); // Compliant, class constructor - var bigInteger = new IntPtr(1612342); // Compliant, class constructor - var g = new Guid(0xA, 0xB, 0xC, new Byte[] { 0, 1, 2, 3, 4, 5, 6, 7 }); // Compliant, class constructor + var list = new List(42); // Compliant, set to variable + var bigInteger = new IntPtr(1612342); // compliant, set to variable + var g = new Guid(0xA, 0xB, 0xC, new Byte[] { 0, 1, 2, 3, 4, 5, 6, 7 }); // Compliant, set in a variable + + Foo(new IntPtr(123456)); // Compliant, class constructor + var byteArrayName = new Byte[] { 0, 1, 2, 3, 4, 5, 6, 7 }; + Foo(new Guid(0xA, 0xB, 0xC, byteArrayName)); // Compliant, magic numbers set directly as constructor params + long[] values1 = { 30L, 40L }; // Compliant, array initialisation int[] values2 = new int[] { 100, 200 }; // Compliant, array initialisation Console.WriteLine(value: 12); // Compliant, named argument @@ -54,14 +62,20 @@ public ValidUseCases(string s, FooBar foo) var result = list.Count == 1; // Compliant, single digit for Count result = list.Count < 2; // Compliant, single digit for Count + result = list.Count <= 2; // Compliant + result = list.Count != 2; // Compliant + result = list.Count > 2; // Compliant result = s.Length == 3; // Compliant, single digit for Length result = foo.Size == 4; // Compliant, single digit for Size - result = foo.COUNT == 8; // Compliant, single digit for Size - result = foo.length == 9; // Compliant, single digit for Size + result = foo.COUNT == 8; // Compliant + result = foo.length == 9; // Compliant const int VAL = 15; Console.Write("test"); + + // we tolerate magic constants sent to constructors + new ValidUseCases(100, 300); } public override int GetHashCode() @@ -69,14 +83,25 @@ public override int GetHashCode() return MY_VALUE * 397; } + [Foo(Bar: 42)] // Compliant, explicit attribute argument names + public void Foo1() { } + + [Foo(Baz = 43)] // Compliant, explicit attribute argument names + public void Foo2() { } + [Foo(Bar: 42, Baz = 43)] // Compliant, explicit attribute argument names - public void Foo(int value = 42) + public void Foo3() { } + + public void Foo(int value = 42) // compliant, default value for argument { var x = -1 < 1; } [Foo(42)] // Compliant, attribute with only one argument public static int Bar(int value) => 0; + + public static void Foo(IntPtr x) { } + public static void Foo(Guid x) { } } public enum MyEnum @@ -93,6 +118,8 @@ public static double FooProp get { return Math.Sqrt(4); } // Noncompliant } + public WrongUseCases(int x, int y) { } + public WrongUseCases(List list, string s, FooBar foo) { Console.WriteLine(12); // Noncompliant @@ -104,11 +131,17 @@ public WrongUseCases(List list, string s, FooBar foo) var array = new string[10]; array[5] = "test"; // Noncompliant + Foo(new int[] { 100 }); // Noncompliant, array with magic numbers should have a decent name + + + new WrongUseCases(100, Foo(200, 300)); // Noncompliant {{Assign this magic number '200' to a well-named (variable|constant), and use the (variable|constant) instead.}} + // Noncompliant@-1 {{Assign this magic number '300' to a well-named (variable|constant), and use the (variable|constant) instead.}} var result = list.Count == 99; result = list.Count < 400; // Noncompliant result = s.Length == 121; // Noncompliant result = foo.Size == 472; // Noncompliant + result = foo.baz == 4; // Noncompliant var x = 1; result = x == 2; // Noncompliant } @@ -119,6 +152,9 @@ public int GetValue() { return 13; // Noncompliant } + + public static void Foo(int[] array) { } + public static int Foo(int x, int y) => 1; } } From 9ba3ad25e8aad83d96119884c2301843168aa6c9 Mon Sep 17 00:00:00 2001 From: Andrei Epure Date: Fri, 7 Jan 2022 17:27:04 +0100 Subject: [PATCH 06/12] Improve tests --- .../TestCases/MagicNumberShouldNotBeUsed.cs | 52 ++++++++++++------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs b/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs index 417d389d93e..a5472949c66 100644 --- a/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs +++ b/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs @@ -23,7 +23,7 @@ public class FooBar public class ValidUseCases { private const int MAGIC = 42; - private IntPtr Pointer = new IntPtr(19922); // Compliant, class constructor + private IntPtr Pointer = new IntPtr(19922); // Compliant, store in field public readonly int MY_VALUE = 25; const int ONE_YEAR_IN_SECONDS = 31_557_600; static readonly int ReadOnlyValue = Bar(999); // Compliant as stored in static readonly @@ -35,6 +35,15 @@ public static double FooProp get { return 2; } } + public static double FooProp2 + { + get + { + var someName = Math.Sqrt(4096); // Compliant, stored in a variable + return someName; + } + } + public ValidUseCases(int x, int y) { } public ValidUseCases(string s, FooBar foo) @@ -45,14 +54,13 @@ public ValidUseCases(string s, FooBar foo) int i4 = 42; var list = new List(42); // Compliant, set to variable var bigInteger = new IntPtr(1612342); // compliant, set to variable - var g = new Guid(0xA, 0xB, 0xC, new Byte[] { 0, 1, 2, 3, 4, 5, 6, 7 }); // Compliant, set in a variable - - Foo(new IntPtr(123456)); // Compliant, class constructor - var byteArrayName = new Byte[] { 0, 1, 2, 3, 4, 5, 6, 7 }; - Foo(new Guid(0xA, 0xB, 0xC, byteArrayName)); // Compliant, magic numbers set directly as constructor params + var g = new Guid(0xA, 0xB, 0xC, new Byte[] { 0, 1, 2, 3, 4, 5, 6, 7 }); // Compliant, set to a variable + var valid = new ValidUseCases(100, 300); + var fooResult = Bar(42, Bar(110, Bar(233, 23454, Bar(999)))); // FN https://github.com/SonarSource/sonar-dotnet/issues/5251 + Foo(new IntPtr(123456)); // compliant, constructor - long[] values1 = { 30L, 40L }; // Compliant, array initialisation - int[] values2 = new int[] { 100, 200 }; // Compliant, array initialisation + long[] values1 = { 30L, 40L }; // Compliant, set to variable + int[] values2 = new int[] { 100, 200 }; // Compliant, set to variable Console.WriteLine(value: 12); // Compliant, named argument for (int i = 0; i < 0; i++) @@ -70,12 +78,11 @@ public ValidUseCases(string s, FooBar foo) result = foo.COUNT == 8; // Compliant result = foo.length == 9; // Compliant + WithTimeSpan(TimeSpan.FromDays(1), TimeSpan.FromMilliseconds(33)); // compliant + const int VAL = 15; Console.Write("test"); - - // we tolerate magic constants sent to constructors - new ValidUseCases(100, 300); } public override int GetHashCode() @@ -97,11 +104,13 @@ public void Foo3() { } var x = -1 < 1; } + public static void Foo(IntPtr x) { } + [Foo(42)] // Compliant, attribute with only one argument - public static int Bar(int value) => 0; + public static int Bar(int value, params int[] values) => 0; + + public static void WithTimeSpan(TimeSpan one, TimeSpan two) { } - public static void Foo(IntPtr x) { } - public static void Foo(Guid x) { } } public enum MyEnum @@ -115,28 +124,31 @@ public class WrongUseCases { public static double FooProp { - get { return Math.Sqrt(4); } // Noncompliant + get { return Math.Sqrt(4); } // Noncompliant {{Assign this magic number '4' to a well-named (variable|constant), and use the (variable|constant) instead.}} +// ^ } public WrongUseCases(int x, int y) { } public WrongUseCases(List list, string s, FooBar foo) { - Console.WriteLine(12); // Noncompliant + Console.WriteLine(12); // Noncompliant {{Assign this magic number '12' to a well-named (variable|constant), and use the (variable|constant) instead.}} - for (int i = 10; i < 50; i++) // Noncompliant + for (int i = 10; i < 50; i++) // Noncompliant {{Assign this magic number '50' to a well-named (variable|constant), and use the (variable|constant) instead.}} { } var array = new string[10]; - array[5] = "test"; // Noncompliant - Foo(new int[] { 100 }); // Noncompliant, array with magic numbers should have a decent name - + array[5] = "test"; // Noncompliant {{Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.}} + Foo(new int[] { 100 }); // Noncompliant new WrongUseCases(100, Foo(200, 300)); // Noncompliant {{Assign this magic number '200' to a well-named (variable|constant), and use the (variable|constant) instead.}} // Noncompliant@-1 {{Assign this magic number '300' to a well-named (variable|constant), and use the (variable|constant) instead.}} + Foo(new int[] { 100, 200 }); // Noncompliant {{Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.}} + // Noncompliant@-1 {{Assign this magic number '200' to a well-named (variable|constant), and use the (variable|constant) instead.}} + var result = list.Count == 99; result = list.Count < 400; // Noncompliant result = s.Length == 121; // Noncompliant From bc1eebcfc230e5608f8afab2bbfc7cd75997832b Mon Sep 17 00:00:00 2001 From: Andrei Epure Date: Mon, 10 Jan 2022 10:52:49 +0100 Subject: [PATCH 07/12] Ignore "From...()" API calls, fix binary expr check --- .../Rules/MagicNumberShouldNotBeUsed.cs | 18 +++++++++++++++++- .../TestCases/MagicNumberShouldNotBeUsed.cs | 18 ++++++++++++------ 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs b/analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs index 220bbeaf3d7..e67df7e9da2 100644 --- a/analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs +++ b/analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs @@ -45,6 +45,16 @@ public sealed class MagicNumberShouldNotBeUsed : SonarDiagnosticAnalyzer private static readonly string[] AcceptedNamesForSingleDigitComparison = { "size", "count", "length" }; + private static readonly SyntaxKind[] AllowedSingleDigitComparisons = + { + SyntaxKind.EqualsExpression, + SyntaxKind.NotEqualsExpression, + SyntaxKind.LessThanOrEqualExpression, + SyntaxKind.LessThanExpression, + SyntaxKind.GreaterThanExpression, + SyntaxKind.GreaterThanOrEqualExpression + }; + protected override void Initialize(SonarAnalysisContext context) => context.RegisterSyntaxNodeActionInNonGenerated( c => @@ -86,6 +96,7 @@ private static bool IsInsideProperty(SyntaxNode node) private static bool IsSingleDigitInToleratedComparisons(LiteralExpressionSyntax literalExpression) => literalExpression.Parent is BinaryExpressionSyntax binaryExpression && IsSingleDigit(literalExpression.Token.ValueText) + && binaryExpression.IsAnyKind(AllowedSingleDigitComparisons) && ToStringContainsAnyAcceptedNames(binaryExpression); private static bool IsToleratedArgument(LiteralExpressionSyntax literalExpression) => @@ -95,7 +106,12 @@ private static bool IsToleratedArgument(LiteralExpressionSyntax literalExpressio // Named argument or constructor argument. private static bool IsToleratedMethodArgument(LiteralExpressionSyntax literalExpression) => literalExpression.Parent is ArgumentSyntax arg - && (arg.NameColon is not null || arg.Parent.Parent is ObjectCreationExpressionSyntax); + && (arg.NameColon is not null || arg.Parent.Parent is ObjectCreationExpressionSyntax || LooksLikeTimeApi(arg.Parent.Parent)); + + private static bool LooksLikeTimeApi(SyntaxNode node) => + node is InvocationExpressionSyntax invocationExpression + && invocationExpression.Expression.GetIdentifier() is { } identifier + && identifier.Identifier.ValueText.StartsWith("From"); private static bool IsSingleOrNamedAttributeArgument(LiteralExpressionSyntax literalExpression) => literalExpression.Parent is AttributeArgumentSyntax arg diff --git a/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs b/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs index a5472949c66..2cc7bfdbabd 100644 --- a/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs +++ b/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs @@ -63,10 +63,7 @@ public ValidUseCases(string s, FooBar foo) int[] values2 = new int[] { 100, 200 }; // Compliant, set to variable Console.WriteLine(value: 12); // Compliant, named argument - for (int i = 0; i < 0; i++) - { - - } + for (int i = 0; i < 0; i++) { } var result = list.Count == 1; // Compliant, single digit for Count result = list.Count < 2; // Compliant, single digit for Count @@ -110,7 +107,6 @@ public static void Foo(IntPtr x) { } public static int Bar(int value, params int[] values) => 0; public static void WithTimeSpan(TimeSpan one, TimeSpan two) { } - } public enum MyEnum @@ -149,13 +145,22 @@ public WrongUseCases(List list, string s, FooBar foo) Foo(new int[] { 100, 200 }); // Noncompliant {{Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.}} // Noncompliant@-1 {{Assign this magic number '200' to a well-named (variable|constant), and use the (variable|constant) instead.}} + GetSomeFrom(42); // Noncompliant + + for (int i = 0; i < list.Count / 8; i++) { } // Noncompliant + var result = list.Count == 99; result = list.Count < 400; // Noncompliant result = s.Length == 121; // Noncompliant result = foo.Size == 472; // Noncompliant result = foo.baz == 4; // Noncompliant + result = s.Length == list.Count / 2 ; // Noncompliant FP - clear it's checking if it's half the list var x = 1; result = x == 2; // Noncompliant + Foo(foo.Size + 41, s.Length - 43, list.Count * 2, list.Count / 8); // Noncompliant + // Noncompliant@-1 + // Noncompliant@-2 + // Noncompliant@-3 } [Foo(42, 43)] // Noncompliant @@ -165,8 +170,9 @@ public int GetValue() return 13; // Noncompliant } - public static void Foo(int[] array) { } + public static void Foo(params int[] array) { } public static int Foo(int x, int y) => 1; + public static void GetSomeFrom(int value) { } } } From 8df471fdaa330cd20bed416efcd7f6e9b57dcca8 Mon Sep 17 00:00:00 2001 From: Andrei Epure Date: Mon, 10 Jan 2022 11:10:40 +0100 Subject: [PATCH 08/12] update its --- .../Automapper/AutoMapper--net461-S109.json | 26 - .../AutoMapper--netstandard2.0-S109.json | 26 - ...697-5AFD-4813-AEDC-AF33FACEADF0}-S109.json | 17 - .../expected/Nancy/Nancy--net452-S109.json | 195 -- .../Nancy/Nancy--netstandard2.0-S109.json | 195 -- ...ncy.Authentication.Basic--net452-S109.json | 13 - ...entication.Basic--netstandard2.0-S109.json | 13 - ...BD-4BE5-AF0B-19715601DF35-net5.0-S109.json | 30 - ...5B-4E14-809C-B43AF38748D9-net5.0-S109.json | 39 - .../NetCore31--netcoreapp3.1-S109.json | 82 - ...ConfigurableRules--netcoreapp3.1-S109.json | 56 - .../akka.net/Akka--netstandard2.0-S109.json | 182 -- .../Akka.Benchmarks--netcoreapp3.1-S109.json | 286 -- .../Akka.Cluster--netstandard2.0-S109.json | 52 - ...Cluster.Sharding--netstandard2.0-S109.json | 65 - ....Cluster.TestKit--netstandard2.0-S109.json | 17 - ...Tests.Performance--netcoreapp3.1-S109.json | 95 - ...ka.Cluster.Tools--netstandard2.0-S109.json | 52 - .../Akka.DI.TestKit--netstandard2.0-S109.json | 52 - ....DistributedData--netstandard2.0-S109.json | 117 - ...Akka.MultiNodeTestRunner--net471-S109.json | 30 - ...Akka.MultiNodeTestRunner--net5.0-S109.json | 30 - ...ltiNodeTestRunner--netcoreapp3.1-S109.json | 30 - ...estRunner.Shared--netstandard2.0-S109.json | 13 - .../Akka.NodeTestRunner--net471-S109.json | 30 - .../Akka.NodeTestRunner--net5.0-S109.json | 30 - ...ka.NodeTestRunner--netcoreapp3.1-S109.json | 30 - ...Akka.Persistence--netstandard2.0-S109.json | 26 - ...tence.Sql.Common--netstandard2.0-S109.json | 39 - ...ence.Sql.TestKit--netstandard2.0-S109.json | 13 - ....Persistence.TCK--netstandard2.0-S109.json | 909 +----- ...sistence.TestKit--netstandard2.0-S109.json | 69 - .../Akka.Remote--netstandard2.0-S109.json | 117 - ...a.Remote.TestKit--netstandard2.0-S109.json | 52 - ...Tests.Performance--netcoreapp3.1-S109.json | 91 - .../Akka.Streams--netstandard2.0-S109.json | 143 - ...Tests.Performance--netcoreapp3.1-S109.json | 2464 ++--------------- .../Akka.TestKit--netstandard2.0-S109.json | 56 - ...Tests.Performance--netcoreapp3.1-S109.json | 1237 +-------- ...sterSharding.Node--netcoreapp3.1-S109.json | 39 - .../akka.net/PingPong--net471-S109.json | 26 - .../akka.net/PingPong--net5.0-S109.json | 26 - .../PingPong--netcoreapp3.1-S109.json | 26 - .../akka.net/RemotePingPong--net471-S109.json | 13 - .../akka.net/RemotePingPong--net5.0-S109.json | 13 - .../RemotePingPong--netcoreapp3.1-S109.json | 13 - ...ter.AdaptiveGroup--netcoreapp3.1-S109.json | 17 - ...r.Metrics.Common--netstandard2.0-S109.json | 26 - .../akka.net/SpawnBenchmark--net471-S109.json | 26 - .../akka.net/SpawnBenchmark--net5.0-S109.json | 26 - .../SpawnBenchmark--netcoreapp3.1-S109.json | 26 - 51 files changed, 368 insertions(+), 6928 deletions(-) delete mode 100644 analyzers/its/expected/Ember-MM/Ember.Plugins-{9496C697-5AFD-4813-AEDC-AF33FACEADF0}-S109.json delete mode 100644 analyzers/its/expected/Net5/recordsnullability-FFF05CEC-71BD-4BE5-AF0B-19715601DF35-net5.0-S109.json delete mode 100644 analyzers/its/expected/NetCore31/NetCore31--netcoreapp3.1-S109.json delete mode 100644 analyzers/its/expected/NetCore31WithConfigurableRules/NetCore31WithConfigurableRules--netcoreapp3.1-S109.json delete mode 100644 analyzers/its/expected/akka.net/Akka.Cluster.TestKit--netstandard2.0-S109.json delete mode 100644 analyzers/its/expected/akka.net/Akka.Cluster.Tests.Performance--netcoreapp3.1-S109.json delete mode 100644 analyzers/its/expected/akka.net/Akka.MultiNodeTestRunner--net471-S109.json delete mode 100644 analyzers/its/expected/akka.net/Akka.MultiNodeTestRunner--net5.0-S109.json delete mode 100644 analyzers/its/expected/akka.net/Akka.MultiNodeTestRunner--netcoreapp3.1-S109.json delete mode 100644 analyzers/its/expected/akka.net/Akka.NodeTestRunner--net471-S109.json delete mode 100644 analyzers/its/expected/akka.net/Akka.NodeTestRunner--net5.0-S109.json delete mode 100644 analyzers/its/expected/akka.net/Akka.NodeTestRunner--netcoreapp3.1-S109.json delete mode 100644 analyzers/its/expected/akka.net/Akka.Persistence.TestKit--netstandard2.0-S109.json delete mode 100644 analyzers/its/expected/akka.net/Akka.TestKit--netstandard2.0-S109.json delete mode 100644 analyzers/its/expected/akka.net/Samples.Cluster.AdaptiveGroup--netcoreapp3.1-S109.json diff --git a/analyzers/its/expected/Automapper/AutoMapper--net461-S109.json b/analyzers/its/expected/Automapper/AutoMapper--net461-S109.json index 7f9a6245c11..969f6b86647 100644 --- a/analyzers/its/expected/Automapper/AutoMapper--net461-S109.json +++ b/analyzers/its/expected/Automapper/AutoMapper--net461-S109.json @@ -15,32 +15,6 @@ }, { "id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Automapper\src\AutoMapper\Execution\TypeMapPlanBuilder.cs", -"region": { -"startLine": 42, -"startColumn": 51, -"endLine": 42, -"endColumn": 52 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Automapper\src\AutoMapper\Execution\TypeMapPlanBuilder.cs", -"region": { -"startLine": 43, -"startColumn": 53, -"endLine": 43, -"endColumn": 54 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\Automapper\src\AutoMapper\Execution\TypeMapPlanBuilder.cs", diff --git a/analyzers/its/expected/Automapper/AutoMapper--netstandard2.0-S109.json b/analyzers/its/expected/Automapper/AutoMapper--netstandard2.0-S109.json index 7f9a6245c11..969f6b86647 100644 --- a/analyzers/its/expected/Automapper/AutoMapper--netstandard2.0-S109.json +++ b/analyzers/its/expected/Automapper/AutoMapper--netstandard2.0-S109.json @@ -15,32 +15,6 @@ }, { "id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Automapper\src\AutoMapper\Execution\TypeMapPlanBuilder.cs", -"region": { -"startLine": 42, -"startColumn": 51, -"endLine": 42, -"endColumn": 52 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Automapper\src\AutoMapper\Execution\TypeMapPlanBuilder.cs", -"region": { -"startLine": 43, -"startColumn": 53, -"endLine": 43, -"endColumn": 54 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\Automapper\src\AutoMapper\Execution\TypeMapPlanBuilder.cs", diff --git a/analyzers/its/expected/Ember-MM/Ember.Plugins-{9496C697-5AFD-4813-AEDC-AF33FACEADF0}-S109.json b/analyzers/its/expected/Ember-MM/Ember.Plugins-{9496C697-5AFD-4813-AEDC-AF33FACEADF0}-S109.json deleted file mode 100644 index 4db28000d0c..00000000000 --- a/analyzers/its/expected/Ember-MM/Ember.Plugins-{9496C697-5AFD-4813-AEDC-AF33FACEADF0}-S109.json +++ /dev/null @@ -1,17 +0,0 @@ -{ -"issues": [ -{ -"id": "S109", -"message": "Assign this magic number '9' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Ember-MM\Ember.Plugins\Utility.cs", -"region": { -"startLine": 46, -"startColumn": 38, -"endLine": 46, -"endColumn": 39 -} -} -} -] -} diff --git a/analyzers/its/expected/Nancy/Nancy--net452-S109.json b/analyzers/its/expected/Nancy/Nancy--net452-S109.json index c2332d601e4..117a08dcfa6 100644 --- a/analyzers/its/expected/Nancy/Nancy--net452-S109.json +++ b/analyzers/its/expected/Nancy/Nancy--net452-S109.json @@ -15,19 +15,6 @@ }, { "id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\Conventions\DefaultAcceptHeaderCoercionConventions.cs", -"region": { -"startLine": 39, -"startColumn": 162, -"endLine": 39, -"endColumn": 163 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '32' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\Nancy\src\Nancy\Cryptography\AesEncryptionProvider.cs", @@ -80,19 +67,6 @@ }, { "id": "S109", -"message": "Assign this magic number '8' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\Cryptography\PassphraseKeyGenerator.cs", -"region": { -"startLine": 26, -"startColumn": 31, -"endLine": 26, -"endColumn": 32 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '32' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\Nancy\src\Nancy\Helpers\HttpEncoder.cs", @@ -745,19 +719,6 @@ "id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\Nancy\src\Nancy\HttpLinkRelation.cs", -"region": { -"startLine": 144, -"startColumn": 58, -"endLine": 144, -"endColumn": 59 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { "uri": "sources\Nancy\src\Nancy\HttpMultipart.cs", "region": { "startLine": 74, @@ -795,19 +756,6 @@ }, { "id": "S109", -"message": "Assign this magic number '8192' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\IO\RequestStream.cs", -"region": { -"startLine": 416, -"startColumn": 17, -"endLine": 416, -"endColumn": 21 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '8196' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\Nancy\src\Nancy\IO\RequestStream.cs", @@ -823,19 +771,6 @@ "id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\Nancy\src\Nancy\Owin\NancyMiddleware.cs", -"region": { -"startLine": 239, -"startColumn": 41, -"endLine": 239, -"endColumn": 42 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { "uri": "sources\Nancy\src\Nancy\Request.cs", "region": { "startLine": 186, @@ -847,123 +782,6 @@ }, { "id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\Response.cs", -"region": { -"startLine": 35, -"startColumn": 51, -"endLine": 35, -"endColumn": 52 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\Responses\Negotiation\MediaRange.cs", -"region": { -"startLine": 38, -"startColumn": 32, -"endLine": 38, -"endColumn": 33 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\Responses\Negotiation\MediaRange.cs", -"region": { -"startLine": 48, -"startColumn": 33, -"endLine": 48, -"endColumn": 34 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\Routing\Constraints\LengthRouteSegmentConstraint.cs", -"region": { -"startLine": 31, -"startColumn": 38, -"endLine": 31, -"endColumn": 39 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\Routing\Constraints\RangeRouteSegmentConstraint.cs", -"region": { -"startLine": 34, -"startColumn": 38, -"endLine": 34, -"endColumn": 39 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\Routing\Trie\Nodes\CaptureNodeWithDefaultValue.cs", -"region": { -"startLine": 74, -"startColumn": 36, -"endLine": 74, -"endColumn": 37 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\Routing\Trie\TrieNodeFactory.cs", -"region": { -"startLine": 48, -"startColumn": 89, -"endLine": 48, -"endColumn": 90 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\Security\Csrf.cs", -"region": { -"startLine": 212, -"startColumn": 40, -"endLine": 212, -"endColumn": 41 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\Session\CookieBasedSessions.cs", -"region": { -"startLine": 188, -"startColumn": 105, -"endLine": 188, -"endColumn": 106 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\Nancy\src\Nancy\StaticConfiguration.cs", @@ -1020,19 +838,6 @@ "location": { "uri": "sources\Nancy\src\Nancy\ViewEngines\ResourceViewLocationProvider.cs", "region": { -"startLine": 173, -"startColumn": 36, -"endLine": 173, -"endColumn": 37 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\ViewEngines\ResourceViewLocationProvider.cs", -"region": { "startLine": 175, "startColumn": 59, "endLine": 175, diff --git a/analyzers/its/expected/Nancy/Nancy--netstandard2.0-S109.json b/analyzers/its/expected/Nancy/Nancy--netstandard2.0-S109.json index c2332d601e4..117a08dcfa6 100644 --- a/analyzers/its/expected/Nancy/Nancy--netstandard2.0-S109.json +++ b/analyzers/its/expected/Nancy/Nancy--netstandard2.0-S109.json @@ -15,19 +15,6 @@ }, { "id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\Conventions\DefaultAcceptHeaderCoercionConventions.cs", -"region": { -"startLine": 39, -"startColumn": 162, -"endLine": 39, -"endColumn": 163 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '32' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\Nancy\src\Nancy\Cryptography\AesEncryptionProvider.cs", @@ -80,19 +67,6 @@ }, { "id": "S109", -"message": "Assign this magic number '8' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\Cryptography\PassphraseKeyGenerator.cs", -"region": { -"startLine": 26, -"startColumn": 31, -"endLine": 26, -"endColumn": 32 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '32' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\Nancy\src\Nancy\Helpers\HttpEncoder.cs", @@ -745,19 +719,6 @@ "id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\Nancy\src\Nancy\HttpLinkRelation.cs", -"region": { -"startLine": 144, -"startColumn": 58, -"endLine": 144, -"endColumn": 59 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { "uri": "sources\Nancy\src\Nancy\HttpMultipart.cs", "region": { "startLine": 74, @@ -795,19 +756,6 @@ }, { "id": "S109", -"message": "Assign this magic number '8192' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\IO\RequestStream.cs", -"region": { -"startLine": 416, -"startColumn": 17, -"endLine": 416, -"endColumn": 21 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '8196' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\Nancy\src\Nancy\IO\RequestStream.cs", @@ -823,19 +771,6 @@ "id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\Nancy\src\Nancy\Owin\NancyMiddleware.cs", -"region": { -"startLine": 239, -"startColumn": 41, -"endLine": 239, -"endColumn": 42 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { "uri": "sources\Nancy\src\Nancy\Request.cs", "region": { "startLine": 186, @@ -847,123 +782,6 @@ }, { "id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\Response.cs", -"region": { -"startLine": 35, -"startColumn": 51, -"endLine": 35, -"endColumn": 52 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\Responses\Negotiation\MediaRange.cs", -"region": { -"startLine": 38, -"startColumn": 32, -"endLine": 38, -"endColumn": 33 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\Responses\Negotiation\MediaRange.cs", -"region": { -"startLine": 48, -"startColumn": 33, -"endLine": 48, -"endColumn": 34 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\Routing\Constraints\LengthRouteSegmentConstraint.cs", -"region": { -"startLine": 31, -"startColumn": 38, -"endLine": 31, -"endColumn": 39 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\Routing\Constraints\RangeRouteSegmentConstraint.cs", -"region": { -"startLine": 34, -"startColumn": 38, -"endLine": 34, -"endColumn": 39 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\Routing\Trie\Nodes\CaptureNodeWithDefaultValue.cs", -"region": { -"startLine": 74, -"startColumn": 36, -"endLine": 74, -"endColumn": 37 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\Routing\Trie\TrieNodeFactory.cs", -"region": { -"startLine": 48, -"startColumn": 89, -"endLine": 48, -"endColumn": 90 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\Security\Csrf.cs", -"region": { -"startLine": 212, -"startColumn": 40, -"endLine": 212, -"endColumn": 41 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\Session\CookieBasedSessions.cs", -"region": { -"startLine": 188, -"startColumn": 105, -"endLine": 188, -"endColumn": 106 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\Nancy\src\Nancy\StaticConfiguration.cs", @@ -1020,19 +838,6 @@ "location": { "uri": "sources\Nancy\src\Nancy\ViewEngines\ResourceViewLocationProvider.cs", "region": { -"startLine": 173, -"startColumn": 36, -"endLine": 173, -"endColumn": 37 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy\ViewEngines\ResourceViewLocationProvider.cs", -"region": { "startLine": 175, "startColumn": 59, "endLine": 175, diff --git a/analyzers/its/expected/Nancy/Nancy.Authentication.Basic--net452-S109.json b/analyzers/its/expected/Nancy/Nancy.Authentication.Basic--net452-S109.json index 18f561a3d6b..9c9f75f7467 100644 --- a/analyzers/its/expected/Nancy/Nancy.Authentication.Basic--net452-S109.json +++ b/analyzers/its/expected/Nancy/Nancy.Authentication.Basic--net452-S109.json @@ -6,19 +6,6 @@ "location": { "uri": "sources\Nancy\src\Nancy.Authentication.Basic\BasicAuthentication.cs", "region": { -"startLine": 96, -"startColumn": 62, -"endLine": 96, -"endColumn": 63 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy.Authentication.Basic\BasicAuthentication.cs", -"region": { "startLine": 127, "startColumn": 97, "endLine": 127, diff --git a/analyzers/its/expected/Nancy/Nancy.Authentication.Basic--netstandard2.0-S109.json b/analyzers/its/expected/Nancy/Nancy.Authentication.Basic--netstandard2.0-S109.json index 18f561a3d6b..9c9f75f7467 100644 --- a/analyzers/its/expected/Nancy/Nancy.Authentication.Basic--netstandard2.0-S109.json +++ b/analyzers/its/expected/Nancy/Nancy.Authentication.Basic--netstandard2.0-S109.json @@ -6,19 +6,6 @@ "location": { "uri": "sources\Nancy\src\Nancy.Authentication.Basic\BasicAuthentication.cs", "region": { -"startLine": 96, -"startColumn": 62, -"endLine": 96, -"endColumn": 63 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Nancy\src\Nancy.Authentication.Basic\BasicAuthentication.cs", -"region": { "startLine": 127, "startColumn": 97, "endLine": 127, diff --git a/analyzers/its/expected/Net5/recordsnullability-FFF05CEC-71BD-4BE5-AF0B-19715601DF35-net5.0-S109.json b/analyzers/its/expected/Net5/recordsnullability-FFF05CEC-71BD-4BE5-AF0B-19715601DF35-net5.0-S109.json deleted file mode 100644 index 193f4ef968a..00000000000 --- a/analyzers/its/expected/Net5/recordsnullability-FFF05CEC-71BD-4BE5-AF0B-19715601DF35-net5.0-S109.json +++ /dev/null @@ -1,30 +0,0 @@ -{ -"issues": [ -{ -"id": "S109", -"message": "Assign this magic number '2013' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Net5\Net5Samples\RecordsAndNullability\Program.cs", -"region": { -"startLine": 15, -"startColumn": 53, -"endLine": 15, -"endColumn": 57 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2015' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Net5\Net5Samples\RecordsAndNullability\Program.cs", -"region": { -"startLine": 16, -"startColumn": 37, -"endLine": 16, -"endColumn": 41 -} -} -} -] -} diff --git a/analyzers/its/expected/Net5/variouspatternsofpatterns-3EFB6389-ED5B-4E14-809C-B43AF38748D9-net5.0-S109.json b/analyzers/its/expected/Net5/variouspatternsofpatterns-3EFB6389-ED5B-4E14-809C-B43AF38748D9-net5.0-S109.json index f90e458762d..c3927dba9bd 100644 --- a/analyzers/its/expected/Net5/variouspatternsofpatterns-3EFB6389-ED5B-4E14-809C-B43AF38748D9-net5.0-S109.json +++ b/analyzers/its/expected/Net5/variouspatternsofpatterns-3EFB6389-ED5B-4E14-809C-B43AF38748D9-net5.0-S109.json @@ -15,45 +15,6 @@ }, { "id": "S109", -"message": "Assign this magic number '99' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Net5\Net5Samples\VariousPatternsOfPatterns\Program.cs", -"region": { -"startLine": 23, -"startColumn": 68, -"endLine": 23, -"endColumn": 70 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '50' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Net5\Net5Samples\VariousPatternsOfPatterns\Program.cs", -"region": { -"startLine": 24, -"startColumn": 63, -"endLine": 24, -"endColumn": 65 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\Net5\Net5Samples\VariousPatternsOfPatterns\Program.cs", -"region": { -"startLine": 25, -"startColumn": 68, -"endLine": 25, -"endColumn": 71 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\Net5\Net5Samples\VariousPatternsOfPatterns\Program.cs", diff --git a/analyzers/its/expected/NetCore31/NetCore31--netcoreapp3.1-S109.json b/analyzers/its/expected/NetCore31/NetCore31--netcoreapp3.1-S109.json deleted file mode 100644 index d79a2630ec3..00000000000 --- a/analyzers/its/expected/NetCore31/NetCore31--netcoreapp3.1-S109.json +++ /dev/null @@ -1,82 +0,0 @@ -{ -"issues": [ -{ -"id": "S109", -"message": "Assign this magic number '10000000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\NetCore31\Controllers\S5693Controller.cs", -"region": { -"startLine": 15, -"startColumn": 27, -"endLine": 15, -"endColumn": 37 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1623' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\NetCore31\Controllers\S5693Controller.cs", -"region": { -"startLine": 22, -"startColumn": 27, -"endLine": 22, -"endColumn": 31 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '8000001' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\NetCore31\Controllers\S5693Controller.cs", -"region": { -"startLine": 29, -"startColumn": 55, -"endLine": 29, -"endColumn": 64 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '42' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\NetCore31\Controllers\S5693Controller.cs", -"region": { -"startLine": 29, -"startColumn": 96, -"endLine": 29, -"endColumn": 98 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '55' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\NetCore31\Controllers\S5693Controller.cs", -"region": { -"startLine": 36, -"startColumn": 58, -"endLine": 36, -"endColumn": 60 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '42' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\NetCore31\Controllers\S5693Controller.cs", -"region": { -"startLine": 49, -"startColumn": 55, -"endLine": 49, -"endColumn": 57 -} -} -} -] -} diff --git a/analyzers/its/expected/NetCore31WithConfigurableRules/NetCore31WithConfigurableRules--netcoreapp3.1-S109.json b/analyzers/its/expected/NetCore31WithConfigurableRules/NetCore31WithConfigurableRules--netcoreapp3.1-S109.json deleted file mode 100644 index 7e1c9c3d90d..00000000000 --- a/analyzers/its/expected/NetCore31WithConfigurableRules/NetCore31WithConfigurableRules--netcoreapp3.1-S109.json +++ /dev/null @@ -1,56 +0,0 @@ -{ -"issues": [ -{ -"id": "S109", -"message": "Assign this magic number '43' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\NetCore31WithConfigurableRules\Controllers\MyController.cs", -"region": { -"startLine": 13, -"startColumn": 27, -"endLine": 13, -"endColumn": 29 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '41' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\NetCore31WithConfigurableRules\Controllers\MyController.cs", -"region": { -"startLine": 18, -"startColumn": 27, -"endLine": 18, -"endColumn": 29 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '43' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\NetCore31WithConfigurableRules\Controllers\MyController.cs", -"region": { -"startLine": 23, -"startColumn": 55, -"endLine": 23, -"endColumn": 57 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '41' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\NetCore31WithConfigurableRules\Controllers\MyController.cs", -"region": { -"startLine": 28, -"startColumn": 55, -"endLine": 28, -"endColumn": 57 -} -} -} -] -} diff --git a/analyzers/its/expected/akka.net/Akka--netstandard2.0-S109.json b/analyzers/its/expected/akka.net/Akka--netstandard2.0-S109.json index 8e4ec13de08..3f7f1f8b9fd 100644 --- a/analyzers/its/expected/akka.net/Akka--netstandard2.0-S109.json +++ b/analyzers/its/expected/akka.net/Akka--netstandard2.0-S109.json @@ -54,19 +54,6 @@ }, { "id": "S109", -"message": "Assign this magic number '1970' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka\Actor\ActorSystem.cs", -"region": { -"startLine": 216, -"startColumn": 77, -"endLine": 216, -"endColumn": 81 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka\Actor\Address.cs", @@ -106,19 +93,6 @@ }, { "id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka\Actor\Deployer.cs", -"region": { -"startLine": 61, -"startColumn": 65, -"endLine": 61, -"endColumn": 66 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka\Actor\Scheduler\HashedWheelTimerScheduler.cs", @@ -808,58 +782,6 @@ }, { "id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka\Helios.Concurrency.DedicatedThreadPool.cs", -"region": { -"startLine": 544, -"startColumn": 30, -"endLine": 544, -"endColumn": 31 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '4' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka\Helios.Concurrency.DedicatedThreadPool.cs", -"region": { -"startLine": 548, -"startColumn": 30, -"endLine": 548, -"endColumn": 31 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '6' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka\Helios.Concurrency.DedicatedThreadPool.cs", -"region": { -"startLine": 552, -"startColumn": 30, -"endLine": 552, -"endColumn": 31 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '64' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka\Helios.Concurrency.DedicatedThreadPool.cs", -"region": { -"startLine": 559, -"startColumn": 55, -"endLine": 559, -"endColumn": 57 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '256' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka\IO\Buffers\DirectBufferPool.cs", @@ -964,19 +886,6 @@ }, { "id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka\IO\TcpSettings.cs", -"region": { -"startLine": 48, -"startColumn": 94, -"endLine": 48, -"endColumn": 95 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '512' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka\IO\TcpSettings.cs", @@ -1029,45 +938,6 @@ }, { "id": "S109", -"message": "Assign this magic number '36500' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka\Pattern\CircuitBreaker.cs", -"region": { -"startLine": 160, -"startColumn": 89, -"endLine": 160, -"endColumn": 94 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka\Pattern\CircuitBreaker.cs", -"region": { -"startLine": 342, -"startColumn": 107, -"endLine": 342, -"endColumn": 110 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka\Routing\RoutedActorCell.cs", -"region": { -"startLine": 143, -"startColumn": 81, -"endLine": 143, -"endColumn": 84 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka\Util\AppVersion.cs", @@ -1098,19 +968,6 @@ "location": { "uri": "sources\akka.net\src\core\Akka\Util\AppVersion.cs", "region": { -"startLine": 178, -"startColumn": 45, -"endLine": 178, -"endColumn": 46 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka\Util\AppVersion.cs", -"region": { "startLine": 184, "startColumn": 26, "endLine": 184, @@ -1133,19 +990,6 @@ }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka\Util\AppVersion.cs", -"region": { -"startLine": 188, -"startColumn": 45, -"endLine": 188, -"endColumn": 46 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka\Util\AppVersion.cs", @@ -1380,19 +1224,6 @@ }, { "id": "S109", -"message": "Assign this magic number '1970' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka\Util\Extensions\DateTimeExtensions.cs", -"region": { -"startLine": 22, -"startColumn": 51, -"endLine": 22, -"endColumn": 55 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka\Util\Internal\Extensions.cs", @@ -2758,19 +2589,6 @@ }, { "id": "S109", -"message": "Assign this magic number '8' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka\Util\MurmurHash.cs", -"region": { -"startLine": 270, -"startColumn": 31, -"endLine": 270, -"endColumn": 32 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka\Util\TokenBucket.cs", diff --git a/analyzers/its/expected/akka.net/Akka.Benchmarks--netcoreapp3.1-S109.json b/analyzers/its/expected/akka.net/Akka.Benchmarks--netcoreapp3.1-S109.json index 62e8a9427b4..3fda3483e67 100644 --- a/analyzers/its/expected/akka.net/Akka.Benchmarks--netcoreapp3.1-S109.json +++ b/analyzers/its/expected/akka.net/Akka.Benchmarks--netcoreapp3.1-S109.json @@ -2,162 +2,6 @@ "issues": [ { "id": "S109", -"message": "Assign this magic number '1337' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\Actor\ActorPathBenchmarks.cs", -"region": { -"startLine": 23, -"startColumn": 82, -"endLine": 23, -"endColumn": 86 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1337' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\Actor\ActorPathBenchmarks.cs", -"region": { -"startLine": 24, -"startColumn": 82, -"endLine": 24, -"endColumn": 86 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\Actor\ActorSelectionBenchmark.cs", -"region": { -"startLine": 16, -"startColumn": 17, -"endLine": 16, -"endColumn": 22 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '4000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\Actor\AddressBenchmarks.cs", -"region": { -"startLine": 23, -"startColumn": 71, -"endLine": 23, -"endColumn": 75 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '4123' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\Actor\AddressBenchmarks.cs", -"region": { -"startLine": 24, -"startColumn": 71, -"endLine": 24, -"endColumn": 75 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\Actor\PingPongBenchmarks.cs", -"region": { -"startLine": 19, -"startColumn": 53, -"endLine": 19, -"endColumn": 54 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\Actor\PingPongBenchmarks.cs", -"region": { -"startLine": 19, -"startColumn": 69, -"endLine": 19, -"endColumn": 70 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\Actor\PingPongBenchmarks.cs", -"region": { -"startLine": 19, -"startColumn": 85, -"endLine": 19, -"endColumn": 86 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\Actor\SpawnActorBenchmarks.cs", -"region": { -"startLine": 18, -"startColumn": 52, -"endLine": 18, -"endColumn": 54 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\Actor\SpawnActorBenchmarks.cs", -"region": { -"startLine": 18, -"startColumn": 68, -"endLine": 18, -"endColumn": 69 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\Actor\SpawnActorBenchmarks.cs", -"region": { -"startLine": 21, -"startColumn": 17, -"endLine": 21, -"endColumn": 24 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\Actor\SpawnActorBenchmarks.cs", -"region": { -"startLine": 41, -"startColumn": 88, -"endLine": 41, -"endColumn": 89 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\Cluster\HeartbeatNodeRingBenchmarks.cs", @@ -199,58 +43,6 @@ "id": "S109", "message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\Cluster\HeartbeatNodeRingBenchmarks.cs", -"region": { -"startLine": 27, -"startColumn": 122, -"endLine": 27, -"endColumn": 123 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\Cluster\HeartbeatNodeRingBenchmarks.cs", -"region": { -"startLine": 45, -"startColumn": 20, -"endLine": 45, -"endColumn": 24 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\Cluster\ReachabilityBenchmarks.cs", -"region": { -"startLine": 17, -"startColumn": 17, -"endLine": 17, -"endColumn": 20 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\Cluster\ReachabilityBenchmarks.cs", -"region": { -"startLine": 20, -"startColumn": 17, -"endLine": 20, -"endColumn": 20 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { "uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\Cluster\ReachabilityBenchmarks.cs", "region": { "startLine": 44, @@ -327,32 +119,6 @@ }, { "id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\Cluster\VectorClockBenchmarks.cs", -"region": { -"startLine": 17, -"startColumn": 17, -"endLine": 17, -"endColumn": 20 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\Cluster\VectorClockBenchmarks.cs", -"region": { -"startLine": 20, -"startColumn": 17, -"endLine": 20, -"endColumn": 21 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\Cluster\VectorClockBenchmarks.cs", @@ -422,19 +188,6 @@ "location": { "uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\IO\ByteStringBenchmarks.cs", "region": { -"startLine": 63, -"startColumn": 20, -"endLine": 63, -"endColumn": 22 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\IO\ByteStringBenchmarks.cs", -"region": { "startLine": 78, "startColumn": 37, "endLine": 78, @@ -461,19 +214,6 @@ "location": { "uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\IO\TcpOperationsBenchmarks.cs", "region": { -"startLine": 26, -"startColumn": 118, -"endLine": 26, -"endColumn": 121 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\IO\TcpOperationsBenchmarks.cs", -"region": { "startLine": 34, "startColumn": 17, "endLine": 34, @@ -626,19 +366,6 @@ }, { "id": "S109", -"message": "Assign this magic number '123' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\Serialization\SerializationBenchmarks.cs", -"region": { -"startLine": 31, -"startColumn": 35, -"endLine": 31, -"endColumn": 38 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\Utils\ConsistentHashBenchmarks.cs", @@ -1117,19 +844,6 @@ "endColumn": 75 } } -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\Akka.Benchmarks\Utils\FastLazyBenchmarks.cs", -"region": { -"startLine": 31, -"startColumn": 77, -"endLine": 31, -"endColumn": 81 -} -} } ] } diff --git a/analyzers/its/expected/akka.net/Akka.Cluster--netstandard2.0-S109.json b/analyzers/its/expected/akka.net/Akka.Cluster--netstandard2.0-S109.json index 60658056371..59078640f95 100644 --- a/analyzers/its/expected/akka.net/Akka.Cluster--netstandard2.0-S109.json +++ b/analyzers/its/expected/akka.net/Akka.Cluster--netstandard2.0-S109.json @@ -80,45 +80,6 @@ }, { "id": "S109", -"message": "Assign this magic number '7' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Cluster\ClusterSettings.cs", -"region": { -"startLine": 110, -"startColumn": 53, -"endLine": 110, -"endColumn": 54 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Cluster\Member.cs", -"region": { -"startLine": 318, -"startColumn": 34, -"endLine": 318, -"endColumn": 35 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Cluster\Member.cs", -"region": { -"startLine": 369, -"startColumn": 34, -"endLine": 369, -"endColumn": 35 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Cluster\SBR\DowningStrategy.cs", @@ -197,19 +158,6 @@ }, { "id": "S109", -"message": "Assign this magic number '4' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Cluster\SBR\SplitBrainResolverSettings.cs", -"region": { -"startLine": 55, -"startColumn": 50, -"endLine": 55, -"endColumn": 51 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Cluster\SBR\SplitBrainResolverSettings.cs", diff --git a/analyzers/its/expected/akka.net/Akka.Cluster.Sharding--netstandard2.0-S109.json b/analyzers/its/expected/akka.net/Akka.Cluster.Sharding--netstandard2.0-S109.json index fe4e053a98e..df2e1f58339 100644 --- a/analyzers/its/expected/akka.net/Akka.Cluster.Sharding--netstandard2.0-S109.json +++ b/analyzers/its/expected/akka.net/Akka.Cluster.Sharding--netstandard2.0-S109.json @@ -2,19 +2,6 @@ "issues": [ { "id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\cluster\Akka.Cluster.Sharding\DDataShard.cs", -"region": { -"startLine": 59, -"startColumn": 76, -"endLine": 59, -"endColumn": 77 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '50' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\contrib\cluster\Akka.Cluster.Sharding\Internal\AbstractLeastShardAllocationStrategy.cs", @@ -28,58 +15,6 @@ }, { "id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\cluster\Akka.Cluster.Sharding\PersistentShard.cs", -"region": { -"startLine": 56, -"startColumn": 76, -"endLine": 56, -"endColumn": 77 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\cluster\Akka.Cluster.Sharding\Shard.cs", -"region": { -"startLine": 431, -"startColumn": 76, -"endLine": 431, -"endColumn": 77 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '500' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\cluster\Akka.Cluster.Sharding\ShardCoordinator.cs", -"region": { -"startLine": 184, -"startColumn": 93, -"endLine": 184, -"endColumn": 96 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\cluster\Akka.Cluster.Sharding\ShardRegion.cs", -"region": { -"startLine": 446, -"startColumn": 64, -"endLine": 446, -"endColumn": 67 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\contrib\cluster\Akka.Cluster.Sharding\ShardRegion.cs", diff --git a/analyzers/its/expected/akka.net/Akka.Cluster.TestKit--netstandard2.0-S109.json b/analyzers/its/expected/akka.net/Akka.Cluster.TestKit--netstandard2.0-S109.json deleted file mode 100644 index d01925c1bc6..00000000000 --- a/analyzers/its/expected/akka.net/Akka.Cluster.TestKit--netstandard2.0-S109.json +++ /dev/null @@ -1,17 +0,0 @@ -{ -"issues": [ -{ -"id": "S109", -"message": "Assign this magic number '25' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Cluster.TestKit\MultiNodeClusterSpec.cs", -"region": { -"startLine": 358, -"startColumn": 65, -"endLine": 358, -"endColumn": 67 -} -} -} -] -} diff --git a/analyzers/its/expected/akka.net/Akka.Cluster.Tests.Performance--netcoreapp3.1-S109.json b/analyzers/its/expected/akka.net/Akka.Cluster.Tests.Performance--netcoreapp3.1-S109.json deleted file mode 100644 index 0d6ba302455..00000000000 --- a/analyzers/its/expected/akka.net/Akka.Cluster.Tests.Performance--netcoreapp3.1-S109.json +++ /dev/null @@ -1,95 +0,0 @@ -{ -"issues": [ -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Cluster.Tests.Performance\Serialization\ClusterMessageSerializerSpec.cs", -"region": { -"startLine": 63, -"startColumn": 154, -"endLine": 63, -"endColumn": 155 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Cluster.Tests.Performance\Serialization\ClusterMessageSerializerSpec.cs", -"region": { -"startLine": 63, -"startColumn": 212, -"endLine": 63, -"endColumn": 216 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Cluster.Tests.Performance\Serialization\ClusterMessageSerializerSpec.cs", -"region": { -"startLine": 77, -"startColumn": 152, -"endLine": 77, -"endColumn": 153 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Cluster.Tests.Performance\Serialization\ClusterMessageSerializerSpec.cs", -"region": { -"startLine": 77, -"startColumn": 210, -"endLine": 77, -"endColumn": 214 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Cluster.Tests.Performance\Serialization\ClusterMessageSerializerSpec.cs", -"region": { -"startLine": 94, -"startColumn": 59, -"endLine": 94, -"endColumn": 60 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Cluster.Tests.Performance\Startup\ClusterStartupSpec.cs", -"region": { -"startLine": 43, -"startColumn": 122, -"endLine": 43, -"endColumn": 123 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Cluster.Tests.Performance\Startup\ClusterStartupSpec.cs", -"region": { -"startLine": 67, -"startColumn": 56, -"endLine": 67, -"endColumn": 57 -} -} -} -] -} diff --git a/analyzers/its/expected/akka.net/Akka.Cluster.Tools--netstandard2.0-S109.json b/analyzers/its/expected/akka.net/Akka.Cluster.Tools--netstandard2.0-S109.json index b4f4684848c..1aabebd42e5 100644 --- a/analyzers/its/expected/akka.net/Akka.Cluster.Tools--netstandard2.0-S109.json +++ b/analyzers/its/expected/akka.net/Akka.Cluster.Tools--netstandard2.0-S109.json @@ -30,19 +30,6 @@ "id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\contrib\cluster\Akka.Cluster.Tools\Client\ClusterReceptionist.cs", -"region": { -"startLine": 630, -"startColumn": 42, -"endLine": 630, -"endColumn": 43 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { "uri": "sources\akka.net\src\contrib\cluster\Akka.Cluster.Tools\PublishSubscribe\DistributedPubSubMediator.cs", "region": { "startLine": 162, @@ -90,45 +77,6 @@ "endColumn": 70 } } -}, -{ -"id": "S109", -"message": "Assign this magic number '15' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\cluster\Akka.Cluster.Tools\Singleton\ClusterSingletonManager.cs", -"region": { -"startLine": 744, -"startColumn": 87, -"endLine": 744, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '15' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\cluster\Akka.Cluster.Tools\Singleton\ClusterSingletonManager.cs", -"region": { -"startLine": 748, -"startColumn": 83, -"endLine": 748, -"endColumn": 87 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\cluster\Akka.Cluster.Tools\Singleton\ClusterSingletonManager.cs", -"region": { -"startLine": 1247, -"startColumn": 74, -"endLine": 1247, -"endColumn": 75 -} -} } ] } diff --git a/analyzers/its/expected/akka.net/Akka.DI.TestKit--netstandard2.0-S109.json b/analyzers/its/expected/akka.net/Akka.DI.TestKit--netstandard2.0-S109.json index a48f7abf550..2315a7a069f 100644 --- a/analyzers/its/expected/akka.net/Akka.DI.TestKit--netstandard2.0-S109.json +++ b/analyzers/its/expected/akka.net/Akka.DI.TestKit--netstandard2.0-S109.json @@ -51,58 +51,6 @@ "endColumn": 27 } } -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\dependencyinjection\Akka.DI.TestKit\DiResolverSpec.cs", -"region": { -"startLine": 377, -"startColumn": 119, -"endLine": 377, -"endColumn": 120 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '50' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\dependencyinjection\Akka.DI.TestKit\DiResolverSpec.cs", -"region": { -"startLine": 377, -"startColumn": 149, -"endLine": 377, -"endColumn": 151 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\dependencyinjection\Akka.DI.TestKit\DiResolverSpec.cs", -"region": { -"startLine": 388, -"startColumn": 119, -"endLine": 388, -"endColumn": 120 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '50' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\dependencyinjection\Akka.DI.TestKit\DiResolverSpec.cs", -"region": { -"startLine": 388, -"startColumn": 149, -"endLine": 388, -"endColumn": 151 -} -} } ] } diff --git a/analyzers/its/expected/akka.net/Akka.DistributedData--netstandard2.0-S109.json b/analyzers/its/expected/akka.net/Akka.DistributedData--netstandard2.0-S109.json index 006a3de8906..92cfc9b9f78 100644 --- a/analyzers/its/expected/akka.net/Akka.DistributedData--netstandard2.0-S109.json +++ b/analyzers/its/expected/akka.net/Akka.DistributedData--netstandard2.0-S109.json @@ -93,32 +93,6 @@ }, { "id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\cluster\Akka.DistributedData\ReplicatorSettings.cs", -"region": { -"startLine": 70, -"startColumn": 92, -"endLine": 70, -"endColumn": 93 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '500' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\cluster\Akka.DistributedData\ReplicatorSettings.cs", -"region": { -"startLine": 71, -"startColumn": 120, -"endLine": 71, -"endColumn": 123 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '500' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\contrib\cluster\Akka.DistributedData\ReplicatorSettings.cs", @@ -132,58 +106,6 @@ }, { "id": "S109", -"message": "Assign this magic number '120' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\cluster\Akka.DistributedData\ReplicatorSettings.cs", -"region": { -"startLine": 74, -"startColumn": 94, -"endLine": 74, -"endColumn": 97 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '300' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\cluster\Akka.DistributedData\ReplicatorSettings.cs", -"region": { -"startLine": 75, -"startColumn": 111, -"endLine": 75, -"endColumn": 114 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '6' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\cluster\Akka.DistributedData\ReplicatorSettings.cs", -"region": { -"startLine": 78, -"startColumn": 111, -"endLine": 78, -"endColumn": 112 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\cluster\Akka.DistributedData\ReplicatorSettings.cs", -"region": { -"startLine": 79, -"startColumn": 124, -"endLine": 79, -"endColumn": 126 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '50' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\contrib\cluster\Akka.DistributedData\ReplicatorSettings.cs", @@ -210,32 +132,6 @@ }, { "id": "S109", -"message": "Assign this magic number '4' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\cluster\Akka.DistributedData\Serialization\ReplicatorMessageSerializer.cs", -"region": { -"startLine": 161, -"startColumn": 55, -"endLine": 161, -"endColumn": 56 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '4' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\cluster\Akka.DistributedData\Serialization\ReplicatorMessageSerializer.cs", -"region": { -"startLine": 162, -"startColumn": 57, -"endLine": 162, -"endColumn": 58 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\contrib\cluster\Akka.DistributedData\Serialization\ReplicatorMessageSerializer.cs", @@ -259,19 +155,6 @@ "endColumn": 45 } } -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\cluster\Akka.DistributedData\WriteAggregator.cs", -"region": { -"startLine": 196, -"startColumn": 25, -"endLine": 196, -"endColumn": 26 -} -} } ] } diff --git a/analyzers/its/expected/akka.net/Akka.MultiNodeTestRunner--net471-S109.json b/analyzers/its/expected/akka.net/Akka.MultiNodeTestRunner--net471-S109.json deleted file mode 100644 index e8d651c4289..00000000000 --- a/analyzers/its/expected/akka.net/Akka.MultiNodeTestRunner--net471-S109.json +++ /dev/null @@ -1,30 +0,0 @@ -{ -"issues": [ -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.MultiNodeTestRunner\Program.cs", -"region": { -"startLine": 410, -"startColumn": 63, -"endLine": 410, -"endColumn": 64 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.MultiNodeTestRunner\Program.cs", -"region": { -"startLine": 435, -"startColumn": 59, -"endLine": 435, -"endColumn": 60 -} -} -} -] -} diff --git a/analyzers/its/expected/akka.net/Akka.MultiNodeTestRunner--net5.0-S109.json b/analyzers/its/expected/akka.net/Akka.MultiNodeTestRunner--net5.0-S109.json deleted file mode 100644 index e8d651c4289..00000000000 --- a/analyzers/its/expected/akka.net/Akka.MultiNodeTestRunner--net5.0-S109.json +++ /dev/null @@ -1,30 +0,0 @@ -{ -"issues": [ -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.MultiNodeTestRunner\Program.cs", -"region": { -"startLine": 410, -"startColumn": 63, -"endLine": 410, -"endColumn": 64 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.MultiNodeTestRunner\Program.cs", -"region": { -"startLine": 435, -"startColumn": 59, -"endLine": 435, -"endColumn": 60 -} -} -} -] -} diff --git a/analyzers/its/expected/akka.net/Akka.MultiNodeTestRunner--netcoreapp3.1-S109.json b/analyzers/its/expected/akka.net/Akka.MultiNodeTestRunner--netcoreapp3.1-S109.json deleted file mode 100644 index e8d651c4289..00000000000 --- a/analyzers/its/expected/akka.net/Akka.MultiNodeTestRunner--netcoreapp3.1-S109.json +++ /dev/null @@ -1,30 +0,0 @@ -{ -"issues": [ -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.MultiNodeTestRunner\Program.cs", -"region": { -"startLine": 410, -"startColumn": 63, -"endLine": 410, -"endColumn": 64 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.MultiNodeTestRunner\Program.cs", -"region": { -"startLine": 435, -"startColumn": 59, -"endLine": 435, -"endColumn": 60 -} -} -} -] -} diff --git a/analyzers/its/expected/akka.net/Akka.MultiNodeTestRunner.Shared--netstandard2.0-S109.json b/analyzers/its/expected/akka.net/Akka.MultiNodeTestRunner.Shared--netstandard2.0-S109.json index 574c8366205..d1baa087e35 100644 --- a/analyzers/its/expected/akka.net/Akka.MultiNodeTestRunner.Shared--netstandard2.0-S109.json +++ b/analyzers/its/expected/akka.net/Akka.MultiNodeTestRunner.Shared--netstandard2.0-S109.json @@ -12,19 +12,6 @@ "endColumn": 65 } } -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.MultiNodeTestRunner.Shared\Sinks\MessageSink.cs", -"region": { -"startLine": 67, -"startColumn": 91, -"endLine": 67, -"endColumn": 92 -} -} } ] } diff --git a/analyzers/its/expected/akka.net/Akka.NodeTestRunner--net471-S109.json b/analyzers/its/expected/akka.net/Akka.NodeTestRunner--net471-S109.json deleted file mode 100644 index 9adaf12e5b4..00000000000 --- a/analyzers/its/expected/akka.net/Akka.NodeTestRunner--net471-S109.json +++ /dev/null @@ -1,30 +0,0 @@ -{ -"issues": [ -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.NodeTestRunner\Program.cs", -"region": { -"startLine": 66, -"startColumn": 47, -"endLine": 66, -"endColumn": 49 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.NodeTestRunner\Program.cs", -"region": { -"startLine": 153, -"startColumn": 59, -"endLine": 153, -"endColumn": 60 -} -} -} -] -} diff --git a/analyzers/its/expected/akka.net/Akka.NodeTestRunner--net5.0-S109.json b/analyzers/its/expected/akka.net/Akka.NodeTestRunner--net5.0-S109.json deleted file mode 100644 index 9adaf12e5b4..00000000000 --- a/analyzers/its/expected/akka.net/Akka.NodeTestRunner--net5.0-S109.json +++ /dev/null @@ -1,30 +0,0 @@ -{ -"issues": [ -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.NodeTestRunner\Program.cs", -"region": { -"startLine": 66, -"startColumn": 47, -"endLine": 66, -"endColumn": 49 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.NodeTestRunner\Program.cs", -"region": { -"startLine": 153, -"startColumn": 59, -"endLine": 153, -"endColumn": 60 -} -} -} -] -} diff --git a/analyzers/its/expected/akka.net/Akka.NodeTestRunner--netcoreapp3.1-S109.json b/analyzers/its/expected/akka.net/Akka.NodeTestRunner--netcoreapp3.1-S109.json deleted file mode 100644 index 9adaf12e5b4..00000000000 --- a/analyzers/its/expected/akka.net/Akka.NodeTestRunner--netcoreapp3.1-S109.json +++ /dev/null @@ -1,30 +0,0 @@ -{ -"issues": [ -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.NodeTestRunner\Program.cs", -"region": { -"startLine": 66, -"startColumn": 47, -"endLine": 66, -"endColumn": 49 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.NodeTestRunner\Program.cs", -"region": { -"startLine": 153, -"startColumn": 59, -"endLine": 153, -"endColumn": 60 -} -} -} -] -} diff --git a/analyzers/its/expected/akka.net/Akka.Persistence--netstandard2.0-S109.json b/analyzers/its/expected/akka.net/Akka.Persistence--netstandard2.0-S109.json index 99e49da13f3..9431b26a6b5 100644 --- a/analyzers/its/expected/akka.net/Akka.Persistence--netstandard2.0-S109.json +++ b/analyzers/its/expected/akka.net/Akka.Persistence--netstandard2.0-S109.json @@ -12,32 +12,6 @@ "endColumn": 65 } } -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence\Snapshot\SnapshotStore.cs", -"region": { -"startLine": 43, -"startColumn": 89, -"endLine": 43, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '30' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence\Snapshot\SnapshotStore.cs", -"region": { -"startLine": 44, -"startColumn": 90, -"endLine": 44, -"endColumn": 92 -} -} } ] } diff --git a/analyzers/its/expected/akka.net/Akka.Persistence.Sql.Common--netstandard2.0-S109.json b/analyzers/its/expected/akka.net/Akka.Persistence.Sql.Common--netstandard2.0-S109.json index 341d7534319..5e3970f419d 100644 --- a/analyzers/its/expected/akka.net/Akka.Persistence.Sql.Common--netstandard2.0-S109.json +++ b/analyzers/its/expected/akka.net/Akka.Persistence.Sql.Common--netstandard2.0-S109.json @@ -41,32 +41,6 @@ }, { "id": "S109", -"message": "Assign this magic number '20' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\persistence\Akka.Persistence.Sql.Common\Journal\BatchingSqlJournal.cs", -"region": { -"startLine": 146, -"startColumn": 83, -"endLine": 146, -"endColumn": 85 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '60' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\persistence\Akka.Persistence.Sql.Common\Journal\BatchingSqlJournal.cs", -"region": { -"startLine": 147, -"startColumn": 85, -"endLine": 147, -"endColumn": 87 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '64' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\contrib\persistence\Akka.Persistence.Sql.Common\Journal\BatchingSqlJournal.cs", @@ -106,19 +80,6 @@ }, { "id": "S109", -"message": "Assign this magic number '30' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\persistence\Akka.Persistence.Sql.Common\Journal\BatchingSqlJournal.cs", -"region": { -"startLine": 289, -"startColumn": 95, -"endLine": 289, -"endColumn": 97 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\contrib\persistence\Akka.Persistence.Sql.Common\Snapshot\QueryExecutor.cs", diff --git a/analyzers/its/expected/akka.net/Akka.Persistence.Sql.TestKit--netstandard2.0-S109.json b/analyzers/its/expected/akka.net/Akka.Persistence.Sql.TestKit--netstandard2.0-S109.json index 23d94d7b4b0..f2f5b6c268e 100644 --- a/analyzers/its/expected/akka.net/Akka.Persistence.Sql.TestKit--netstandard2.0-S109.json +++ b/analyzers/its/expected/akka.net/Akka.Persistence.Sql.TestKit--netstandard2.0-S109.json @@ -2,19 +2,6 @@ "issues": [ { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\contrib\persistence\Akka.Persistence.Sql.TestKit\DefaultConfigSpec.cs", -"region": { -"startLine": 32, -"startColumn": 104, -"endLine": 32, -"endColumn": 105 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\contrib\persistence\Akka.Persistence.Sql.TestKit\DefaultConfigSpec.cs", diff --git a/analyzers/its/expected/akka.net/Akka.Persistence.TCK--netstandard2.0-S109.json b/analyzers/its/expected/akka.net/Akka.Persistence.TCK--netstandard2.0-S109.json index 34824d6af23..c822fd75dc3 100644 --- a/analyzers/its/expected/akka.net/Akka.Persistence.TCK--netstandard2.0-S109.json +++ b/analyzers/its/expected/akka.net/Akka.Persistence.TCK--netstandard2.0-S109.json @@ -41,19 +41,6 @@ }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", -"region": { -"startLine": 168, -"startColumn": 45, -"endLine": 168, -"endColumn": 46 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", @@ -84,19 +71,6 @@ "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", "region": { -"startLine": 176, -"startColumn": 48, -"endLine": 176, -"endColumn": 49 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", -"region": { "startLine": 177, "startColumn": 34, "endLine": 177, @@ -123,19 +97,6 @@ "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", "region": { -"startLine": 184, -"startColumn": 63, -"endLine": 184, -"endColumn": 64 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", -"region": { "startLine": 185, "startColumn": 34, "endLine": 185, @@ -158,32 +119,6 @@ }, { "id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", -"region": { -"startLine": 192, -"startColumn": 45, -"endLine": 192, -"endColumn": 46 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", -"region": { -"startLine": 192, -"startColumn": 48, -"endLine": 192, -"endColumn": 49 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", @@ -210,45 +145,6 @@ }, { "id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", -"region": { -"startLine": 200, -"startColumn": 45, -"endLine": 200, -"endColumn": 46 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", -"region": { -"startLine": 200, -"startColumn": 48, -"endLine": 200, -"endColumn": 49 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", -"region": { -"startLine": 200, -"startColumn": 51, -"endLine": 200, -"endColumn": 52 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", @@ -279,32 +175,6 @@ "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", "region": { -"startLine": 208, -"startColumn": 45, -"endLine": 208, -"endColumn": 46 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", -"region": { -"startLine": 208, -"startColumn": 48, -"endLine": 208, -"endColumn": 49 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", -"region": { "startLine": 209, "startColumn": 81, "endLine": 209, @@ -331,32 +201,6 @@ "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", "region": { -"startLine": 216, -"startColumn": 45, -"endLine": 216, -"endColumn": 46 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '4' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", -"region": { -"startLine": 216, -"startColumn": 48, -"endLine": 216, -"endColumn": 49 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", -"region": { "startLine": 217, "startColumn": 81, "endLine": 217, @@ -379,32 +223,6 @@ }, { "id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", -"region": { -"startLine": 224, -"startColumn": 45, -"endLine": 224, -"endColumn": 46 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '4' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", -"region": { -"startLine": 224, -"startColumn": 48, -"endLine": 224, -"endColumn": 49 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", @@ -418,32 +236,6 @@ }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", -"region": { -"startLine": 231, -"startColumn": 45, -"endLine": 231, -"endColumn": 46 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", -"region": { -"startLine": 231, -"startColumn": 48, -"endLine": 231, -"endColumn": 49 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", @@ -496,19 +288,6 @@ }, { "id": "S109", -"message": "Assign this magic number '200' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", -"region": { -"startLine": 258, -"startColumn": 66, -"endLine": 258, -"endColumn": 69 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", @@ -539,19 +318,6 @@ "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", "region": { -"startLine": 268, -"startColumn": 52, -"endLine": 268, -"endColumn": 54 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", -"region": { "startLine": 269, "startColumn": 84, "endLine": 269, @@ -643,19 +409,6 @@ "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", "region": { -"startLine": 315, -"startColumn": 45, -"endLine": 315, -"endColumn": 47 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '6' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Journal\JournalSpec.cs", -"region": { "startLine": 321, "startColumn": 40, "endLine": 321, @@ -756,19 +509,6 @@ }, { "id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\AllEventsSpec.cs", -"region": { -"startLine": 56, -"startColumn": 57, -"endLine": 56, -"endColumn": 60 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\AllEventsSpec.cs", @@ -782,19 +522,6 @@ }, { "id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\AllEventsSpec.cs", -"region": { -"startLine": 65, -"startColumn": 57, -"endLine": 65, -"endColumn": 60 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\AllEventsSpec.cs", @@ -899,19 +626,6 @@ }, { "id": "S109", -"message": "Assign this magic number '500' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentAllEventsSpec.cs", -"region": { -"startLine": 70, -"startColumn": 57, -"endLine": 70, -"endColumn": 60 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentAllEventsSpec.cs", @@ -964,32 +678,6 @@ }, { "id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentAllEventsSpec.cs", -"region": { -"startLine": 100, -"startColumn": 57, -"endLine": 100, -"endColumn": 60 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentAllEventsSpec.cs", -"region": { -"startLine": 105, -"startColumn": 57, -"endLine": 105, -"endColumn": 60 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentAllEventsSpec.cs", @@ -1068,19 +756,6 @@ }, { "id": "S109", -"message": "Assign this magic number '500' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentAllEventsSpec.cs", -"region": { -"startLine": 164, -"startColumn": 57, -"endLine": 164, -"endColumn": 60 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentEventsByPersistenceIdSpec.cs", @@ -1094,19 +769,6 @@ }, { "id": "S109", -"message": "Assign this magic number '500' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentEventsByPersistenceIdSpec.cs", -"region": { -"startLine": 50, -"startColumn": 56, -"endLine": 50, -"endColumn": 59 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentEventsByPersistenceIdSpec.cs", @@ -1120,14 +782,14 @@ }, { "id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentEventsByPersistenceIdSpec.cs", "region": { -"startLine": 82, -"startColumn": 57, -"endLine": 82, -"endColumn": 60 +"startLine": 83, +"startColumn": 27, +"endLine": 83, +"endColumn": 28 } } }, @@ -1137,59 +799,7 @@ "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentEventsByPersistenceIdSpec.cs", "region": { -"startLine": 83, -"startColumn": 27, -"endLine": 83, -"endColumn": 28 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentEventsByPersistenceIdSpec.cs", -"region": { -"startLine": 94, -"startColumn": 51, -"endLine": 94, -"endColumn": 52 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentEventsByPersistenceIdSpec.cs", -"region": { -"startLine": 107, -"startColumn": 51, -"endLine": 107, -"endColumn": 52 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentEventsByPersistenceIdSpec.cs", -"region": { -"startLine": 120, -"startColumn": 51, -"endLine": 120, -"endColumn": 52 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentEventsByPersistenceIdSpec.cs", -"region": { -"startLine": 180, +"startLine": 180, "startColumn": 27, "endLine": 180, "endColumn": 28 @@ -1237,19 +847,6 @@ }, { "id": "S109", -"message": "Assign this magic number '500' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentEventsByTagSpec.cs", -"region": { -"startLine": 64, -"startColumn": 57, -"endLine": 64, -"endColumn": 60 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentEventsByTagSpec.cs", @@ -1367,32 +964,6 @@ }, { "id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentEventsByTagSpec.cs", -"region": { -"startLine": 113, -"startColumn": 57, -"endLine": 113, -"endColumn": 60 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentEventsByTagSpec.cs", -"region": { -"startLine": 118, -"startColumn": 57, -"endLine": 118, -"endColumn": 60 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentEventsByTagSpec.cs", @@ -1510,19 +1081,6 @@ }, { "id": "S109", -"message": "Assign this magic number '500' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentEventsByTagSpec.cs", -"region": { -"startLine": 185, -"startColumn": 57, -"endLine": 185, -"endColumn": 60 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentEventsByTagSpec.cs", @@ -1536,19 +1094,6 @@ }, { "id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentPersistenceIdsSpec.cs", -"region": { -"startLine": 50, -"startColumn": 47, -"endLine": 50, -"endColumn": 49 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '4' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentPersistenceIdsSpec.cs", @@ -1579,19 +1124,6 @@ "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentPersistenceIdsSpec.cs", "region": { -"startLine": 65, -"startColumn": 47, -"endLine": 65, -"endColumn": 49 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentPersistenceIdsSpec.cs", -"region": { "startLine": 66, "startColumn": 31, "endLine": 66, @@ -1614,32 +1146,6 @@ }, { "id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentPersistenceIdsSpec.cs", -"region": { -"startLine": 86, -"startColumn": 56, -"endLine": 86, -"endColumn": 59 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentPersistenceIdsSpec.cs", -"region": { -"startLine": 90, -"startColumn": 57, -"endLine": 90, -"endColumn": 60 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\CurrentPersistenceIdsSpec.cs", @@ -1653,19 +1159,6 @@ }, { "id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\EventsByPersistenceIdSpec.cs", -"region": { -"startLine": 89, -"startColumn": 57, -"endLine": 89, -"endColumn": 60 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\EventsByPersistenceIdSpec.cs", @@ -1705,32 +1198,6 @@ }, { "id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\EventsByTagSpec.cs", -"region": { -"startLine": 55, -"startColumn": 57, -"endLine": 55, -"endColumn": 60 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\EventsByTagSpec.cs", -"region": { -"startLine": 63, -"startColumn": 57, -"endLine": 63, -"endColumn": 60 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\EventsByTagSpec.cs", @@ -1809,32 +1276,6 @@ }, { "id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\EventsByTagSpec.cs", -"region": { -"startLine": 105, -"startColumn": 58, -"endLine": 105, -"endColumn": 61 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", -"region": { -"startLine": 62, -"startColumn": 47, -"endLine": 62, -"endColumn": 49 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", @@ -1848,58 +1289,6 @@ }, { "id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", -"region": { -"startLine": 65, -"startColumn": 56, -"endLine": 65, -"endColumn": 58 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", -"region": { -"startLine": 79, -"startColumn": 47, -"endLine": 79, -"endColumn": 49 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", -"region": { -"startLine": 82, -"startColumn": 68, -"endLine": 82, -"endColumn": 71 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", -"region": { -"startLine": 86, -"startColumn": 47, -"endLine": 86, -"endColumn": 49 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", @@ -1991,19 +1380,6 @@ }, { "id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", -"region": { -"startLine": 110, -"startColumn": 47, -"endLine": 110, -"endColumn": 49 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", @@ -2017,32 +1393,6 @@ }, { "id": "S109", -"message": "Assign this magic number '200' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", -"region": { -"startLine": 114, -"startColumn": 56, -"endLine": 114, -"endColumn": 59 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", -"region": { -"startLine": 116, -"startColumn": 47, -"endLine": 116, -"endColumn": 49 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", @@ -2056,32 +1406,6 @@ }, { "id": "S109", -"message": "Assign this magic number '200' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", -"region": { -"startLine": 120, -"startColumn": 56, -"endLine": 120, -"endColumn": 59 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", -"region": { -"startLine": 137, -"startColumn": 47, -"endLine": 137, -"endColumn": 49 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", @@ -2095,19 +1419,6 @@ }, { "id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", -"region": { -"startLine": 142, -"startColumn": 61, -"endLine": 142, -"endColumn": 65 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", @@ -2121,19 +1432,6 @@ }, { "id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", -"region": { -"startLine": 147, -"startColumn": 61, -"endLine": 147, -"endColumn": 65 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", @@ -2151,19 +1449,6 @@ "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", "region": { -"startLine": 163, -"startColumn": 47, -"endLine": 163, -"endColumn": 49 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", -"region": { "startLine": 165, "startColumn": 38, "endLine": 165, @@ -2173,19 +1458,6 @@ }, { "id": "S109", -"message": "Assign this magic number '200' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", -"region": { -"startLine": 167, -"startColumn": 60, -"endLine": 167, -"endColumn": 63 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", @@ -2203,19 +1475,6 @@ "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", "region": { -"startLine": 172, -"startColumn": 47, -"endLine": 172, -"endColumn": 49 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", -"region": { "startLine": 174, "startColumn": 38, "endLine": 174, @@ -2225,32 +1484,6 @@ }, { "id": "S109", -"message": "Assign this magic number '200' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", -"region": { -"startLine": 176, -"startColumn": 60, -"endLine": 176, -"endColumn": 63 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", -"region": { -"startLine": 202, -"startColumn": 51, -"endLine": 202, -"endColumn": 53 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", @@ -2264,32 +1497,6 @@ }, { "id": "S109", -"message": "Assign this magic number '200' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", -"region": { -"startLine": 204, -"startColumn": 60, -"endLine": 204, -"endColumn": 63 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", -"region": { -"startLine": 211, -"startColumn": 52, -"endLine": 211, -"endColumn": 54 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '4' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", @@ -2303,19 +1510,6 @@ }, { "id": "S109", -"message": "Assign this magic number '200' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", -"region": { -"startLine": 213, -"startColumn": 60, -"endLine": 213, -"endColumn": 63 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '400' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Query\PersistenceIdsSpec.cs", @@ -2407,45 +1601,6 @@ }, { "id": "S109", -"message": "Assign this magic number '100000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Snapshot\SnapshotStoreSpec.cs", -"region": { -"startLine": 119, -"startColumn": 112, -"endLine": 119, -"endColumn": 118 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '7' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Snapshot\SnapshotStoreSpec.cs", -"region": { -"startLine": 126, -"startColumn": 84, -"endLine": 126, -"endColumn": 85 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '7' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Snapshot\SnapshotStoreSpec.cs", -"region": { -"startLine": 129, -"startColumn": 88, -"endLine": 129, -"endColumn": 89 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '7' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Snapshot\SnapshotStoreSpec.cs", @@ -2472,19 +1627,6 @@ }, { "id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Snapshot\SnapshotStoreSpec.cs", -"region": { -"startLine": 147, -"startColumn": 84, -"endLine": 147, -"endColumn": 86 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Snapshot\SnapshotStoreSpec.cs", @@ -2502,19 +1644,6 @@ "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Snapshot\SnapshotStoreSpec.cs", "region": { -"startLine": 154, -"startColumn": 88, -"endLine": 154, -"endColumn": 90 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Snapshot\SnapshotStoreSpec.cs", -"region": { "startLine": 156, "startColumn": 40, "endLine": 156, @@ -2537,19 +1666,6 @@ }, { "id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Snapshot\SnapshotStoreSpec.cs", -"region": { -"startLine": 165, -"startColumn": 84, -"endLine": 165, -"endColumn": 86 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Snapshot\SnapshotStoreSpec.cs", @@ -2593,19 +1709,6 @@ "location": { "uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Snapshot\SnapshotStoreSpec.cs", "region": { -"startLine": 172, -"startColumn": 123, -"endLine": 172, -"endColumn": 125 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TCK\Snapshot\SnapshotStoreSpec.cs", -"region": { "startLine": 174, "startColumn": 40, "endLine": 174, diff --git a/analyzers/its/expected/akka.net/Akka.Persistence.TestKit--netstandard2.0-S109.json b/analyzers/its/expected/akka.net/Akka.Persistence.TestKit--netstandard2.0-S109.json deleted file mode 100644 index cd3edf2049b..00000000000 --- a/analyzers/its/expected/akka.net/Akka.Persistence.TestKit--netstandard2.0-S109.json +++ /dev/null @@ -1,69 +0,0 @@ -{ -"issues": [ -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TestKit\Journal\JournalRecoveryBehaviorSetter.cs", -"region": { -"startLine": 29, -"startColumn": 38, -"endLine": 29, -"endColumn": 39 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TestKit\Journal\JournalWriteBehaviorSetter.cs", -"region": { -"startLine": 29, -"startColumn": 38, -"endLine": 29, -"endColumn": 39 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TestKit\SnapshotStore\SnapshotStoreDeleteBehaviorSetter.cs", -"region": { -"startLine": 29, -"startColumn": 38, -"endLine": 29, -"endColumn": 39 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TestKit\SnapshotStore\SnapshotStoreLoadBehaviorSetter.cs", -"region": { -"startLine": 29, -"startColumn": 38, -"endLine": 29, -"endColumn": 39 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Persistence.TestKit\SnapshotStore\SnapshotStoreSaveBehaviorSetter.cs", -"region": { -"startLine": 29, -"startColumn": 38, -"endLine": 29, -"endColumn": 39 -} -} -} -] -} diff --git a/analyzers/its/expected/akka.net/Akka.Remote--netstandard2.0-S109.json b/analyzers/its/expected/akka.net/Akka.Remote--netstandard2.0-S109.json index 69041b2acbf..f079ee6b67e 100644 --- a/analyzers/its/expected/akka.net/Akka.Remote--netstandard2.0-S109.json +++ b/analyzers/its/expected/akka.net/Akka.Remote--netstandard2.0-S109.json @@ -2,19 +2,6 @@ "issues": [ { "id": "S109", -"message": "Assign this magic number '20' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Remote\AkkaProtocolSettings.cs", -"region": { -"startLine": 58, -"startColumn": 109, -"endLine": 58, -"endColumn": 111 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '1.2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Remote\Endpoint.cs", @@ -93,32 +80,6 @@ }, { "id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Remote\EndpointManager.cs", -"region": { -"startLine": 492, -"startColumn": 163, -"endLine": 492, -"endColumn": 165 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Remote\EndpointManager.cs", -"region": { -"startLine": 691, -"startColumn": 91, -"endLine": 691, -"endColumn": 93 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Remote\PhiAccrualFailureDetector.cs", @@ -262,71 +223,6 @@ }, { "id": "S109", -"message": "Assign this magic number '4' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Remote\Transport\DotNetty\DotNettyTransport.cs", -"region": { -"startLine": 318, -"startColumn": 132, -"endLine": 318, -"endColumn": 133 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '4' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Remote\Transport\DotNetty\DotNettyTransport.cs", -"region": { -"startLine": 318, -"startColumn": 138, -"endLine": 318, -"endColumn": 139 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '4' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Remote\Transport\DotNetty\DotNettyTransport.cs", -"region": { -"startLine": 321, -"startColumn": 107, -"endLine": 321, -"endColumn": 108 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '4' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Remote\Transport\DotNetty\DotNettyTransport.cs", -"region": { -"startLine": 325, -"startColumn": 99, -"endLine": 325, -"endColumn": 100 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '15' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Remote\Transport\DotNetty\DotNettyTransportSettings.cs", -"region": { -"startLine": 82, -"startColumn": 95, -"endLine": 82, -"endColumn": 97 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '2552' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Remote\Transport\DotNetty\DotNettyTransportSettings.cs", @@ -441,19 +337,6 @@ "endColumn": 74 } } -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Remote\Transport\TestTransport.cs", -"region": { -"startLine": 814, -"startColumn": 50, -"endLine": 814, -"endColumn": 51 -} -} } ] } diff --git a/analyzers/its/expected/akka.net/Akka.Remote.TestKit--netstandard2.0-S109.json b/analyzers/its/expected/akka.net/Akka.Remote.TestKit--netstandard2.0-S109.json index 86c5843b23d..1f795146125 100644 --- a/analyzers/its/expected/akka.net/Akka.Remote.TestKit--netstandard2.0-S109.json +++ b/analyzers/its/expected/akka.net/Akka.Remote.TestKit--netstandard2.0-S109.json @@ -4,32 +4,6 @@ "id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Remote.TestKit\CommandLine.cs", -"region": { -"startLine": 72, -"startColumn": 38, -"endLine": 72, -"endColumn": 39 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Remote.TestKit\Conductor.cs", -"region": { -"startLine": 404, -"startColumn": 37, -"endLine": 404, -"endColumn": 39 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { "uri": "sources\akka.net\src\core\Akka.Remote.TestKit\Extension.cs", "region": { "startLine": 132, @@ -80,32 +54,6 @@ }, { "id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Remote.TestKit\MultiNodeSpec.cs", -"region": { -"startLine": 445, -"startColumn": 88, -"endLine": 445, -"endColumn": 89 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Remote.TestKit\Player.cs", -"region": { -"startLine": 488, -"startColumn": 63, -"endLine": 488, -"endColumn": 67 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '125000' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Remote.TestKit\Player.cs", diff --git a/analyzers/its/expected/akka.net/Akka.Remote.Tests.Performance--netcoreapp3.1-S109.json b/analyzers/its/expected/akka.net/Akka.Remote.Tests.Performance--netcoreapp3.1-S109.json index 5852c59f221..d34e7c594b4 100644 --- a/analyzers/its/expected/akka.net/Akka.Remote.Tests.Performance--netcoreapp3.1-S109.json +++ b/analyzers/its/expected/akka.net/Akka.Remote.Tests.Performance--netcoreapp3.1-S109.json @@ -2,97 +2,6 @@ "issues": [ { "id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Remote.Tests.Performance\InboundMessageDispatcherSpec.cs", -"region": { -"startLine": 94, -"startColumn": 129, -"endLine": 94, -"endColumn": 131 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Remote.Tests.Performance\Serialization\FastHashSpecs.cs", -"region": { -"startLine": 24, -"startColumn": 75, -"endLine": 24, -"endColumn": 77 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Remote.Tests.Performance\Serialization\FastHashSpecs.cs", -"region": { -"startLine": 33, -"startColumn": 75, -"endLine": 33, -"endColumn": 77 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Remote.Tests.Performance\Transports\AssociationStressSpecBase.cs", -"region": { -"startLine": 69, -"startColumn": 34, -"endLine": 69, -"endColumn": 36 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Remote.Tests.Performance\Transports\AssociationStressSpecBase.cs", -"region": { -"startLine": 69, -"startColumn": 60, -"endLine": 69, -"endColumn": 64 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Remote.Tests.Performance\Transports\RemoteMessagingThroughputSpecBase.cs", -"region": { -"startLine": 170, -"startColumn": 63, -"endLine": 170, -"endColumn": 64 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Remote.Tests.Performance\Transports\RemoteMessagingThroughputSpecBase.cs", -"region": { -"startLine": 171, -"startColumn": 34, -"endLine": 171, -"endColumn": 38 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Remote.Tests.Performance\Transports\TestTransportAssociationStressSpec.cs", diff --git a/analyzers/its/expected/akka.net/Akka.Streams--netstandard2.0-S109.json b/analyzers/its/expected/akka.net/Akka.Streams--netstandard2.0-S109.json index 4b667bf209d..39be0668c55 100644 --- a/analyzers/its/expected/akka.net/Akka.Streams--netstandard2.0-S109.json +++ b/analyzers/its/expected/akka.net/Akka.Streams--netstandard2.0-S109.json @@ -67,19 +67,6 @@ }, { "id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams\ActorMaterializer.cs", -"region": { -"startLine": 679, -"startColumn": 72, -"endLine": 679, -"endColumn": 73 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams\Actors\RequestStrategies.cs", @@ -110,19 +97,6 @@ "location": { "uri": "sources\akka.net\src\core\Akka.Streams\Dsl\Framing.cs", "region": { -"startLine": 64, -"startColumn": 50, -"endLine": 64, -"endColumn": 51 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '4' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams\Dsl\Framing.cs", -"region": { "startLine": 101, "startColumn": 32, "endLine": 101, @@ -353,32 +327,6 @@ }, { "id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams\Dsl\StreamConverters.cs", -"region": { -"startLine": 65, -"startColumn": 98, -"endLine": 65, -"endColumn": 99 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams\Dsl\StreamConverters.cs", -"region": { -"startLine": 107, -"startColumn": 63, -"endLine": 107, -"endColumn": 64 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '32' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams\Dsl\StreamRefs.cs", @@ -392,32 +340,6 @@ }, { "id": "S109", -"message": "Assign this magic number '30' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams\Dsl\StreamRefs.cs", -"region": { -"startLine": 67, -"startColumn": 102, -"endLine": 67, -"endColumn": 104 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams\Dsl\StreamRefs.cs", -"region": { -"startLine": 68, -"startColumn": 126, -"endLine": 68, -"endColumn": 127 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams\Implementation\ActorProcessor.cs", @@ -446,19 +368,6 @@ "id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams\Implementation\FanOut.cs", -"region": { -"startLine": 711, -"startColumn": 64, -"endLine": 711, -"endColumn": 65 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { "uri": "sources\akka.net\src\core\Akka.Streams\Implementation\Fusing\ActorGraphInterpreter.cs", "region": { "startLine": 164, @@ -665,32 +574,6 @@ }, { "id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams\Implementation\StreamLayout.cs", -"region": { -"startLine": 588, -"startColumn": 60, -"endLine": 588, -"endColumn": 61 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams\Implementation\StreamLayout.cs", -"region": { -"startLine": 588, -"startColumn": 83, -"endLine": 588, -"endColumn": 84 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '4' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams\Implementation\StreamLayout.cs", @@ -782,32 +665,6 @@ }, { "id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams\Shape.cs", -"region": { -"startLine": 668, -"startColumn": 34, -"endLine": 668, -"endColumn": 35 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams\Shape.cs", -"region": { -"startLine": 669, -"startColumn": 35, -"endLine": 669, -"endColumn": 36 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '32' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams\Util\BitOperations.cs", diff --git a/analyzers/its/expected/akka.net/Akka.Streams.Tests.Performance--netcoreapp3.1-S109.json b/analyzers/its/expected/akka.net/Akka.Streams.Tests.Performance--netcoreapp3.1-S109.json index 3af8fa948c1..31e3b0dfbfb 100644 --- a/analyzers/its/expected/akka.net/Akka.Streams.Tests.Performance--netcoreapp3.1-S109.json +++ b/analyzers/its/expected/akka.net/Akka.Streams.Tests.Performance--netcoreapp3.1-S109.json @@ -6,2207 +6,465 @@ "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", "region": { -"startLine": 71, -"startColumn": 86, -"endLine": 71, -"endColumn": 87 +"startLine": 134, +"startColumn": 40, +"endLine": 134, +"endColumn": 41 } } }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", "region": { -"startLine": 76, -"startColumn": 101, -"endLine": 76, -"endColumn": 102 +"startLine": 142, +"startColumn": 41, +"endLine": 142, +"endColumn": 42 } } }, { "id": "S109", -"message": "Assign this magic number '300' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", "region": { -"startLine": 79, -"startColumn": 53, -"endLine": 79, -"endColumn": 56 +"startLine": 150, +"startColumn": 42, +"endLine": 150, +"endColumn": 43 } } }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", "region": { -"startLine": 84, -"startColumn": 101, -"endLine": 84, -"endColumn": 102 +"startLine": 159, +"startColumn": 40, +"endLine": 159, +"endColumn": 41 } } }, { "id": "S109", -"message": "Assign this magic number '300' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", "region": { -"startLine": 87, -"startColumn": 53, -"endLine": 87, -"endColumn": 56 +"startLine": 167, +"startColumn": 41, +"endLine": 167, +"endColumn": 42 } } }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", "region": { -"startLine": 92, -"startColumn": 101, -"endLine": 92, -"endColumn": 102 +"startLine": 175, +"startColumn": 42, +"endLine": 175, +"endColumn": 43 } } }, { "id": "S109", -"message": "Assign this magic number '300' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", "region": { -"startLine": 95, -"startColumn": 53, -"endLine": 95, -"endColumn": 56 +"startLine": 187, +"startColumn": 40, +"endLine": 187, +"endColumn": 42 } } }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", "region": { -"startLine": 101, -"startColumn": 101, -"endLine": 101, -"endColumn": 102 +"startLine": 195, +"startColumn": 41, +"endLine": 195, +"endColumn": 43 } } }, { "id": "S109", -"message": "Assign this magic number '200' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", "region": { -"startLine": 104, -"startColumn": 53, -"endLine": 104, -"endColumn": 56 +"startLine": 203, +"startColumn": 42, +"endLine": 203, +"endColumn": 44 } } }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", "region": { -"startLine": 109, -"startColumn": 101, -"endLine": 109, -"endColumn": 102 +"startLine": 212, +"startColumn": 40, +"endLine": 212, +"endColumn": 42 } } }, { "id": "S109", -"message": "Assign this magic number '200' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", "region": { -"startLine": 112, -"startColumn": 53, -"endLine": 112, -"endColumn": 56 +"startLine": 220, +"startColumn": 41, +"endLine": 220, +"endColumn": 43 } } }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", "region": { -"startLine": 117, -"startColumn": 101, -"endLine": 117, -"endColumn": 102 +"startLine": 228, +"startColumn": 42, +"endLine": 228, +"endColumn": 44 } } }, { "id": "S109", -"message": "Assign this magic number '200' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", "region": { -"startLine": 120, -"startColumn": 53, -"endLine": 120, -"endColumn": 56 +"startLine": 250, +"startColumn": 30, +"endLine": 250, +"endColumn": 32 } } }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '100000' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", "region": { -"startLine": 129, -"startColumn": 101, -"endLine": 129, -"endColumn": 102 +"startLine": 271, +"startColumn": 40, +"endLine": 271, +"endColumn": 46 } } }, { "id": "S109", -"message": "Assign this magic number '700' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", "region": { -"startLine": 132, -"startColumn": 53, -"endLine": 132, -"endColumn": 56 +"startLine": 224, +"startColumn": 40, +"endLine": 224, +"endColumn": 42 } } }, { "id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", "region": { -"startLine": 134, -"startColumn": 40, -"endLine": 134, +"startLine": 228, +"startColumn": 39, +"endLine": 228, "endColumn": 41 } } }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", "region": { -"startLine": 137, -"startColumn": 101, -"endLine": 137, -"endColumn": 102 +"startLine": 229, +"startColumn": 33, +"endLine": 229, +"endColumn": 35 } } }, { "id": "S109", -"message": "Assign this magic number '700' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", "region": { -"startLine": 140, -"startColumn": 53, -"endLine": 140, -"endColumn": 56 +"startLine": 230, +"startColumn": 33, +"endLine": 230, +"endColumn": 35 } } }, { "id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", "region": { -"startLine": 142, -"startColumn": 41, -"endLine": 142, -"endColumn": 42 +"startLine": 231, +"startColumn": 33, +"endLine": 231, +"endColumn": 35 } } }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", "region": { -"startLine": 145, -"startColumn": 101, -"endLine": 145, -"endColumn": 102 +"startLine": 232, +"startColumn": 33, +"endLine": 232, +"endColumn": 35 } } }, { "id": "S109", -"message": "Assign this magic number '700' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", "region": { -"startLine": 148, -"startColumn": 53, -"endLine": 148, -"endColumn": 56 +"startLine": 233, +"startColumn": 33, +"endLine": 233, +"endColumn": 35 } } }, { "id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", "region": { -"startLine": 150, -"startColumn": 42, -"endLine": 150, -"endColumn": 43 +"startLine": 234, +"startColumn": 33, +"endLine": 234, +"endColumn": 35 } } }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", "region": { -"startLine": 154, -"startColumn": 101, -"endLine": 154, -"endColumn": 102 +"startLine": 235, +"startColumn": 33, +"endLine": 235, +"endColumn": 35 } } }, { "id": "S109", -"message": "Assign this magic number '200' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", "region": { -"startLine": 157, -"startColumn": 53, -"endLine": 157, -"endColumn": 56 +"startLine": 236, +"startColumn": 33, +"endLine": 236, +"endColumn": 35 } } }, { "id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", "region": { -"startLine": 159, -"startColumn": 40, -"endLine": 159, -"endColumn": 41 +"startLine": 237, +"startColumn": 33, +"endLine": 237, +"endColumn": 35 } } }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", "region": { -"startLine": 162, -"startColumn": 101, -"endLine": 162, -"endColumn": 102 +"startLine": 25, +"startColumn": 87, +"endLine": 25, +"endColumn": 89 } } }, { "id": "S109", -"message": "Assign this magic number '200' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", "region": { -"startLine": 165, -"startColumn": 53, -"endLine": 165, -"endColumn": 56 +"startLine": 32, +"startColumn": 88, +"endLine": 32, +"endColumn": 91 } } }, { "id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", "region": { -"startLine": 167, -"startColumn": 41, -"endLine": 167, -"endColumn": 42 +"startLine": 39, +"startColumn": 89, +"endLine": 39, +"endColumn": 93 } } }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", "region": { -"startLine": 170, -"startColumn": 101, -"endLine": 170, +"startLine": 54, +"startColumn": 100, +"endLine": 54, "endColumn": 102 } } }, { "id": "S109", -"message": "Assign this magic number '200' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", "region": { -"startLine": 173, -"startColumn": 53, -"endLine": 173, -"endColumn": 56 +"startLine": 61, +"startColumn": 101, +"endLine": 61, +"endColumn": 104 } } }, { "id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", "region": { -"startLine": 175, -"startColumn": 42, -"endLine": 175, -"endColumn": 43 +"startLine": 68, +"startColumn": 102, +"endLine": 68, +"endColumn": 106 } } }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", "region": { -"startLine": 182, -"startColumn": 101, -"endLine": 182, -"endColumn": 102 +"startLine": 83, +"startColumn": 110, +"endLine": 83, +"endColumn": 112 } } }, { "id": "S109", -"message": "Assign this magic number '1200' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", "region": { -"startLine": 185, -"startColumn": 53, -"endLine": 185, -"endColumn": 57 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", -"region": { -"startLine": 187, -"startColumn": 40, -"endLine": 187, -"endColumn": 42 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", -"region": { -"startLine": 190, -"startColumn": 101, -"endLine": 190, -"endColumn": 102 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1200' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", -"region": { -"startLine": 193, -"startColumn": 53, -"endLine": 193, -"endColumn": 57 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", -"region": { -"startLine": 195, -"startColumn": 41, -"endLine": 195, -"endColumn": 43 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", -"region": { -"startLine": 198, -"startColumn": 101, -"endLine": 198, -"endColumn": 102 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1200' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", -"region": { -"startLine": 201, -"startColumn": 53, -"endLine": 201, -"endColumn": 57 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", -"region": { -"startLine": 203, -"startColumn": 42, -"endLine": 203, -"endColumn": 44 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", -"region": { -"startLine": 207, -"startColumn": 101, -"endLine": 207, -"endColumn": 102 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '200' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", -"region": { -"startLine": 210, -"startColumn": 53, -"endLine": 210, -"endColumn": 56 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", -"region": { -"startLine": 212, -"startColumn": 40, -"endLine": 212, -"endColumn": 42 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", -"region": { -"startLine": 215, -"startColumn": 101, -"endLine": 215, -"endColumn": 102 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '200' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", -"region": { -"startLine": 218, -"startColumn": 53, -"endLine": 218, -"endColumn": 56 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", -"region": { -"startLine": 220, -"startColumn": 41, -"endLine": 220, -"endColumn": 43 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", -"region": { -"startLine": 223, -"startColumn": 101, -"endLine": 223, -"endColumn": 102 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '200' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", -"region": { -"startLine": 226, -"startColumn": 53, -"endLine": 226, -"endColumn": 56 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", -"region": { -"startLine": 228, -"startColumn": 42, -"endLine": 228, -"endColumn": 44 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", -"region": { -"startLine": 250, -"startColumn": 30, -"endLine": 250, -"endColumn": 32 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FlowSelectBenchmark.cs", -"region": { -"startLine": 271, -"startColumn": 40, -"endLine": 271, -"endColumn": 46 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 224, -"startColumn": 40, -"endLine": 224, -"endColumn": 42 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 228, -"startColumn": 39, -"endLine": 228, -"endColumn": 41 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 229, -"startColumn": 33, -"endLine": 229, -"endColumn": 35 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 230, -"startColumn": 33, -"endLine": 230, -"endColumn": 35 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 231, -"startColumn": 33, -"endLine": 231, -"endColumn": 35 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 232, -"startColumn": 33, -"endLine": 232, -"endColumn": 35 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 233, -"startColumn": 33, -"endLine": 233, -"endColumn": 35 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 234, -"startColumn": 33, -"endLine": 234, -"endColumn": 35 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 235, -"startColumn": 33, -"endLine": 235, -"endColumn": 35 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 236, -"startColumn": 33, -"endLine": 236, -"endColumn": 35 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 237, -"startColumn": 33, -"endLine": 237, -"endColumn": 35 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 271, -"startColumn": 80, -"endLine": 271, -"endColumn": 82 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 275, -"startColumn": 101, -"endLine": 275, -"endColumn": 102 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '50' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 277, -"startColumn": 53, -"endLine": 277, -"endColumn": 55 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 281, -"startColumn": 108, -"endLine": 281, -"endColumn": 109 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 283, -"startColumn": 53, -"endLine": 283, -"endColumn": 56 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 287, -"startColumn": 101, -"endLine": 287, -"endColumn": 102 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '50' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 289, -"startColumn": 53, -"endLine": 289, -"endColumn": 55 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 293, -"startColumn": 108, -"endLine": 293, -"endColumn": 109 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '110' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 295, -"startColumn": 53, -"endLine": 295, -"endColumn": 56 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 299, -"startColumn": 101, -"endLine": 299, -"endColumn": 102 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '60' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 301, -"startColumn": 53, -"endLine": 301, -"endColumn": 55 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 305, -"startColumn": 101, -"endLine": 305, -"endColumn": 102 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '350' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 307, -"startColumn": 53, -"endLine": 307, -"endColumn": 56 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 311, -"startColumn": 108, -"endLine": 311, -"endColumn": 109 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3500' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 313, -"startColumn": 53, -"endLine": 313, -"endColumn": 57 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 317, -"startColumn": 101, -"endLine": 317, -"endColumn": 102 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 319, -"startColumn": 53, -"endLine": 319, -"endColumn": 56 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 323, -"startColumn": 101, -"endLine": 323, -"endColumn": 102 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '50' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 325, -"startColumn": 53, -"endLine": 325, -"endColumn": 55 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 329, -"startColumn": 101, -"endLine": 329, -"endColumn": 102 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\FusedGraphsBenchmark.cs", -"region": { -"startLine": 331, -"startColumn": 53, -"endLine": 331, -"endColumn": 56 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 15, -"startColumn": 90, -"endLine": 15, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 17, -"startColumn": 53, -"endLine": 17, -"endColumn": 54 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 22, -"startColumn": 90, -"endLine": 22, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 24, -"startColumn": 53, -"endLine": 24, -"endColumn": 54 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 25, -"startColumn": 87, -"endLine": 25, -"endColumn": 89 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 29, -"startColumn": 90, -"endLine": 29, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 31, -"startColumn": 53, -"endLine": 31, -"endColumn": 54 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 32, -"startColumn": 88, -"endLine": 32, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 36, -"startColumn": 90, -"endLine": 36, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '150' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 38, -"startColumn": 53, -"endLine": 38, -"endColumn": 56 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 39, -"startColumn": 89, -"endLine": 39, -"endColumn": 93 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 44, -"startColumn": 90, -"endLine": 44, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 46, -"startColumn": 53, -"endLine": 46, -"endColumn": 54 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 51, -"startColumn": 90, -"endLine": 51, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 53, -"startColumn": 53, -"endLine": 53, -"endColumn": 54 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 54, -"startColumn": 100, -"endLine": 54, -"endColumn": 102 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 58, -"startColumn": 90, -"endLine": 58, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '20' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 60, -"startColumn": 53, -"endLine": 60, -"endColumn": 55 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 61, -"startColumn": 101, -"endLine": 61, -"endColumn": 104 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 65, -"startColumn": 90, -"endLine": 65, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 67, -"startColumn": 53, -"endLine": 67, -"endColumn": 57 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 68, -"startColumn": 102, -"endLine": 68, -"endColumn": 106 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 73, -"startColumn": 90, -"endLine": 73, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 75, -"startColumn": 53, -"endLine": 75, -"endColumn": 54 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 80, -"startColumn": 90, -"endLine": 80, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 82, -"startColumn": 53, -"endLine": 82, -"endColumn": 54 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 83, -"startColumn": 110, -"endLine": 83, -"endColumn": 112 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 87, -"startColumn": 90, -"endLine": 87, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 89, -"startColumn": 53, -"endLine": 89, -"endColumn": 54 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 90, -"startColumn": 111, -"endLine": 90, -"endColumn": 114 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 94, -"startColumn": 97, -"endLine": 94, -"endColumn": 98 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 96, -"startColumn": 53, -"endLine": 96, -"endColumn": 54 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 97, -"startColumn": 112, -"endLine": 97, -"endColumn": 116 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 102, -"startColumn": 90, -"endLine": 102, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 104, -"startColumn": 53, -"endLine": 104, -"endColumn": 54 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 109, -"startColumn": 90, -"endLine": 109, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 111, -"startColumn": 53, -"endLine": 111, -"endColumn": 54 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 112, -"startColumn": 109, -"endLine": 112, -"endColumn": 111 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 116, -"startColumn": 90, -"endLine": 116, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 118, -"startColumn": 53, -"endLine": 118, -"endColumn": 54 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 119, -"startColumn": 110, -"endLine": 119, -"endColumn": 113 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 123, -"startColumn": 90, -"endLine": 123, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 125, -"startColumn": 53, -"endLine": 125, -"endColumn": 56 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", -"region": { -"startLine": 126, -"startColumn": 111, -"endLine": 126, -"endColumn": 115 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\InterpreterBenchmark.cs", -"region": { -"startLine": 21, -"startColumn": 90, -"endLine": 21, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '200' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\InterpreterBenchmark.cs", -"region": { -"startLine": 23, -"startColumn": 53, -"endLine": 23, -"endColumn": 56 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\InterpreterBenchmark.cs", -"region": { -"startLine": 28, -"startColumn": 90, -"endLine": 28, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\InterpreterBenchmark.cs", -"region": { -"startLine": 31, -"startColumn": 53, -"endLine": 31, -"endColumn": 57 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\InterpreterBenchmark.cs", -"region": { -"startLine": 32, -"startColumn": 82, -"endLine": 32, -"endColumn": 83 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\InterpreterBenchmark.cs", -"region": { -"startLine": 36, -"startColumn": 90, -"endLine": 36, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\InterpreterBenchmark.cs", -"region": { -"startLine": 39, -"startColumn": 53, -"endLine": 39, -"endColumn": 57 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\InterpreterBenchmark.cs", -"region": { -"startLine": 40, -"startColumn": 83, -"endLine": 40, -"endColumn": 85 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\IO\FileSourcesBenchmark.cs", -"region": { -"startLine": 49, -"startColumn": 71, -"endLine": 49, -"endColumn": 73 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '39062' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\IO\FileSourcesBenchmark.cs", -"region": { -"startLine": 49, -"startColumn": 76, -"endLine": 49, -"endColumn": 81 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\IO\FileSourcesBenchmark.cs", -"region": { -"startLine": 56, -"startColumn": 64, -"endLine": 56, -"endColumn": 65 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\IO\FileSourcesBenchmark.cs", -"region": { -"startLine": 64, -"startColumn": 51, -"endLine": 64, -"endColumn": 53 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2500' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\IO\FileSourcesBenchmark.cs", -"region": { -"startLine": 73, -"startColumn": 53, -"endLine": 73, -"endColumn": 57 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\IO\FileSourcesBenchmark.cs", -"region": { -"startLine": 83, -"startColumn": 53, -"endLine": 83, -"endColumn": 57 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\IO\FileSourcesBenchmark.cs", -"region": { -"startLine": 94, -"startColumn": 53, -"endLine": 94, -"endColumn": 57 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '8000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\IO\FileSourcesBenchmark.cs", -"region": { -"startLine": 104, -"startColumn": 53, -"endLine": 104, -"endColumn": 57 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\JsonFramingBenchmark.cs", -"region": { -"startLine": 38, -"startColumn": 34, -"endLine": 38, -"endColumn": 36 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\JsonFramingBenchmark.cs", -"region": { -"startLine": 38, -"startColumn": 86, -"endLine": 38, -"endColumn": 90 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '150000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\JsonFramingBenchmark.cs", -"region": { -"startLine": 39, -"startColumn": 87, -"endLine": 39, -"endColumn": 93 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\JsonFramingBenchmark.cs", -"region": { -"startLine": 50, -"startColumn": 34, -"endLine": 50, -"endColumn": 36 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\JsonFramingBenchmark.cs", -"region": { -"startLine": 50, -"startColumn": 86, -"endLine": 50, -"endColumn": 90 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '20000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\JsonFramingBenchmark.cs", -"region": { -"startLine": 51, -"startColumn": 87, -"endLine": 51, -"endColumn": 92 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", -"region": { -"startLine": 35, -"startColumn": 86, -"endLine": 35, -"endColumn": 87 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", -"region": { -"startLine": 38, -"startColumn": 90, -"endLine": 38, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", -"region": { -"startLine": 40, -"startColumn": 53, -"endLine": 40, -"endColumn": 54 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", -"region": { -"startLine": 45, -"startColumn": 90, -"endLine": 45, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", -"region": { -"startLine": 47, -"startColumn": 53, -"endLine": 47, -"endColumn": 54 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", -"region": { -"startLine": 48, -"startColumn": 62, -"endLine": 48, -"endColumn": 64 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", -"region": { -"startLine": 52, -"startColumn": 90, -"endLine": 52, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", -"region": { -"startLine": 54, -"startColumn": 53, -"endLine": 54, -"endColumn": 55 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", -"region": { -"startLine": 55, -"startColumn": 63, -"endLine": 55, -"endColumn": 66 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", -"region": { -"startLine": 59, -"startColumn": 90, -"endLine": 59, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '150' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", -"region": { -"startLine": 61, -"startColumn": 53, -"endLine": 61, -"endColumn": 56 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", -"region": { -"startLine": 62, -"startColumn": 64, -"endLine": 62, -"endColumn": 68 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", -"region": { -"startLine": 67, -"startColumn": 90, -"endLine": 67, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", -"region": { -"startLine": 69, -"startColumn": 53, -"endLine": 69, -"endColumn": 54 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", -"region": { -"startLine": 74, -"startColumn": 90, -"endLine": 74, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", -"region": { -"startLine": 76, -"startColumn": 53, -"endLine": 76, -"endColumn": 54 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", -"region": { -"startLine": 77, -"startColumn": 75, -"endLine": 77, -"endColumn": 77 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", -"region": { -"startLine": 81, -"startColumn": 90, -"endLine": 81, -"endColumn": 91 +"startLine": 90, +"startColumn": 111, +"endLine": 90, +"endColumn": 114 } } }, { "id": "S109", -"message": "Assign this magic number '20' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", "region": { -"startLine": 83, -"startColumn": 53, -"endLine": 83, -"endColumn": 55 +"startLine": 97, +"startColumn": 112, +"endLine": 97, +"endColumn": 116 } } }, { "id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", "region": { -"startLine": 84, -"startColumn": 76, -"endLine": 84, -"endColumn": 79 +"startLine": 112, +"startColumn": 109, +"endLine": 112, +"endColumn": 111 } } }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", "region": { -"startLine": 88, -"startColumn": 90, -"endLine": 88, -"endColumn": 91 +"startLine": 119, +"startColumn": 110, +"endLine": 119, +"endColumn": 113 } } }, @@ -2214,155 +472,155 @@ "id": "S109", "message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\GraphBuilderBenchmark.cs", "region": { -"startLine": 90, -"startColumn": 53, -"endLine": 90, -"endColumn": 57 +"startLine": 126, +"startColumn": 111, +"endLine": 126, +"endColumn": 115 } } }, { "id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\InterpreterBenchmark.cs", "region": { -"startLine": 91, -"startColumn": 77, -"endLine": 91, -"endColumn": 81 +"startLine": 32, +"startColumn": 82, +"endLine": 32, +"endColumn": 83 } } }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\InterpreterBenchmark.cs", "region": { -"startLine": 96, -"startColumn": 90, -"endLine": 96, -"endColumn": 91 +"startLine": 40, +"startColumn": 83, +"endLine": 40, +"endColumn": 85 } } }, { "id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\IO\FileSourcesBenchmark.cs", "region": { -"startLine": 98, -"startColumn": 53, -"endLine": 98, -"endColumn": 54 +"startLine": 49, +"startColumn": 71, +"endLine": 49, +"endColumn": 73 } } }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '39062' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\IO\FileSourcesBenchmark.cs", "region": { -"startLine": 103, -"startColumn": 90, -"endLine": 103, -"endColumn": 91 +"startLine": 49, +"startColumn": 76, +"endLine": 49, +"endColumn": 81 } } }, { "id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '150000' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\JsonFramingBenchmark.cs", "region": { -"startLine": 105, -"startColumn": 53, -"endLine": 105, -"endColumn": 54 +"startLine": 39, +"startColumn": 87, +"endLine": 39, +"endColumn": 93 } } }, { "id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '20000' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\JsonFramingBenchmark.cs", "region": { -"startLine": 106, -"startColumn": 85, -"endLine": 106, -"endColumn": 87 +"startLine": 51, +"startColumn": 87, +"endLine": 51, +"endColumn": 92 } } }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", "region": { -"startLine": 110, -"startColumn": 90, -"endLine": 110, -"endColumn": 91 +"startLine": 48, +"startColumn": 62, +"endLine": 48, +"endColumn": 64 } } }, { "id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", "region": { -"startLine": 112, -"startColumn": 53, -"endLine": 112, -"endColumn": 54 +"startLine": 55, +"startColumn": 63, +"endLine": 55, +"endColumn": 66 } } }, { "id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", "region": { -"startLine": 113, -"startColumn": 86, -"endLine": 113, -"endColumn": 89 +"startLine": 62, +"startColumn": 64, +"endLine": 62, +"endColumn": 68 } } }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", "region": { -"startLine": 117, -"startColumn": 90, -"endLine": 117, -"endColumn": 91 +"startLine": 77, +"startColumn": 75, +"endLine": 77, +"endColumn": 77 } } }, { "id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", "region": { -"startLine": 120, -"startColumn": 53, -"endLine": 120, -"endColumn": 57 +"startLine": 84, +"startColumn": 76, +"endLine": 84, +"endColumn": 79 } } }, @@ -2372,67 +630,54 @@ "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", "region": { -"startLine": 121, -"startColumn": 87, -"endLine": 121, -"endColumn": 91 +"startLine": 91, +"startColumn": 77, +"endLine": 91, +"endColumn": 81 } } }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", "region": { -"startLine": 126, -"startColumn": 90, -"endLine": 126, -"endColumn": 91 +"startLine": 106, +"startColumn": 85, +"endLine": 106, +"endColumn": 87 } } }, { "id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", "region": { -"startLine": 128, -"startColumn": 53, -"endLine": 128, -"endColumn": 54 +"startLine": 113, +"startColumn": 86, +"endLine": 113, +"endColumn": 89 } } }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", "region": { -"startLine": 133, -"startColumn": 90, -"endLine": 133, +"startLine": 121, +"startColumn": 87, +"endLine": 121, "endColumn": 91 } } }, { "id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", -"region": { -"startLine": 135, -"startColumn": 53, -"endLine": 135, -"endColumn": 54 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", @@ -2446,32 +691,6 @@ }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", -"region": { -"startLine": 140, -"startColumn": 90, -"endLine": 140, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", -"region": { -"startLine": 142, -"startColumn": 53, -"endLine": 142, -"endColumn": 55 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", @@ -2485,32 +704,6 @@ }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", -"region": { -"startLine": 147, -"startColumn": 97, -"endLine": 147, -"endColumn": 98 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", -"region": { -"startLine": 149, -"startColumn": 53, -"endLine": 149, -"endColumn": 56 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MaterializationBenchmark.cs", @@ -2521,97 +714,6 @@ "endColumn": 90 } } -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MergeManyBenchmark.cs", -"region": { -"startLine": 59, -"startColumn": 86, -"endLine": 59, -"endColumn": 87 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MergeManyBenchmark.cs", -"region": { -"startLine": 63, -"startColumn": 90, -"endLine": 63, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '200' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MergeManyBenchmark.cs", -"region": { -"startLine": 65, -"startColumn": 53, -"endLine": 65, -"endColumn": 56 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MergeManyBenchmark.cs", -"region": { -"startLine": 70, -"startColumn": 90, -"endLine": 70, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '500' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MergeManyBenchmark.cs", -"region": { -"startLine": 72, -"startColumn": 53, -"endLine": 72, -"endColumn": 56 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MergeManyBenchmark.cs", -"region": { -"startLine": 77, -"startColumn": 90, -"endLine": 77, -"endColumn": 91 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '600' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Streams.Tests.Performance\MergeManyBenchmark.cs", -"region": { -"startLine": 79, -"startColumn": 53, -"endLine": 79, -"endColumn": 56 -} -} } ] } diff --git a/analyzers/its/expected/akka.net/Akka.TestKit--netstandard2.0-S109.json b/analyzers/its/expected/akka.net/Akka.TestKit--netstandard2.0-S109.json deleted file mode 100644 index 4daff6e0c5a..00000000000 --- a/analyzers/its/expected/akka.net/Akka.TestKit--netstandard2.0-S109.json +++ /dev/null @@ -1,56 +0,0 @@ -{ -"issues": [ -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.TestKit\TestKitBase.cs", -"region": { -"startLine": 175, -"startColumn": 37, -"endLine": 175, -"endColumn": 38 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.TestKit\TestKitBase.cs", -"region": { -"startLine": 175, -"startColumn": 67, -"endLine": 175, -"endColumn": 69 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.TestKit\TestLatch.cs", -"region": { -"startLine": 45, -"startColumn": 44, -"endLine": 45, -"endColumn": 45 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.TestKit\TestLatch.cs", -"region": { -"startLine": 57, -"startColumn": 48, -"endLine": 57, -"endColumn": 49 -} -} -} -] -} diff --git a/analyzers/its/expected/akka.net/Akka.Tests.Performance--netcoreapp3.1-S109.json b/analyzers/its/expected/akka.net/Akka.Tests.Performance--netcoreapp3.1-S109.json index d67e8dc60b1..0baf8cc90e6 100644 --- a/analyzers/its/expected/akka.net/Akka.Tests.Performance--netcoreapp3.1-S109.json +++ b/analyzers/its/expected/akka.net/Akka.Tests.Performance--netcoreapp3.1-S109.json @@ -2,1223 +2,183 @@ "issues": [ { "id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorMemoryFootprintSpec.cs", -"region": { -"startLine": 75, -"startColumn": 162, -"endLine": 75, -"endColumn": 164 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorMemoryFootprintSpec.cs", -"region": { -"startLine": 87, -"startColumn": 151, -"endLine": 87, -"endColumn": 153 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorMemoryFootprintSpec.cs", -"region": { -"startLine": 99, -"startColumn": 151, -"endLine": 99, -"endColumn": 153 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorMemoryFootprintSpec.cs", -"region": { -"startLine": 114, -"startColumn": 59, -"endLine": 114, -"endColumn": 63 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorPathEqualitySpec.cs", -"region": { -"startLine": 35, -"startColumn": 64, -"endLine": 35, -"endColumn": 66 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorPathEqualitySpec.cs", -"region": { -"startLine": 35, -"startColumn": 90, -"endLine": 35, -"endColumn": 94 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorPathEqualitySpec.cs", -"region": { -"startLine": 49, -"startColumn": 64, -"endLine": 49, -"endColumn": 66 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorPathEqualitySpec.cs", -"region": { -"startLine": 49, -"startColumn": 90, -"endLine": 49, -"endColumn": 94 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorPathSpec.cs", -"region": { -"startLine": 31, -"startColumn": 64, -"endLine": 31, -"endColumn": 66 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorPathSpec.cs", -"region": { -"startLine": 31, -"startColumn": 90, -"endLine": 31, -"endColumn": 94 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorPathSpec.cs", -"region": { -"startLine": 43, -"startColumn": 64, -"endLine": 43, -"endColumn": 66 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorPathSpec.cs", -"region": { -"startLine": 43, -"startColumn": 90, -"endLine": 43, -"endColumn": 94 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorPathSpec.cs", -"region": { -"startLine": 55, -"startColumn": 64, -"endLine": 55, -"endColumn": 66 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorPathSpec.cs", -"region": { -"startLine": 55, -"startColumn": 90, -"endLine": 55, -"endColumn": 94 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorPathSpec.cs", -"region": { -"startLine": 68, -"startColumn": 64, -"endLine": 68, -"endColumn": 66 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorPathSpec.cs", -"region": { -"startLine": 68, -"startColumn": 90, -"endLine": 68, -"endColumn": 94 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorPathSpec.cs", -"region": { -"startLine": 81, -"startColumn": 64, -"endLine": 81, -"endColumn": 66 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorPathSpec.cs", -"region": { -"startLine": 81, -"startColumn": 90, -"endLine": 81, -"endColumn": 94 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorPathSpec.cs", -"region": { -"startLine": 94, -"startColumn": 64, -"endLine": 94, -"endColumn": 66 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorPathSpec.cs", -"region": { -"startLine": 94, -"startColumn": 90, -"endLine": 94, -"endColumn": 94 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorPathSpec.cs", -"region": { -"startLine": 107, -"startColumn": 64, -"endLine": 107, -"endColumn": 66 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorPathSpec.cs", -"region": { -"startLine": 107, -"startColumn": 90, -"endLine": 107, -"endColumn": 94 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorPathSpec.cs", -"region": { -"startLine": 121, -"startColumn": 64, -"endLine": 121, -"endColumn": 66 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorPathSpec.cs", -"region": { -"startLine": 121, -"startColumn": 90, -"endLine": 121, -"endColumn": 94 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorPathSpec.cs", -"region": { -"startLine": 133, -"startColumn": 64, -"endLine": 133, -"endColumn": 66 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorPathSpec.cs", -"region": { -"startLine": 133, -"startColumn": 90, -"endLine": 133, -"endColumn": 94 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorPathSpec.cs", -"region": { -"startLine": 141, -"startColumn": 33, -"endLine": 141, -"endColumn": 39 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorSelectionSpecs.cs", -"region": { -"startLine": 67, -"startColumn": 34, -"endLine": 67, -"endColumn": 36 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorSelectionSpecs.cs", -"region": { -"startLine": 67, -"startColumn": 90, -"endLine": 67, -"endColumn": 94 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorSelectionSpecs.cs", -"region": { -"startLine": 79, -"startColumn": 34, -"endLine": 79, -"endColumn": 36 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorSelectionSpecs.cs", -"region": { -"startLine": 94, -"startColumn": 34, -"endLine": 94, -"endColumn": 36 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorSelectionSpecs.cs", -"region": { -"startLine": 108, -"startColumn": 34, -"endLine": 108, -"endColumn": 36 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorSelectionSpecs.cs", -"region": { -"startLine": 108, -"startColumn": 90, -"endLine": 108, -"endColumn": 94 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorSelectionSpecs.cs", -"region": { -"startLine": 118, -"startColumn": 34, -"endLine": 118, -"endColumn": 36 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorSelectionSpecs.cs", -"region": { -"startLine": 118, -"startColumn": 90, -"endLine": 118, -"endColumn": 94 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorSystemShutdownSpec.cs", -"region": { -"startLine": 38, -"startColumn": 133, -"endLine": 38, -"endColumn": 135 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorSystemShutdownSpec.cs", -"region": { -"startLine": 48, -"startColumn": 53, -"endLine": 48, -"endColumn": 57 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '20000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorSystemShutdownSpec.cs", -"region": { -"startLine": 53, -"startColumn": 54, -"endLine": 53, -"endColumn": 59 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorSystemShutdownSpec.cs", -"region": { -"startLine": 60, -"startColumn": 55, -"endLine": 60, -"endColumn": 61 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '20' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorThroughputSpec.cs", -"region": { -"startLine": 43, -"startColumn": 53, -"endLine": 43, -"endColumn": 55 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '20' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorThroughputSpec.cs", -"region": { -"startLine": 96, -"startColumn": 49, -"endLine": 96, -"endColumn": 51 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '20' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorThroughputSpec.cs", -"region": { -"startLine": 137, -"startColumn": 82, -"endLine": 137, -"endColumn": 84 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '20' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorThroughputSpec.cs", -"region": { -"startLine": 138, -"startColumn": 83, -"endLine": 138, -"endColumn": 85 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorThroughputSpec.cs", -"region": { -"startLine": 218, -"startColumn": 145, -"endLine": 218, -"endColumn": 146 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorThroughputSpec.cs", -"region": { -"startLine": 219, -"startColumn": 117, -"endLine": 219, -"endColumn": 118 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorThroughputSpec.cs", -"region": { -"startLine": 220, -"startColumn": 117, -"endLine": 220, -"endColumn": 118 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorThroughputSpec.cs", -"region": { -"startLine": 226, -"startColumn": 64, -"endLine": 226, -"endColumn": 66 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorThroughputSpec.cs", -"region": { -"startLine": 227, -"startColumn": 35, -"endLine": 227, -"endColumn": 39 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorThroughputSpec.cs", -"region": { -"startLine": 244, -"startColumn": 64, -"endLine": 244, -"endColumn": 66 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorThroughputSpec.cs", -"region": { -"startLine": 245, -"startColumn": 35, -"endLine": 245, -"endColumn": 39 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorThroughputSpec.cs", -"region": { -"startLine": 262, -"startColumn": 64, -"endLine": 262, -"endColumn": 66 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorThroughputSpec.cs", -"region": { -"startLine": 263, -"startColumn": 35, -"endLine": 263, -"endColumn": 39 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorThroughputSpec.cs", -"region": { -"startLine": 280, -"startColumn": 64, -"endLine": 280, -"endColumn": 66 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorThroughputSpec.cs", -"region": { -"startLine": 281, -"startColumn": 35, -"endLine": 281, -"endColumn": 39 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorThroughputSpec.cs", -"region": { -"startLine": 299, -"startColumn": 58, -"endLine": 299, -"endColumn": 62 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\AddressSpec.cs", -"region": { -"startLine": 29, -"startColumn": 153, -"endLine": 29, -"endColumn": 155 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\AddressSpec.cs", -"region": { -"startLine": 29, -"startColumn": 179, -"endLine": 29, -"endColumn": 183 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\AddressSpec.cs", -"region": { -"startLine": 38, -"startColumn": 154, -"endLine": 38, -"endColumn": 156 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\AddressSpec.cs", -"region": { -"startLine": 38, -"startColumn": 180, -"endLine": 38, -"endColumn": 184 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\AddressSpec.cs", -"region": { -"startLine": 48, -"startColumn": 64, -"endLine": 48, -"endColumn": 66 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\AddressSpec.cs", -"region": { -"startLine": 48, -"startColumn": 90, -"endLine": 48, -"endColumn": 94 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '100000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\AddressSpec.cs", -"region": { -"startLine": 56, -"startColumn": 33, -"endLine": 56, -"endColumn": 39 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '9091' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\AddressSpec.cs", -"region": { -"startLine": 58, -"startColumn": 73, -"endLine": 58, -"endColumn": 77 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\Internal\ChildrenContainerSpec.cs", -"region": { -"startLine": 58, -"startColumn": 67, -"endLine": 58, -"endColumn": 69 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\Internal\ChildrenContainerSpec.cs", -"region": { -"startLine": 58, -"startColumn": 123, -"endLine": 58, -"endColumn": 127 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\Internal\ChildrenContainerSpec.cs", -"region": { -"startLine": 70, -"startColumn": 67, -"endLine": 70, -"endColumn": 69 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\Internal\ChildrenContainerSpec.cs", -"region": { -"startLine": 70, -"startColumn": 123, -"endLine": 70, -"endColumn": 127 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\Internal\ChildrenContainerSpec.cs", -"region": { -"startLine": 82, -"startColumn": 67, -"endLine": 82, -"endColumn": 69 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\Internal\ChildrenContainerSpec.cs", -"region": { -"startLine": 82, -"startColumn": 123, -"endLine": 82, -"endColumn": 127 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5000' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '100000' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\Pattern\AskSpec.cs", +"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorPathSpec.cs", "region": { -"startLine": 44, -"startColumn": 35, -"endLine": 44, +"startLine": 141, +"startColumn": 33, +"endLine": 141, "endColumn": 39 } } }, { "id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\Pattern\AskSpec.cs", -"region": { -"startLine": 44, -"startColumn": 62, -"endLine": 44, -"endColumn": 63 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\Scheduler\DefaultSchedulerPerformanceTests.cs", -"region": { -"startLine": 58, -"startColumn": 79, -"endLine": 58, -"endColumn": 81 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '40' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\Scheduler\DefaultSchedulerPerformanceTests.cs", -"region": { -"startLine": 61, -"startColumn": 34, -"endLine": 61, -"endColumn": 36 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Dispatch\DispatcherThroughputSpecBase.cs", -"region": { -"startLine": 74, -"startColumn": 154, -"endLine": 74, -"endColumn": 155 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Dispatch\GetMailboxTypeSpec.cs", -"region": { -"startLine": 46, -"startColumn": 163, -"endLine": 46, -"endColumn": 165 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Dispatch\GetMailboxTypeSpec.cs", -"region": { -"startLine": 62, -"startColumn": 59, -"endLine": 62, -"endColumn": 63 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Dispatch\MailboxBenchmarks.cs", -"region": { -"startLine": 44, -"startColumn": 45, -"endLine": 44, -"endColumn": 47 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1500' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Dispatch\MailboxBenchmarks.cs", -"region": { -"startLine": 44, -"startColumn": 134, -"endLine": 44, -"endColumn": 138 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Dispatch\MailboxBenchmarks.cs", -"region": { -"startLine": 52, -"startColumn": 45, -"endLine": 52, -"endColumn": 47 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1500' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Dispatch\MailboxBenchmarks.cs", -"region": { -"startLine": 52, -"startColumn": 134, -"endLine": 52, -"endColumn": 138 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Dispatch\MailboxBenchmarks.cs", +"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorSystemShutdownSpec.cs", "region": { -"startLine": 72, -"startColumn": 45, -"endLine": 72, -"endColumn": 47 +"startLine": 48, +"startColumn": 53, +"endLine": 48, +"endColumn": 57 } } }, { "id": "S109", -"message": "Assign this magic number '1500' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '20000' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Dispatch\MailboxBenchmarks.cs", +"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorSystemShutdownSpec.cs", "region": { -"startLine": 72, -"startColumn": 134, -"endLine": 72, -"endColumn": 138 +"startLine": 53, +"startColumn": 54, +"endLine": 53, +"endColumn": 59 } } }, { "id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '100000' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Dispatch\MailboxBenchmarks.cs", +"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorSystemShutdownSpec.cs", "region": { -"startLine": 80, -"startColumn": 45, -"endLine": 80, -"endColumn": 47 +"startLine": 60, +"startColumn": 55, +"endLine": 60, +"endColumn": 61 } } }, { "id": "S109", -"message": "Assign this magic number '1500' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '20' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Dispatch\MailboxBenchmarks.cs", +"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorThroughputSpec.cs", "region": { -"startLine": 80, -"startColumn": 134, -"endLine": 80, -"endColumn": 138 +"startLine": 43, +"startColumn": 53, +"endLine": 43, +"endColumn": 55 } } }, { "id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '20' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Dispatch\MailboxMemoryFootprintSpec.cs", +"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorThroughputSpec.cs", "region": { -"startLine": 52, -"startColumn": 162, -"endLine": 52, -"endColumn": 164 +"startLine": 96, +"startColumn": 49, +"endLine": 96, +"endColumn": 51 } } }, { "id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '20' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Dispatch\MailboxMemoryFootprintSpec.cs", +"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorThroughputSpec.cs", "region": { -"startLine": 64, -"startColumn": 166, -"endLine": 64, -"endColumn": 168 +"startLine": 137, +"startColumn": 82, +"endLine": 137, +"endColumn": 84 } } }, { "id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '20' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Dispatch\MailboxMemoryFootprintSpec.cs", +"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorThroughputSpec.cs", "region": { -"startLine": 76, -"startColumn": 164, -"endLine": 76, -"endColumn": 166 +"startLine": 138, +"startColumn": 83, +"endLine": 138, +"endColumn": 85 } } }, { "id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Dispatch\MailboxMemoryFootprintSpec.cs", +"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorThroughputSpec.cs", "region": { -"startLine": 88, -"startColumn": 164, -"endLine": 88, -"endColumn": 166 +"startLine": 218, +"startColumn": 145, +"endLine": 218, +"endColumn": 146 } } }, { "id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Dispatch\MessageDispatchAndReceiveBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorThroughputSpec.cs", "region": { -"startLine": 46, -"startColumn": 45, -"endLine": 46, -"endColumn": 47 +"startLine": 219, +"startColumn": 117, +"endLine": 219, +"endColumn": 118 } } }, { "id": "S109", -"message": "Assign this magic number '1500' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Dispatch\MessageDispatchAndReceiveBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\ActorThroughputSpec.cs", "region": { -"startLine": 46, -"startColumn": 134, -"endLine": 46, -"endColumn": 138 +"startLine": 220, +"startColumn": 117, +"endLine": 220, +"endColumn": 118 } } }, { "id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '100000' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Dispatch\ReceiveOnlyBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\AddressSpec.cs", "region": { "startLine": 56, -"startColumn": 45, +"startColumn": 33, "endLine": 56, -"endColumn": 47 +"endColumn": 39 } } }, { "id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Dispatch\ReceiveOnlyBenchmark.cs", +"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\Scheduler\DefaultSchedulerPerformanceTests.cs", "region": { -"startLine": 56, -"startColumn": 134, -"endLine": 56, -"endColumn": 138 +"startLine": 58, +"startColumn": 79, +"endLine": 58, +"endColumn": 81 } } }, { "id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", +"message": "Assign this magic number '40' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Event\EventStreamThroughputSpec.cs", +"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Actor\Scheduler\DefaultSchedulerPerformanceTests.cs", "region": { "startLine": 61, -"startColumn": 64, +"startColumn": 34, "endLine": 61, -"endColumn": 65 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Event\EventStreamThroughputSpec.cs", -"region": { -"startLine": 62, -"startColumn": 35, -"endLine": 62, -"endColumn": 39 +"endColumn": 36 } } }, @@ -1263,19 +223,6 @@ }, { "id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Util\SerializationBenchmarks.cs", -"region": { -"startLine": 32, -"startColumn": 75, -"endLine": 32, -"endColumn": 77 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '1000000' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\core\Akka.Tests.Performance\Util\SerializationBenchmarks.cs", @@ -1286,32 +233,6 @@ "endColumn": 40 } } -}, -{ -"id": "S109", -"message": "Assign this magic number '13' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Util\StandardOutWriterMemoryBenchmark.cs", -"region": { -"startLine": 39, -"startColumn": 34, -"endLine": 39, -"endColumn": 36 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '1000' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\core\Akka.Tests.Performance\Util\StandardOutWriterMemoryBenchmark.cs", -"region": { -"startLine": 39, -"startColumn": 93, -"endLine": 39, -"endColumn": 97 -} -} } ] } diff --git a/analyzers/its/expected/akka.net/ClusterSharding.Node--netcoreapp3.1-S109.json b/analyzers/its/expected/akka.net/ClusterSharding.Node--netcoreapp3.1-S109.json index 958449503f9..f275b2b5b0e 100644 --- a/analyzers/its/expected/akka.net/ClusterSharding.Node--netcoreapp3.1-S109.json +++ b/analyzers/its/expected/akka.net/ClusterSharding.Node--netcoreapp3.1-S109.json @@ -2,19 +2,6 @@ "issues": [ { "id": "S109", -"message": "Assign this magic number '60' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\examples\Cluster\ClusterSharding\ClusterSharding.Node\Customers.cs", -"region": { -"startLine": 47, -"startColumn": 52, -"endLine": 47, -"endColumn": 54 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '5000' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\examples\Cluster\ClusterSharding\ClusterSharding.Node\Program.cs", @@ -25,32 +12,6 @@ "endColumn": 30 } } -}, -{ -"id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\examples\Cluster\ClusterSharding\ClusterSharding.Node\Program.cs", -"region": { -"startLine": 108, -"startColumn": 79, -"endLine": 108, -"endColumn": 80 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\examples\Cluster\ClusterSharding\ClusterSharding.Node\Program.cs", -"region": { -"startLine": 108, -"startColumn": 104, -"endLine": 108, -"endColumn": 105 -} -} } ] } diff --git a/analyzers/its/expected/akka.net/PingPong--net471-S109.json b/analyzers/its/expected/akka.net/PingPong--net471-S109.json index fb729d69823..7566b64099f 100644 --- a/analyzers/its/expected/akka.net/PingPong--net471-S109.json +++ b/analyzers/its/expected/akka.net/PingPong--net471-S109.json @@ -145,32 +145,6 @@ }, { "id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\PingPong\Program.cs", -"region": { -"startLine": 197, -"startColumn": 54, -"endLine": 197, -"endColumn": 56 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\PingPong\Program.cs", -"region": { -"startLine": 240, -"startColumn": 33, -"endLine": 240, -"endColumn": 34 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\benchmark\PingPong\Program.cs", diff --git a/analyzers/its/expected/akka.net/PingPong--net5.0-S109.json b/analyzers/its/expected/akka.net/PingPong--net5.0-S109.json index fb729d69823..7566b64099f 100644 --- a/analyzers/its/expected/akka.net/PingPong--net5.0-S109.json +++ b/analyzers/its/expected/akka.net/PingPong--net5.0-S109.json @@ -145,32 +145,6 @@ }, { "id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\PingPong\Program.cs", -"region": { -"startLine": 197, -"startColumn": 54, -"endLine": 197, -"endColumn": 56 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\PingPong\Program.cs", -"region": { -"startLine": 240, -"startColumn": 33, -"endLine": 240, -"endColumn": 34 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\benchmark\PingPong\Program.cs", diff --git a/analyzers/its/expected/akka.net/PingPong--netcoreapp3.1-S109.json b/analyzers/its/expected/akka.net/PingPong--netcoreapp3.1-S109.json index fb729d69823..7566b64099f 100644 --- a/analyzers/its/expected/akka.net/PingPong--netcoreapp3.1-S109.json +++ b/analyzers/its/expected/akka.net/PingPong--netcoreapp3.1-S109.json @@ -145,32 +145,6 @@ }, { "id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\PingPong\Program.cs", -"region": { -"startLine": 197, -"startColumn": 54, -"endLine": 197, -"endColumn": 56 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\PingPong\Program.cs", -"region": { -"startLine": 240, -"startColumn": 33, -"endLine": 240, -"endColumn": 34 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\benchmark\PingPong\Program.cs", diff --git a/analyzers/its/expected/akka.net/RemotePingPong--net471-S109.json b/analyzers/its/expected/akka.net/RemotePingPong--net471-S109.json index e51419e368d..6363c128a59 100644 --- a/analyzers/its/expected/akka.net/RemotePingPong--net471-S109.json +++ b/analyzers/its/expected/akka.net/RemotePingPong--net471-S109.json @@ -129,19 +129,6 @@ "endColumn": 39 } } -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\RemotePingPong\Program.cs", -"region": { -"startLine": 221, -"startColumn": 33, -"endLine": 221, -"endColumn": 34 -} -} } ] } diff --git a/analyzers/its/expected/akka.net/RemotePingPong--net5.0-S109.json b/analyzers/its/expected/akka.net/RemotePingPong--net5.0-S109.json index e51419e368d..6363c128a59 100644 --- a/analyzers/its/expected/akka.net/RemotePingPong--net5.0-S109.json +++ b/analyzers/its/expected/akka.net/RemotePingPong--net5.0-S109.json @@ -129,19 +129,6 @@ "endColumn": 39 } } -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\RemotePingPong\Program.cs", -"region": { -"startLine": 221, -"startColumn": 33, -"endLine": 221, -"endColumn": 34 -} -} } ] } diff --git a/analyzers/its/expected/akka.net/RemotePingPong--netcoreapp3.1-S109.json b/analyzers/its/expected/akka.net/RemotePingPong--netcoreapp3.1-S109.json index e51419e368d..6363c128a59 100644 --- a/analyzers/its/expected/akka.net/RemotePingPong--netcoreapp3.1-S109.json +++ b/analyzers/its/expected/akka.net/RemotePingPong--netcoreapp3.1-S109.json @@ -129,19 +129,6 @@ "endColumn": 39 } } -}, -{ -"id": "S109", -"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\RemotePingPong\Program.cs", -"region": { -"startLine": 221, -"startColumn": 33, -"endLine": 221, -"endColumn": 34 -} -} } ] } diff --git a/analyzers/its/expected/akka.net/Samples.Cluster.AdaptiveGroup--netcoreapp3.1-S109.json b/analyzers/its/expected/akka.net/Samples.Cluster.AdaptiveGroup--netcoreapp3.1-S109.json deleted file mode 100644 index d266cec37c1..00000000000 --- a/analyzers/its/expected/akka.net/Samples.Cluster.AdaptiveGroup--netcoreapp3.1-S109.json +++ /dev/null @@ -1,17 +0,0 @@ -{ -"issues": [ -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\examples\Cluster\Metrics\Samples.Cluster.AdaptiveGroup\Program.cs", -"region": { -"startLine": 48, -"startColumn": 33, -"endLine": 48, -"endColumn": 35 -} -} -} -] -} diff --git a/analyzers/its/expected/akka.net/Samples.Cluster.Metrics.Common--netstandard2.0-S109.json b/analyzers/its/expected/akka.net/Samples.Cluster.Metrics.Common--netstandard2.0-S109.json index 66dff1870e4..a2682f87692 100644 --- a/analyzers/its/expected/akka.net/Samples.Cluster.Metrics.Common--netstandard2.0-S109.json +++ b/analyzers/its/expected/akka.net/Samples.Cluster.Metrics.Common--netstandard2.0-S109.json @@ -15,32 +15,6 @@ }, { "id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\examples\Cluster\Metrics\Samples.Cluster.Metrics.Common\FactorialFrontend.cs", -"region": { -"startLine": 45, -"startColumn": 29, -"endLine": 45, -"endColumn": 31 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '10' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\examples\Cluster\Metrics\Samples.Cluster.Metrics.Common\FactorialFrontend.cs", -"region": { -"startLine": 80, -"startColumn": 64, -"endLine": 80, -"endColumn": 66 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '1024' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\examples\Cluster\Metrics\Samples.Cluster.Metrics.Common\MetricListener.cs", diff --git a/analyzers/its/expected/akka.net/SpawnBenchmark--net471-S109.json b/analyzers/its/expected/akka.net/SpawnBenchmark--net471-S109.json index 3e8098b7b3a..2e42d9bb8e4 100644 --- a/analyzers/its/expected/akka.net/SpawnBenchmark--net471-S109.json +++ b/analyzers/its/expected/akka.net/SpawnBenchmark--net471-S109.json @@ -2,32 +2,6 @@ "issues": [ { "id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\SpawnBenchmark\Program.cs", -"region": { -"startLine": 25, -"startColumn": 46, -"endLine": 25, -"endColumn": 47 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '7' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\SpawnBenchmark\RootActor.cs", -"region": { -"startLine": 41, -"startColumn": 73, -"endLine": 41, -"endColumn": 74 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '9' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\benchmark\SpawnBenchmark\SpawnActor.cs", diff --git a/analyzers/its/expected/akka.net/SpawnBenchmark--net5.0-S109.json b/analyzers/its/expected/akka.net/SpawnBenchmark--net5.0-S109.json index 3e8098b7b3a..2e42d9bb8e4 100644 --- a/analyzers/its/expected/akka.net/SpawnBenchmark--net5.0-S109.json +++ b/analyzers/its/expected/akka.net/SpawnBenchmark--net5.0-S109.json @@ -2,32 +2,6 @@ "issues": [ { "id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\SpawnBenchmark\Program.cs", -"region": { -"startLine": 25, -"startColumn": 46, -"endLine": 25, -"endColumn": 47 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '7' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\SpawnBenchmark\RootActor.cs", -"region": { -"startLine": 41, -"startColumn": 73, -"endLine": 41, -"endColumn": 74 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '9' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\benchmark\SpawnBenchmark\SpawnActor.cs", diff --git a/analyzers/its/expected/akka.net/SpawnBenchmark--netcoreapp3.1-S109.json b/analyzers/its/expected/akka.net/SpawnBenchmark--netcoreapp3.1-S109.json index 3e8098b7b3a..2e42d9bb8e4 100644 --- a/analyzers/its/expected/akka.net/SpawnBenchmark--netcoreapp3.1-S109.json +++ b/analyzers/its/expected/akka.net/SpawnBenchmark--netcoreapp3.1-S109.json @@ -2,32 +2,6 @@ "issues": [ { "id": "S109", -"message": "Assign this magic number '5' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\SpawnBenchmark\Program.cs", -"region": { -"startLine": 25, -"startColumn": 46, -"endLine": 25, -"endColumn": 47 -} -} -}, -{ -"id": "S109", -"message": "Assign this magic number '7' to a well-named (variable|constant), and use the (variable|constant) instead.", -"location": { -"uri": "sources\akka.net\src\benchmark\SpawnBenchmark\RootActor.cs", -"region": { -"startLine": 41, -"startColumn": 73, -"endLine": 41, -"endColumn": 74 -} -} -}, -{ -"id": "S109", "message": "Assign this magic number '9' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\benchmark\SpawnBenchmark\SpawnActor.cs", From 907e0ffaec9e60ab312c98078b931e9a18ee0566 Mon Sep 17 00:00:00 2001 From: Andrei Epure Date: Wed, 12 Jan 2022 14:27:37 +0100 Subject: [PATCH 09/12] Restrict single digit comparison tolerance to collections only --- .../Rules/MagicNumberShouldNotBeUsed.cs | 21 ++++++++++--- .../TestCases/MagicNumberShouldNotBeUsed.cs | 31 ++++++++++++++++--- 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs b/analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs index e67df7e9da2..2f0288748a0 100644 --- a/analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs +++ b/analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs @@ -43,7 +43,7 @@ public sealed class MagicNumberShouldNotBeUsed : SonarDiagnosticAnalyzer private static readonly ISet NotConsideredAsMagicNumbers = new HashSet { "-1", "0", "1" }; - private static readonly string[] AcceptedNamesForSingleDigitComparison = { "size", "count", "length" }; + private static readonly string[] AcceptedCollectionMembersForSingleDigitComparison = { "Size", "Count", "Length" }; private static readonly SyntaxKind[] AllowedSingleDigitComparisons = { @@ -97,7 +97,7 @@ private static bool IsSingleDigitInToleratedComparisons(LiteralExpressionSyntax literalExpression.Parent is BinaryExpressionSyntax binaryExpression && IsSingleDigit(literalExpression.Token.ValueText) && binaryExpression.IsAnyKind(AllowedSingleDigitComparisons) - && ToStringContainsAnyAcceptedNames(binaryExpression); + && IsComparingCollectionSize(binaryExpression); private static bool IsToleratedArgument(LiteralExpressionSyntax literalExpression) => IsToleratedMethodArgument(literalExpression) @@ -121,10 +121,21 @@ literalExpression.Parent is AttributeArgumentSyntax arg private static bool IsSingleDigit(string text) => byte.TryParse(text, out var result) && result <= 9; - private static bool ToStringContainsAnyAcceptedNames(SyntaxNode syntaxNode) + // We allow single-digit comparisons when checking the size of a collection, which is usually done to access the first elements. + private static bool IsComparingCollectionSize(BinaryExpressionSyntax binaryComparisonToLiteral) { - var toString = syntaxNode.ToString().ToLower(); - return AcceptedNamesForSingleDigitComparison.Any(x => toString.Contains(x)); + var comparedToLiteral = binaryComparisonToLiteral.Left is LiteralExpressionSyntax ? binaryComparisonToLiteral.Right : binaryComparisonToLiteral.Left; + return GetMemberName(comparedToLiteral) is { } name + && AcceptedCollectionMembersForSingleDigitComparison.Contains(name); + + // we also allow LINQ Count() - the implementation is kept simple to avoid expensive SemanticModel calls + static string GetMemberName(SyntaxNode node) => + node switch + { + MemberAccessExpressionSyntax memberAccess => memberAccess.Name.Identifier.ValueText, + InvocationExpressionSyntax invocationExpressionSyntax => GetMemberName(invocationExpressionSyntax.Expression), + _ => null + }; } } } diff --git a/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs b/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs index 2cc7bfdbabd..d244e7dd816 100644 --- a/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs +++ b/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Tests.Diagnostics { @@ -18,6 +19,15 @@ public class FooBar public int COUNT { get; set; } public int length { get; set; } public int baz { get; set; } + public FooBar fooBar { get; set; } + public FooBar GetFooBar() => null; + public int Count() => 0; + public FooBar Length() => null; // for coverage + } + + public class Baz + { + public int Size() => 1; } public class ValidUseCases @@ -46,7 +56,7 @@ public static double FooProp2 public ValidUseCases(int x, int y) { } - public ValidUseCases(string s, FooBar foo) + public ValidUseCases(string s, FooBar foo, Baz baz) { int i1 = 0; int i2 = -1; @@ -66,14 +76,16 @@ public ValidUseCases(string s, FooBar foo) for (int i = 0; i < 0; i++) { } var result = list.Count == 1; // Compliant, single digit for Count - result = list.Count < 2; // Compliant, single digit for Count + result = list.Count < 2; // Compliant result = list.Count <= 2; // Compliant result = list.Count != 2; // Compliant result = list.Count > 2; // Compliant + result = list.Count() > 2; // Compliant result = s.Length == 3; // Compliant, single digit for Length result = foo.Size == 4; // Compliant, single digit for Size - result = foo.COUNT == 8; // Compliant - result = foo.length == 9; // Compliant + result = baz.Size() == 7; // tolerated FN + result = foo.fooBar.fooBar.fooBar.Size == 4; // Compliant + result = foo.GetFooBar().fooBar.fooBar.GetFooBar().Count() == 4; // possible FN, we don't check if Count() is from LINQ to be efficient WithTimeSpan(TimeSpan.FromDays(1), TimeSpan.FromMilliseconds(33)); // compliant @@ -155,6 +167,14 @@ public WrongUseCases(List list, string s, FooBar foo) result = foo.Size == 472; // Noncompliant result = foo.baz == 4; // Noncompliant result = s.Length == list.Count / 2 ; // Noncompliant FP - clear it's checking if it's half the list + + result = foo.COUNT == 8; // Noncompliant + result = foo.length == 9; // Noncompliant + result = GetCount() < 9; // Noncompliant + result = SizeOfSomething == 5; // Noncompliant + // for coverage + result = foo.Length().fooBar.length == 4; // Noncompliant + var x = 1; result = x == 2; // Noncompliant Foo(foo.Size + 41, s.Length - 43, list.Count * 2, list.Count / 8); // Noncompliant @@ -170,6 +190,9 @@ public int GetValue() return 13; // Noncompliant } + public int GetCount() => 1; + public int SizeOfSomething { get; } = 1; + public static void Foo(params int[] array) { } public static int Foo(int x, int y) => 1; public static void GetSomeFrom(int value) { } From fbdffa630a2df7422d96951d59d1eabe780c90b7 Mon Sep 17 00:00:00 2001 From: Andrei Epure Date: Wed, 12 Jan 2022 15:10:46 +0100 Subject: [PATCH 10/12] Update ITs --- .../its/expected/Nancy/Nancy--net452-S109.json | 13 +++++++++++++ .../expected/Nancy/Nancy--netstandard2.0-S109.json | 13 +++++++++++++ .../Akka.Cluster.Tools--netstandard2.0-S109.json | 13 +++++++++++++ .../Akka.DistributedData--netstandard2.0-S109.json | 13 +++++++++++++ .../akka.net/Akka.Streams--netstandard2.0-S109.json | 13 +++++++++++++ .../expected/akka.net/PingPong--net471-S109.json | 13 +++++++++++++ .../expected/akka.net/PingPong--net5.0-S109.json | 13 +++++++++++++ .../akka.net/PingPong--netcoreapp3.1-S109.json | 13 +++++++++++++ .../akka.net/RemotePingPong--net471-S109.json | 13 +++++++++++++ .../akka.net/RemotePingPong--net5.0-S109.json | 13 +++++++++++++ .../RemotePingPong--netcoreapp3.1-S109.json | 13 +++++++++++++ 11 files changed, 143 insertions(+) diff --git a/analyzers/its/expected/Nancy/Nancy--net452-S109.json b/analyzers/its/expected/Nancy/Nancy--net452-S109.json index 117a08dcfa6..3b97c92440f 100644 --- a/analyzers/its/expected/Nancy/Nancy--net452-S109.json +++ b/analyzers/its/expected/Nancy/Nancy--net452-S109.json @@ -838,6 +838,19 @@ "location": { "uri": "sources\Nancy\src\Nancy\ViewEngines\ResourceViewLocationProvider.cs", "region": { +"startLine": 173, +"startColumn": 36, +"endLine": 173, +"endColumn": 37 +} +} +}, +{ +"id": "S109", +"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", +"location": { +"uri": "sources\Nancy\src\Nancy\ViewEngines\ResourceViewLocationProvider.cs", +"region": { "startLine": 175, "startColumn": 59, "endLine": 175, diff --git a/analyzers/its/expected/Nancy/Nancy--netstandard2.0-S109.json b/analyzers/its/expected/Nancy/Nancy--netstandard2.0-S109.json index 117a08dcfa6..3b97c92440f 100644 --- a/analyzers/its/expected/Nancy/Nancy--netstandard2.0-S109.json +++ b/analyzers/its/expected/Nancy/Nancy--netstandard2.0-S109.json @@ -838,6 +838,19 @@ "location": { "uri": "sources\Nancy\src\Nancy\ViewEngines\ResourceViewLocationProvider.cs", "region": { +"startLine": 173, +"startColumn": 36, +"endLine": 173, +"endColumn": 37 +} +} +}, +{ +"id": "S109", +"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", +"location": { +"uri": "sources\Nancy\src\Nancy\ViewEngines\ResourceViewLocationProvider.cs", +"region": { "startLine": 175, "startColumn": 59, "endLine": 175, diff --git a/analyzers/its/expected/akka.net/Akka.Cluster.Tools--netstandard2.0-S109.json b/analyzers/its/expected/akka.net/Akka.Cluster.Tools--netstandard2.0-S109.json index 1aabebd42e5..cabc6f02184 100644 --- a/analyzers/its/expected/akka.net/Akka.Cluster.Tools--netstandard2.0-S109.json +++ b/analyzers/its/expected/akka.net/Akka.Cluster.Tools--netstandard2.0-S109.json @@ -77,6 +77,19 @@ "endColumn": 70 } } +}, +{ +"id": "S109", +"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"location": { +"uri": "sources\akka.net\src\contrib\cluster\Akka.Cluster.Tools\Singleton\ClusterSingletonManager.cs", +"region": { +"startLine": 1247, +"startColumn": 74, +"endLine": 1247, +"endColumn": 75 +} +} } ] } diff --git a/analyzers/its/expected/akka.net/Akka.DistributedData--netstandard2.0-S109.json b/analyzers/its/expected/akka.net/Akka.DistributedData--netstandard2.0-S109.json index 92cfc9b9f78..a5e1f0a98d7 100644 --- a/analyzers/its/expected/akka.net/Akka.DistributedData--netstandard2.0-S109.json +++ b/analyzers/its/expected/akka.net/Akka.DistributedData--netstandard2.0-S109.json @@ -155,6 +155,19 @@ "endColumn": 45 } } +}, +{ +"id": "S109", +"message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", +"location": { +"uri": "sources\akka.net\src\contrib\cluster\Akka.DistributedData\WriteAggregator.cs", +"region": { +"startLine": 196, +"startColumn": 25, +"endLine": 196, +"endColumn": 26 +} +} } ] } diff --git a/analyzers/its/expected/akka.net/Akka.Streams--netstandard2.0-S109.json b/analyzers/its/expected/akka.net/Akka.Streams--netstandard2.0-S109.json index 39be0668c55..bea1af6b89a 100644 --- a/analyzers/its/expected/akka.net/Akka.Streams--netstandard2.0-S109.json +++ b/analyzers/its/expected/akka.net/Akka.Streams--netstandard2.0-S109.json @@ -97,6 +97,19 @@ "location": { "uri": "sources\akka.net\src\core\Akka.Streams\Dsl\Framing.cs", "region": { +"startLine": 64, +"startColumn": 50, +"endLine": 64, +"endColumn": 51 +} +} +}, +{ +"id": "S109", +"message": "Assign this magic number '4' to a well-named (variable|constant), and use the (variable|constant) instead.", +"location": { +"uri": "sources\akka.net\src\core\Akka.Streams\Dsl\Framing.cs", +"region": { "startLine": 101, "startColumn": 32, "endLine": 101, diff --git a/analyzers/its/expected/akka.net/PingPong--net471-S109.json b/analyzers/its/expected/akka.net/PingPong--net471-S109.json index 7566b64099f..f2499aac580 100644 --- a/analyzers/its/expected/akka.net/PingPong--net471-S109.json +++ b/analyzers/its/expected/akka.net/PingPong--net471-S109.json @@ -145,6 +145,19 @@ }, { "id": "S109", +"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"location": { +"uri": "sources\akka.net\src\benchmark\PingPong\Program.cs", +"region": { +"startLine": 240, +"startColumn": 33, +"endLine": 240, +"endColumn": 34 +} +} +}, +{ +"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\benchmark\PingPong\Program.cs", diff --git a/analyzers/its/expected/akka.net/PingPong--net5.0-S109.json b/analyzers/its/expected/akka.net/PingPong--net5.0-S109.json index 7566b64099f..f2499aac580 100644 --- a/analyzers/its/expected/akka.net/PingPong--net5.0-S109.json +++ b/analyzers/its/expected/akka.net/PingPong--net5.0-S109.json @@ -145,6 +145,19 @@ }, { "id": "S109", +"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"location": { +"uri": "sources\akka.net\src\benchmark\PingPong\Program.cs", +"region": { +"startLine": 240, +"startColumn": 33, +"endLine": 240, +"endColumn": 34 +} +} +}, +{ +"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\benchmark\PingPong\Program.cs", diff --git a/analyzers/its/expected/akka.net/PingPong--netcoreapp3.1-S109.json b/analyzers/its/expected/akka.net/PingPong--netcoreapp3.1-S109.json index 7566b64099f..f2499aac580 100644 --- a/analyzers/its/expected/akka.net/PingPong--netcoreapp3.1-S109.json +++ b/analyzers/its/expected/akka.net/PingPong--netcoreapp3.1-S109.json @@ -145,6 +145,19 @@ }, { "id": "S109", +"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"location": { +"uri": "sources\akka.net\src\benchmark\PingPong\Program.cs", +"region": { +"startLine": 240, +"startColumn": 33, +"endLine": 240, +"endColumn": 34 +} +} +}, +{ +"id": "S109", "message": "Assign this magic number '2' to a well-named (variable|constant), and use the (variable|constant) instead.", "location": { "uri": "sources\akka.net\src\benchmark\PingPong\Program.cs", diff --git a/analyzers/its/expected/akka.net/RemotePingPong--net471-S109.json b/analyzers/its/expected/akka.net/RemotePingPong--net471-S109.json index 6363c128a59..e51419e368d 100644 --- a/analyzers/its/expected/akka.net/RemotePingPong--net471-S109.json +++ b/analyzers/its/expected/akka.net/RemotePingPong--net471-S109.json @@ -129,6 +129,19 @@ "endColumn": 39 } } +}, +{ +"id": "S109", +"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"location": { +"uri": "sources\akka.net\src\benchmark\RemotePingPong\Program.cs", +"region": { +"startLine": 221, +"startColumn": 33, +"endLine": 221, +"endColumn": 34 +} +} } ] } diff --git a/analyzers/its/expected/akka.net/RemotePingPong--net5.0-S109.json b/analyzers/its/expected/akka.net/RemotePingPong--net5.0-S109.json index 6363c128a59..e51419e368d 100644 --- a/analyzers/its/expected/akka.net/RemotePingPong--net5.0-S109.json +++ b/analyzers/its/expected/akka.net/RemotePingPong--net5.0-S109.json @@ -129,6 +129,19 @@ "endColumn": 39 } } +}, +{ +"id": "S109", +"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"location": { +"uri": "sources\akka.net\src\benchmark\RemotePingPong\Program.cs", +"region": { +"startLine": 221, +"startColumn": 33, +"endLine": 221, +"endColumn": 34 +} +} } ] } diff --git a/analyzers/its/expected/akka.net/RemotePingPong--netcoreapp3.1-S109.json b/analyzers/its/expected/akka.net/RemotePingPong--netcoreapp3.1-S109.json index 6363c128a59..e51419e368d 100644 --- a/analyzers/its/expected/akka.net/RemotePingPong--netcoreapp3.1-S109.json +++ b/analyzers/its/expected/akka.net/RemotePingPong--netcoreapp3.1-S109.json @@ -129,6 +129,19 @@ "endColumn": 39 } } +}, +{ +"id": "S109", +"message": "Assign this magic number '3' to a well-named (variable|constant), and use the (variable|constant) instead.", +"location": { +"uri": "sources\akka.net\src\benchmark\RemotePingPong\Program.cs", +"region": { +"startLine": 221, +"startColumn": 33, +"endLine": 221, +"endColumn": 34 +} +} } ] } From 20bfbae474808aaf741ff00679626f1fd2e61b98 Mon Sep 17 00:00:00 2001 From: Andrei Epure Date: Wed, 12 Jan 2022 15:19:45 +0100 Subject: [PATCH 11/12] Update RSPEC --- analyzers/rspec/cs/S109_c#.html | 9 ++++++++- .../SonarAnalyzer.Utilities/Rules.Description/S109.html | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/analyzers/rspec/cs/S109_c#.html b/analyzers/rspec/cs/S109_c#.html index 614e2386a14..76102b28ac0 100644 --- a/analyzers/rspec/cs/S109_c#.html +++ b/analyzers/rspec/cs/S109_c#.html @@ -27,5 +27,12 @@

Compliant Solution

}

Exceptions

-

This rule doesn’t raise an issue when the magic number is used as part of the GetHashCode method or a variable/field declaration.

+

This rule doesn’t raise an issue when the magic number is used as part of:

+
    +
  • the GetHashCode method
  • +
  • a variable/field declaration
  • +
  • the single argument of an attribute
  • +
  • a named argument for a method or attribute
  • +
  • a constructor call
  • +
diff --git a/analyzers/src/SonarAnalyzer.Utilities/Rules.Description/S109.html b/analyzers/src/SonarAnalyzer.Utilities/Rules.Description/S109.html index 614e2386a14..76102b28ac0 100644 --- a/analyzers/src/SonarAnalyzer.Utilities/Rules.Description/S109.html +++ b/analyzers/src/SonarAnalyzer.Utilities/Rules.Description/S109.html @@ -27,5 +27,12 @@

Compliant Solution

}

Exceptions

-

This rule doesn’t raise an issue when the magic number is used as part of the GetHashCode method or a variable/field declaration.

+

This rule doesn’t raise an issue when the magic number is used as part of:

+
    +
  • the GetHashCode method
  • +
  • a variable/field declaration
  • +
  • the single argument of an attribute
  • +
  • a named argument for a method or attribute
  • +
  • a constructor call
  • +
From 6044dd0d267fe91b8a2c32120045774c49c65924 Mon Sep 17 00:00:00 2001 From: Andrei Epure Date: Wed, 12 Jan 2022 15:40:43 +0100 Subject: [PATCH 12/12] Improve ccov --- .../TestCases/MagicNumberShouldNotBeUsed.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs b/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs index d244e7dd816..dc872999ae3 100644 --- a/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs +++ b/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/MagicNumberShouldNotBeUsed.cs @@ -78,6 +78,7 @@ public ValidUseCases(string s, FooBar foo, Baz baz) var result = list.Count == 1; // Compliant, single digit for Count result = list.Count < 2; // Compliant result = list.Count <= 2; // Compliant + result = 2 <= list.Count; // Compliant result = list.Count != 2; // Compliant result = list.Count > 2; // Compliant result = list.Count() > 2; // Compliant