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

New rule S1133: Deprecated code should be removed #6669

Merged
merged 21 commits into from Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
913e3b5
Scaffolding after rspec script run
martin-strecker-sonarsource Jan 24, 2023
b9909c8
Fixes after scaffolding
martin-strecker-sonarsource Jan 24, 2023
55841aa
Add test cases
martin-strecker-sonarsource Jan 24, 2023
8071442
Improve tests
martin-strecker-sonarsource Jan 24, 2023
48c2e16
Update ITs
martin-strecker-sonarsource Jan 24, 2023
cb02f16
Unsued using
martin-strecker-sonarsource Jan 24, 2023
15e5c83
Formatting
martin-strecker-sonarsource Jan 24, 2023
1a2afe8
Fix code smell
martin-strecker-sonarsource Jan 25, 2023
6dc53a2
Add tests for attribute targets
martin-strecker-sonarsource Jan 31, 2023
fdcf083
Use `c.ContainingSymbol` as primary check.
martin-strecker-sonarsource Jan 31, 2023
5f8c18c
Do c.ContainingSymbol check in ObsoleteAttributesNeedExplanationBase …
martin-strecker-sonarsource Jan 31, 2023
38acf5f
Refactor tests
martin-strecker-sonarsource Jan 31, 2023
f3fa164
Add CS 10 test with top level statements and add support for it.
martin-strecker-sonarsource Jan 31, 2023
027d8a2
Formatting
martin-strecker-sonarsource Jan 31, 2023
41be4b2
Revert changes to ObsoleteAttributesNeedExplanationBase
martin-strecker-sonarsource Jan 31, 2023
b799618
Add test for local functions and fix the missing diagnostic
martin-strecker-sonarsource Jan 31, 2023
308b1da
Revert changes to ObsoleteAttributesNeedExplanationBase
martin-strecker-sonarsource Jan 31, 2023
b4b3cfe
Simplify test case
martin-strecker-sonarsource Jan 31, 2023
71e0078
Add VB attribute target tests.
martin-strecker-sonarsource Jan 31, 2023
6922f42
Formatting
martin-strecker-sonarsource Jan 31, 2023
81eaaab
Remove namespace in VB test
martin-strecker-sonarsource Feb 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -0,0 +1,173 @@
{
"issues": [
{
"id": "S1133",
"message": "Do not forget to remove this deprecated code someday.",
"location": {
"uri": "sources\Ember-MM\EmberAPI\clsAPIMediaContainers.vb",
"region": {
"startLine": 572,
"startColumn": 10,
"endLine": 572,
"endColumn": 80
}
}
},
{
"id": "S1133",
"message": "Do not forget to remove this deprecated code someday.",
"location": {
"uri": "sources\Ember-MM\EmberAPI\clsAPIMediaContainers.vb",
"region": {
"startLine": 583,
"startColumn": 10,
"endLine": 583,
"endColumn": 90
}
}
},
{
"id": "S1133",
"message": "Do not forget to remove this deprecated code someday.",
"location": {
"uri": "sources\Ember-MM\EmberAPI\clsAPIMediaContainers.vb",
"region": {
"startLine": 592,
"startColumn": 10,
"endLine": 592,
"endColumn": 98
}
}
},
{
"id": "S1133",
"message": "Do not forget to remove this deprecated code someday.",
"location": {
"uri": "sources\Ember-MM\EmberAPI\clsAPIMediaContainers.vb",
"region": {
"startLine": 686,
"startColumn": 10,
"endLine": 686,
"endColumn": 83
}
}
},
{
"id": "S1133",
"message": "Do not forget to remove this deprecated code someday.",
"location": {
"uri": "sources\Ember-MM\EmberAPI\clsAPIMediaContainers.vb",
"region": {
"startLine": 697,
"startColumn": 10,
"endLine": 697,
"endColumn": 89
}
}
},
{
"id": "S1133",
"message": "Do not forget to remove this deprecated code someday.",
"location": {
"uri": "sources\Ember-MM\EmberAPI\clsAPIMediaContainers.vb",
"region": {
"startLine": 705,
"startColumn": 10,
"endLine": 705,
"endColumn": 95
}
}
},
{
"id": "S1133",
"message": "Do not forget to remove this deprecated code someday.",
"location": {
"uri": "sources\Ember-MM\EmberAPI\clsAPIMediaContainers.vb",
"region": {
"startLine": 748,
"startColumn": 10,
"endLine": 748,
"endColumn": 98
}
}
},
{
"id": "S1133",
"message": "Do not forget to remove this deprecated code someday.",
"location": {
"uri": "sources\Ember-MM\EmberAPI\clsAPIMediaContainers.vb",
"region": {
"startLine": 760,
"startColumn": 10,
"endLine": 760,
"endColumn": 92
}
}
},
{
"id": "S1133",
"message": "Do not forget to remove this deprecated code someday.",
"location": {
"uri": "sources\Ember-MM\EmberAPI\clsAPIMediaContainers.vb",
"region": {
"startLine": 782,
"startColumn": 10,
"endLine": 782,
"endColumn": 95
}
}
},
{
"id": "S1133",
"message": "Do not forget to remove this deprecated code someday.",
"location": {
"uri": "sources\Ember-MM\EmberAPI\clsAPIMediaContainers.vb",
"region": {
"startLine": 794,
"startColumn": 10,
"endLine": 794,
"endColumn": 90
}
}
},
{
"id": "S1133",
"message": "Do not forget to remove this deprecated code someday.",
"location": {
"uri": "sources\Ember-MM\EmberAPI\clsAPIMediaContainers.vb",
"region": {
"startLine": 1543,
"startColumn": 10,
"endLine": 1543,
"endColumn": 84
}
}
},
{
"id": "S1133",
"message": "Do not forget to remove this deprecated code someday.",
"location": {
"uri": "sources\Ember-MM\EmberAPI\clsAPIMediaContainers.vb",
"region": {
"startLine": 1554,
"startColumn": 10,
"endLine": 1554,
"endColumn": 90
}
}
},
{
"id": "S1133",
"message": "Do not forget to remove this deprecated code someday.",
"location": {
"uri": "sources\Ember-MM\EmberAPI\clsAPIMediaContainers.vb",
"region": {
"startLine": 1562,
"startColumn": 10,
"endLine": 1562,
"endColumn": 96
}
}
}
]
}
17 changes: 17 additions & 0 deletions analyzers/its/expected/Net5/Net5--net5.0-S1133.json
@@ -0,0 +1,17 @@
{
"issues": [
{
"id": "S1133",
"message": "Do not forget to remove this deprecated code someday.",
"location": {
"uri": "sources\Net5\Net5\AttributesOnLocalFunctions.cs",
"region": {
"startLine": 11,
"startColumn": 14,
"endLine": 11,
"endColumn": 22
}
}
}
]
}
30 changes: 30 additions & 0 deletions analyzers/its/expected/Net7/Net7--net7.0-S1133.json
@@ -0,0 +1,30 @@
{
"issues": [
{
"id": "S1133",
"message": "Do not forget to remove this deprecated code someday.",
"location": {
"uri": "sources\Net7\Net7\features\ExtendedNameofScope.cs",
"region": {
"startLine": 5,
"startColumn": 10,
"endLine": 5,
"endColumn": 35
}
}
},
{
"id": "S1133",
"message": "Do not forget to remove this deprecated code someday.",
"location": {
"uri": "sources\Net7\Net7\features\ExtendedNameofScope.cs",
"region": {
"startLine": 11,
"startColumn": 10,
"endLine": 11,
"endColumn": 38
}
}
}
]
}