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

Improve S1144: highlight only identifiers #6679

Merged
merged 20 commits into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9373da5
Fix for #6321
zsolt-kolbay-sonarsource Jan 26, 2023
72ef5d9
Update Sarif files
zsolt-kolbay-sonarsource Jan 26, 2023
ca3a538
S1144 only highlights identifiers for every syntax node type
zsolt-kolbay-sonarsource Jan 27, 2023
278440f
Update sarif files again
zsolt-kolbay-sonarsource Jan 27, 2023
97d5d4b
Refactor identifier locator method and test cases
zsolt-kolbay-sonarsource Feb 1, 2023
cb675a1
Remove fading out of unused code
zsolt-kolbay-sonarsource Feb 1, 2023
08b8d1f
Remove fade out effect for S4487
zsolt-kolbay-sonarsource Feb 1, 2023
93f6c0d
Add FN test case for local functions
zsolt-kolbay-sonarsource Feb 1, 2023
8bcab93
Refactor GetIdentifierLocation
zsolt-kolbay-sonarsource Feb 1, 2023
9e31f17
Fix test case annotation
zsolt-kolbay-sonarsource Feb 2, 2023
66808e8
Add GetIdentifier support for local functions
zsolt-kolbay-sonarsource Feb 2, 2023
b4f60b9
Revert unintended change
zsolt-kolbay-sonarsource Feb 2, 2023
817cf54
Merge branch 'master' into Zsolt/S1144-FP-highlight-identifier
zsolt-kolbay-sonarsource Feb 2, 2023
aa46cfc
Update analyzers/tests/SonarAnalyzer.UnitTest/TestCases/UnusedPrivate…
zsolt-kolbay-sonarsource Feb 2, 2023
22551a0
Updated GetIdentifierLocation for indexers
zsolt-kolbay-sonarsource Feb 2, 2023
255e95c
Add more test cases for indexers
zsolt-kolbay-sonarsource Feb 2, 2023
fff75ee
Add test cases for expression bodies properties
zsolt-kolbay-sonarsource Feb 2, 2023
249ffb1
Update sarif file
zsolt-kolbay-sonarsource Feb 2, 2023
116828c
Add Indexer support to GetIdentifier method
zsolt-kolbay-sonarsource Feb 6, 2023
e4a8992
Add test cases for FN
zsolt-kolbay-sonarsource Feb 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"uri": "sources\GeneratedCode.CS\generated_region.cs",
"region": {
"startLine": 7,
"startColumn": 9,
"endLine": 13,
"endColumn": 10
"startColumn": 21,
"endLine": 7,
"endColumn": 27
}
}
},
Expand All @@ -20,9 +20,9 @@
"uri": "sources\GeneratedCode.CS\generated_region_2.cs",
"region": {
"startLine": 7,
"startColumn": 9,
"endLine": 13,
"endColumn": 10
"startColumn": 21,
"endLine": 7,
"endColumn": 27
}
}
},
Expand All @@ -33,9 +33,9 @@
"uri": "sources\GeneratedCode.CS\handwritten.cs",
"region": {
"startLine": 8,
"startColumn": 9,
"endLine": 12,
"endColumn": 10
"startColumn": 21,
"endLine": 8,
"endColumn": 27
}
}
},
Expand All @@ -46,9 +46,9 @@
"uri": "sources\GeneratedCode.CS\handwritten.cs",
"region": {
"startLine": 14,
"startColumn": 9,
"endLine": 16,
"endColumn": 10
"startColumn": 22,
"endLine": 14,
"endColumn": 25
}
}
}
Expand Down
24 changes: 12 additions & 12 deletions analyzers/its/expected/Nancy/Nancy--net452-S1144.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"uri": "sources\Nancy\src\Nancy\Bootstrapper\NancyBootstrapperLocator.cs",
"region": {
"startLine": 66,
"startColumn": 9,
"endLine": 82,
"endColumn": 10
"startColumn": 29,
"endLine": 66,
"endColumn": 47
}
}
},
Expand All @@ -20,9 +20,9 @@
"uri": "sources\Nancy\src\Nancy\Conventions\StaticContentConventionBuilder.cs",
"region": {
"startLine": 277,
"startColumn": 13,
"endLine": 280,
"endColumn": 14
"startColumn": 27,
"endLine": 277,
"endColumn": 35
}
}
},
Expand All @@ -33,9 +33,9 @@
"uri": "sources\Nancy\src\Nancy\Routing\DefaultRouteCacheProvider.cs",
"region": {
"startLine": 76,
"startColumn": 13,
"endLine": 93,
"endColumn": 14
"startColumn": 55,
"endLine": 76,
"endColumn": 67
}
}
},
Expand All @@ -46,9 +46,9 @@
"uri": "sources\Nancy\src\Nancy\TinyIoc\TinyIoC.cs",
"region": {
"startLine": 3843,
"startColumn": 9,
"endLine": 3846,
"endColumn": 10
"startColumn": 24,
"endLine": 3843,
"endColumn": 37
}
}
}
Expand Down
24 changes: 12 additions & 12 deletions analyzers/its/expected/Nancy/Nancy--netstandard2.0-S1144.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
"uri": "sources\Nancy\src\Nancy\Conventions\StaticContentConventionBuilder.cs",
"region": {
"startLine": 277,
"startColumn": 13,
"endLine": 280,
"endColumn": 14
"startColumn": 27,
"endLine": 277,
"endColumn": 35
}
}
},
Expand All @@ -33,9 +33,9 @@
"uri": "sources\Nancy\src\Nancy\Routing\DefaultRouteCacheProvider.cs",
"region": {
"startLine": 76,
"startColumn": 13,
"endLine": 93,
"endColumn": 14
"startColumn": 55,
"endLine": 76,
"endColumn": 67
}
}
},
Expand All @@ -46,9 +46,9 @@
"uri": "sources\Nancy\src\Nancy\TinyIoc\TinyIoC.cs",
"region": {
"startLine": 3350,
"startColumn": 9,
"endLine": 3372,
"endColumn": 10
"startColumn": 22,
"endLine": 3350,
"endColumn": 39
}
}
},
Expand All @@ -59,9 +59,9 @@
"uri": "sources\Nancy\src\Nancy\TinyIoc\TinyIoC.cs",
"region": {
"startLine": 3843,
"startColumn": 9,
"endLine": 3846,
"endColumn": 10
"startColumn": 24,
"endLine": 3843,
"endColumn": 37
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions analyzers/its/expected/Nancy/Nancy.Testing--net452-S1144.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"uri": "sources\Nancy\src\Nancy.Testing\ConfigurableBootstrapper.cs",
"region": {
"startLine": 189,
"startColumn": 9,
"endLine": 192,
"endColumn": 10
"startColumn": 31,
"endLine": 189,
"endColumn": 51
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"uri": "sources\Nancy\src\Nancy.Testing\ConfigurableBootstrapper.cs",
"region": {
"startLine": 189,
"startColumn": 9,
"endLine": 192,
"endColumn": 10
"startColumn": 31,
"endLine": 189,
"endColumn": 51
}
}
}
Expand Down
Loading