Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix S109 FP: named arguments, constructor calls, single-value attributes #5247

Merged
merged 12 commits into from
Jan 12, 2022
Merged
26 changes: 0 additions & 26 deletions analyzers/its/expected/Automapper/AutoMapper--net461-S109.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

This file was deleted.

195 changes: 0 additions & 195 deletions analyzers/its/expected/Nancy/Nancy--net452-S109.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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",
Expand All @@ -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,
Expand All @@ -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",
Expand Down Expand Up @@ -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,
Expand Down
Loading