Skip to content

Commit

Permalink
Fix S3254 FN: primary constructors (#8222)
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-strecker-sonarsource authored Oct 26, 2023
1 parent e319cbb commit 9ff001d
Show file tree
Hide file tree
Showing 20 changed files with 973 additions and 54 deletions.
78 changes: 78 additions & 0 deletions analyzers/its/expected/Nancy/Nancy--net452-S3254.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,58 @@
"issues": [
{
"id": "S3254",
"message": "Remove this default value assigned to parameter 'lifetime'.",
"location": {
"uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Nancy/src/Nancy/Bootstrapper/NancyBootstrapperWithRequestContainerBase.cs#L125",
"region": {
"startLine": 125,
"startColumn": 104,
"endLine": 125,
"endColumn": 122
}
}
},
{
"id": "S3254",
"message": "Remove this default value assigned to parameter 'lifetime'.",
"location": {
"uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Nancy/src/Nancy/Bootstrapper/NancyBootstrapperWithRequestContainerBase.cs#L134",
"region": {
"startLine": 134,
"startColumn": 145,
"endLine": 134,
"endColumn": 163
}
}
},
{
"id": "S3254",
"message": "Remove this default value assigned to parameter 'disableMethodNotAllowedResponses'.",
"location": {
"uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Nancy/src/Nancy/RouteConfiguration.cs#L12",
"region": {
"startLine": 12,
"startColumn": 13,
"endLine": 12,
"endColumn": 52
}
}
},
{
"id": "S3254",
"message": "Remove this default value assigned to parameter 'explicitHeadRouting'.",
"location": {
"uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Nancy/src/Nancy/RouteConfiguration.cs#L13",
"region": {
"startLine": 13,
"startColumn": 13,
"endLine": 13,
"endColumn": 39
}
}
},
{
"id": "S3254",
"message": "Remove this default value assigned to parameter 'httpsPort'.",
"location": {
"uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Nancy/src/Nancy/Security/ModuleSecurity.cs#L84",
Expand All @@ -12,6 +64,32 @@
"endColumn": 92
}
}
},
{
"id": "S3254",
"message": "Remove this default value assigned to parameter 'runtimeViewDiscovery'.",
"location": {
"uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Nancy/src/Nancy/ViewConfiguration.cs#L12",
"region": {
"startLine": 12,
"startColumn": 13,
"endLine": 12,
"endColumn": 40
}
}
},
{
"id": "S3254",
"message": "Remove this default value assigned to parameter 'runtimeViewUpdates'.",
"location": {
"uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Nancy/src/Nancy/ViewConfiguration.cs#L13",
"region": {
"startLine": 13,
"startColumn": 13,
"endLine": 13,
"endColumn": 38
}
}
}
]
}
78 changes: 78 additions & 0 deletions analyzers/its/expected/Nancy/Nancy--netstandard2.0-S3254.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,58 @@
"issues": [
{
"id": "S3254",
"message": "Remove this default value assigned to parameter 'lifetime'.",
"location": {
"uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Nancy/src/Nancy/Bootstrapper/NancyBootstrapperWithRequestContainerBase.cs#L125",
"region": {
"startLine": 125,
"startColumn": 104,
"endLine": 125,
"endColumn": 122
}
}
},
{
"id": "S3254",
"message": "Remove this default value assigned to parameter 'lifetime'.",
"location": {
"uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Nancy/src/Nancy/Bootstrapper/NancyBootstrapperWithRequestContainerBase.cs#L134",
"region": {
"startLine": 134,
"startColumn": 145,
"endLine": 134,
"endColumn": 163
}
}
},
{
"id": "S3254",
"message": "Remove this default value assigned to parameter 'disableMethodNotAllowedResponses'.",
"location": {
"uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Nancy/src/Nancy/RouteConfiguration.cs#L12",
"region": {
"startLine": 12,
"startColumn": 13,
"endLine": 12,
"endColumn": 52
}
}
},
{
"id": "S3254",
"message": "Remove this default value assigned to parameter 'explicitHeadRouting'.",
"location": {
"uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Nancy/src/Nancy/RouteConfiguration.cs#L13",
"region": {
"startLine": 13,
"startColumn": 13,
"endLine": 13,
"endColumn": 39
}
}
},
{
"id": "S3254",
"message": "Remove this default value assigned to parameter 'httpsPort'.",
"location": {
"uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Nancy/src/Nancy/Security/ModuleSecurity.cs#L84",
Expand All @@ -12,6 +64,32 @@
"endColumn": 92
}
}
},
{
"id": "S3254",
"message": "Remove this default value assigned to parameter 'runtimeViewDiscovery'.",
"location": {
"uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Nancy/src/Nancy/ViewConfiguration.cs#L12",
"region": {
"startLine": 12,
"startColumn": 13,
"endLine": 12,
"endColumn": 40
}
}
},
{
"id": "S3254",
"message": "Remove this default value assigned to parameter 'runtimeViewUpdates'.",
"location": {
"uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Nancy/src/Nancy/ViewConfiguration.cs#L13",
"region": {
"startLine": 13,
"startColumn": 13,
"endLine": 13,
"endColumn": 38
}
}
}
]
}
Loading

0 comments on commit 9ff001d

Please sign in to comment.