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

SE: Maintenance: Cache GetHashCode for ProgramState #6983

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
1b0e653
SE - Nullable: Copy constraints to `Value` property (#6841)
pavel-mikula-sonarsource Mar 2, 2023
f2f03e9
SE - Nullable: Infer constraints for `HasValue` property (#6850)
pavel-mikula-sonarsource Mar 3, 2023
fa1d7eb
SE: Add ConstraintKind (#6148)
martin-strecker-sonarsource Mar 6, 2023
c3dd53e
SE - Nullable: Add `Null` constraint for empty nullable constructor (…
pavel-mikula-sonarsource Mar 6, 2023
2ee2f55
S3655: Prepare TestCases (#6844)
antonioaversa Mar 7, 2023
7f93aee
SE: Serialize Captures with prefix (#6881)
pavel-mikula-sonarsource Mar 8, 2023
54f7f60
SE - Nullable: Propagate constraints via nullable constructor (#6856)
pavel-mikula-sonarsource Mar 8, 2023
b3db7b0
SE - Nullable: Add UT for conversions (#6857)
pavel-mikula-sonarsource Mar 8, 2023
de89155
SE - Nullable: Change `PropertyReference` to branching processor (#6872)
pavel-mikula-sonarsource Mar 9, 2023
086f610
SE: Add SymbolicValueAssertions (#6034)
martin-strecker-sonarsource Mar 9, 2023
0d983f9
SE - Non-nullable value types: Add NonNullableValueTypeCheck (#6864)
martin-strecker-sonarsource Mar 10, 2023
33d3468
SE - Non-nullable value types: Keep NotNull constraint in branching (…
martin-strecker-sonarsource Mar 10, 2023
ee770d2
S3655: Scaffold rule and UTs (#6876)
antonioaversa Mar 10, 2023
ecaf932
SE - Nullable: Learn `ObjectConstraint` from branching on `nullable.H…
pavel-mikula-sonarsource Mar 13, 2023
1f24434
S3900: Clone and update UTs (#6901)
zsolt-kolbay-sonarsource Mar 13, 2023
f1abfff
SE - NonNullableValueTypes: SymbolicValue "True/False" also means "No…
martin-strecker-sonarsource Mar 13, 2023
e3045e8
S3655: Implement ShouldExecute (#6909)
antonioaversa Mar 13, 2023
a33b8fb
SE - Non-nullable value types: Indexer and Range support (#6867)
martin-strecker-sonarsource Mar 14, 2023
71f8a86
SE - Non-nullable value types: Add SizeOf tests (#6906)
martin-strecker-sonarsource Mar 14, 2023
eab512c
SE - Nullable: Learn object constraint from equals (#6923)
pavel-mikula-sonarsource Mar 15, 2023
f1a116e
Fix S2259 FP/FN: Do not raise on Nullable members (#6886)
Tim-Pohlmann Mar 15, 2023
a2ab60d
SE - Non-nullable value types: Make NonNullableValueTypeCheck a PostP…
martin-strecker-sonarsource Mar 15, 2023
2fda904
Fix SE: DictionaryContentHash is not stable to ordering (#6932)
martin-strecker-sonarsource Mar 15, 2023
fd91e97
Fix S2259 FN: Raise on fields and events (#6900)
Tim-Pohlmann Mar 15, 2023
b505b4c
SE - Property reference: Test case for auto properties are not learni…
martin-strecker-sonarsource Mar 16, 2023
d100351
SE - Nullable: Learn object constraint from value comparison (#6925)
pavel-mikula-sonarsource Mar 16, 2023
2924c63
S3900: Dummy rule implementation (#6917)
zsolt-kolbay-sonarsource Mar 17, 2023
f3eb4f6
SE - Non-nullable value types: Add support for constrained generics (…
martin-strecker-sonarsource Mar 17, 2023
322834d
SE: Migrate to new assertions - RoslynSymbolicExecutionTest.Branching…
pavel-mikula-sonarsource Mar 17, 2023
76557d3
SE - Nullable: Add support for `nullable.GetValueOrDefault()` (#6929)
pavel-mikula-sonarsource Mar 17, 2023
33afee7
SE - Non-nullable value types: Remove Enum constraint from IsStruct()…
martin-strecker-sonarsource Mar 21, 2023
36856f2
SE - Nullable: Learn NotNull from recursive pattern (#6955)
pavel-mikula-sonarsource Mar 21, 2023
6910c51
SE - Add cache for SymbolicValues (#6913)
martin-strecker-sonarsource Mar 21, 2023
0091261
S3655: Implement the rule (#6914)
antonioaversa Mar 21, 2023
94e7be8
S3655: ShouldExecute and FP on non-nullable value types (#6918)
antonioaversa Mar 22, 2023
b448080
New Rule S3655: Empty nullable value should not be accessed (#6934)
Tim-Pohlmann Mar 22, 2023
0fea9ff
SE - Nullable: Add support for nullable.Equals(arg) (#6961)
pavel-mikula-sonarsource Mar 23, 2023
6b64d27
SE: Make SymbolicValue ctor private. (#6978)
martin-strecker-sonarsource Mar 23, 2023
62d12bb
SE: Remove `SymbolicValue.This` (#6980)
martin-strecker-sonarsource Mar 23, 2023
1ccd425
SE: Maintenance: Unroll SymbolicCheckList.InvokeChecks (#6982)
martin-strecker-sonarsource Mar 24, 2023
b66b073
Fix S3655 FN: VB assignments (#6976)
Tim-Pohlmann Mar 24, 2023
7253a85
S2259: Support coalescing and conditional access (#6986)
pavel-mikula-sonarsource Mar 24, 2023
afcc682
SE - Nullable: Add UTs for Debug.Assert (#6956)
pavel-mikula-sonarsource Mar 27, 2023
f32bf03
SE: Enumerable ContentHash for ordered and unordered sets (#6979)
martin-strecker-sonarsource Mar 27, 2023
16f60fc
S3900: Basic rule implementation (#6969)
zsolt-kolbay-sonarsource Mar 27, 2023
d08d7ec
SE: Caching: Cache "GetHashCode" for SymbolicValue (#6968)
martin-strecker-sonarsource Mar 27, 2023
aa5dfac
S3900: ShouldExecute method (#6942)
zsolt-kolbay-sonarsource Mar 28, 2023
6cea08d
S3655: Deconstruction and null forgiving operator (#6962)
antonioaversa Mar 28, 2023
ba8a744
S3655: Out and ref parameters (#6967)
antonioaversa Mar 28, 2023
01a1787
Fix S3655 FN: VB implicit conversions (#6991)
Tim-Pohlmann Mar 28, 2023
aa64a7c
S3655: Fields with methods, local functions, yield and async (#6981)
antonioaversa Mar 28, 2023
daed2c1
S3655: Use IsNonNullableValueType (#6989)
antonioaversa Mar 28, 2023
f624ed5
Fix S2259 FP: Do not track symbol via TryCast (#6992)
pavel-mikula-sonarsource Mar 29, 2023
35a86f0
SE - Non-nullable value types: Set NotNull Constraint for tracked Sym…
martin-strecker-sonarsource Mar 29, 2023
9be9ba3
Fix S3900 FN: Conversion operations (#7002)
zsolt-kolbay-sonarsource Mar 29, 2023
d6211d9
S3655: Boxing (#6996)
antonioaversa Mar 30, 2023
79a26df
SE: Support ReferenceEquals (#7005)
pavel-mikula-sonarsource Mar 31, 2023
b4d6355
Fix S3900 and S2259 FN: Support method dereference (#7011)
pavel-mikula-sonarsource Mar 31, 2023
12c8b40
S3655: Static properties and fields called Value (#7000)
antonioaversa Mar 31, 2023
60dc3c5
S3900: Change parameter dereference check to top-down (#7004)
zsolt-kolbay-sonarsource Mar 31, 2023
508b279
SE: Maintenance: Allocation free hash code implementation for immutab…
martin-strecker-sonarsource Mar 31, 2023
baf2441
Add Caching for ProgramState hashcodes
martin-strecker-sonarsource Mar 23, 2023
53470a9
Adopt copy constructor
martin-strecker-sonarsource Mar 23, 2023
a82f7d1
Remove toArray reset.
martin-strecker-sonarsource Mar 23, 2023
980593d
Move private method to buttom
martin-strecker-sonarsource Mar 23, 2023
69dcecd
Delegate ctor
martin-strecker-sonarsource Mar 27, 2023
983f6ed
Remove comment
martin-strecker-sonarsource Mar 27, 2023
6664bf6
Null coalescing in copy constructor
martin-strecker-sonarsource Mar 27, 2023
8567e1c
Remove ContentDictionary
martin-strecker-sonarsource Mar 27, 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
363 changes: 344 additions & 19 deletions analyzers/its/expected/Automapper/AutoMapper--net461-S3900.json

Large diffs are not rendered by default.

363 changes: 344 additions & 19 deletions analyzers/its/expected/Automapper/AutoMapper--netstandard2.0-S3900.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@
},
{
"id": "S2259",
"message": "'MyTVShowRegExProfiles.Profiles.FirstOrDefault(Function(y) y.Name = lstProfiles.SelectedItems(0).Text)' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\Ember%20Media%20Manager\dlgTVRegExProfiles.vb",
"region": {
"startLine": 13,
"startColumn": 36,
"endLine": 13,
"endColumn": 137
}
}
},
{
"id": "S2259",
"message": "'Me.tLangList.FirstOrDefault(Function(l) l.ShortLang = Master.eSettings.TVDBLanguage)' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\Ember%20Media%20Manager\dlgWizard.vb",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,71 @@
"issues": [
{
"id": "S2259",
"message": "'_ComplexAdvancedSettings.FirstOrDefault(Function(f) f.Name = key AndAlso f.Section = Assembly)' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\EmberAPI\clsAdvancedSettings.vb",
"region": {
"startLine": 192,
"startColumn": 17,
"endLine": 192,
"endColumn": 111
}
}
},
{
"id": "S2259",
"message": "'_AdvancedSettings.FirstOrDefault(Function(f) f.Name = ii.@Name AndAlso f.Section = ii.@Section)' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\EmberAPI\clsAdvancedSettings.vb",
"region": {
"startLine": 215,
"startColumn": 25,
"endLine": 215,
"endColumn": 120
}
}
},
{
"id": "S2259",
"message": "'cs' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\EmberAPI\clsAdvancedSettings.vb",
"region": {
"startLine": 231,
"startColumn": 21,
"endLine": 231,
"endColumn": 23
}
}
},
{
"id": "S2259",
"message": "'_AdvancedSettings.FirstOrDefault(Function(f) f.Name = key AndAlso f.Section = Assembly)' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\EmberAPI\clsAdvancedSettings.vb",
"region": {
"startLine": 304,
"startColumn": 17,
"endLine": 304,
"endColumn": 104
}
}
},
{
"id": "S2259",
"message": "'_AdvancedSettings.FirstOrDefault(Function(f) f.Name = key AndAlso f.Section = Assembly)' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\EmberAPI\clsAdvancedSettings.vb",
"region": {
"startLine": 327,
"startColumn": 17,
"endLine": 327,
"endColumn": 104
}
}
},
{
"id": "S2259",
"message": "'_mediaDBConn' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\EmberAPI\clsAPIDatabase.vb",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,149 @@
"issues": [
{
"id": "S2259",
"message": "'r.values.FirstOrDefault(Function(y) y.value = v)' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.NMT\dlgNMTMovies.vb",
"region": {
"startLine": 166,
"startColumn": 97,
"endLine": 166,
"endColumn": 145
}
}
},
{
"id": "S2259",
"message": "'conf.Files.FirstOrDefault(Function(y) y.Process = True AndAlso y.Type = "movieindex")' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.NMT\dlgNMTMovies.vb",
"region": {
"startLine": 298,
"startColumn": 61,
"endLine": 298,
"endColumn": 146
}
}
},
{
"id": "S2259",
"message": "'conf.Files.FirstOrDefault(Function(y) y.Process = True AndAlso y.Type = "movie")' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.NMT\dlgNMTMovies.vb",
"region": {
"startLine": 299,
"startColumn": 68,
"endLine": 299,
"endColumn": 148
}
}
},
{
"id": "S2259",
"message": "'conf.Files.FirstOrDefault(Function(y) y.Process = True AndAlso y.Type = "movieindex")' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.NMT\dlgNMTMovies.vb",
"region": {
"startLine": 339,
"startColumn": 64,
"endLine": 339,
"endColumn": 149
}
}
},
{
"id": "S2259",
"message": "'conf.Files.FirstOrDefault(Function(y) y.Process = True AndAlso y.Type = "movie")' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.NMT\dlgNMTMovies.vb",
"region": {
"startLine": 341,
"startColumn": 85,
"endLine": 341,
"endColumn": 165
}
}
},
{
"id": "S2259",
"message": "'conf.Files.FirstOrDefault(Function(y) y.Process = True AndAlso y.Type = "tvindex")' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.NMT\dlgNMTMovies.vb",
"region": {
"startLine": 380,
"startColumn": 61,
"endLine": 380,
"endColumn": 143
}
}
},
{
"id": "S2259",
"message": "'conf.Files.FirstOrDefault(Function(y) y.Process = True AndAlso y.Type = "tvshow")' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.NMT\dlgNMTMovies.vb",
"region": {
"startLine": 381,
"startColumn": 72,
"endLine": 381,
"endColumn": 153
}
}
},
{
"id": "S2259",
"message": "'conf.Files.FirstOrDefault(Function(y) y.Process = True AndAlso y.Type = "tvseason")' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.NMT\dlgNMTMovies.vb",
"region": {
"startLine": 382,
"startColumn": 74,
"endLine": 382,
"endColumn": 157
}
}
},
{
"id": "S2259",
"message": "'conf.Files.FirstOrDefault(Function(y) y.Process = True AndAlso y.Type = "tvepisode")' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.NMT\dlgNMTMovies.vb",
"region": {
"startLine": 383,
"startColumn": 70,
"endLine": 383,
"endColumn": 154
}
}
},
{
"id": "S2259",
"message": "'conf.Files.FirstOrDefault(Function(y) y.Process = True AndAlso y.Type = "tvindex")' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.NMT\dlgNMTMovies.vb",
"region": {
"startLine": 413,
"startColumn": 64,
"endLine": 413,
"endColumn": 146
}
}
},
{
"id": "S2259",
"message": "'conf.Files.FirstOrDefault(Function(y) y.Process = True AndAlso y.Type = "tvshow")' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.NMT\dlgNMTMovies.vb",
"region": {
"startLine": 427,
"startColumn": 79,
"endLine": 427,
"endColumn": 160
}
}
},
{
"id": "S2259",
"message": "'mediaPath' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.NMT\dlgNMTMovies.vb",
Expand All @@ -12,6 +155,123 @@
"endColumn": 34
}
}
},
{
"id": "S2259",
"message": "'c.values.FirstOrDefault(Function(y) y.label = saved)' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.NMT\dlgNMTMovies.vb",
"region": {
"startLine": 960,
"startColumn": 42,
"endLine": 960,
"endColumn": 94
}
}
},
{
"id": "S2259",
"message": "'p' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.NMT\dlgNMTMovies.vb",
"region": {
"startLine": 998,
"startColumn": 13,
"endLine": 998,
"endColumn": 14
}
}
},
{
"id": "S2259",
"message": "'p.values.FirstOrDefault(Function(y) y.label = s)' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.NMT\dlgNMTMovies.vb",
"region": {
"startLine": 998,
"startColumn": 23,
"endLine": 998,
"endColumn": 71
}
}
},
{
"id": "S2259",
"message": "'conf.Files.FirstOrDefault(Function(y) y.Process = True AndAlso y.Type = "movieindex")' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.NMT\dlgNMTMovies.vb",
"region": {
"startLine": 1498,
"startColumn": 71,
"endLine": 1498,
"endColumn": 156
}
}
},
{
"id": "S2259",
"message": "'conf.Files.FirstOrDefault(Function(y) y.Process = True AndAlso y.Type = "movieindex")' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.NMT\dlgNMTMovies.vb",
"region": {
"startLine": 1498,
"startColumn": 168,
"endLine": 1498,
"endColumn": 253
}
}
},
{
"id": "S2259",
"message": "'conf.Files.FirstOrDefault(Function(y) y.Process = True AndAlso y.Type = "tvindex")' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.NMT\dlgNMTMovies.vb",
"region": {
"startLine": 1561,
"startColumn": 71,
"endLine": 1561,
"endColumn": 153
}
}
},
{
"id": "S2259",
"message": "'conf.Files.FirstOrDefault(Function(y) y.Process = True AndAlso y.Type = "tvindex")' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.NMT\dlgNMTMovies.vb",
"region": {
"startLine": 1561,
"startColumn": 165,
"endLine": 1561,
"endColumn": 247
}
}
},
{
"id": "S2259",
"message": "'conf.Params.FirstOrDefault(Function(y) y.name = dgvSettings.Rows(e.RowIndex).Cells(0).Value.ToString)' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.NMT\dlgNMTMovies.vb",
"region": {
"startLine": 1695,
"startColumn": 29,
"endLine": 1695,
"endColumn": 130
}
}
},
{
"id": "S2259",
"message": "'conf.Properties.FirstOrDefault(Function(y) y.name = dgvProperties.Rows(e.RowIndex).Tag.ToString)' is Nothing on at least one execution path.",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.NMT\dlgNMTMovies.vb",
"region": {
"startLine": 1706,
"startColumn": 29,
"endLine": 1706,
"endColumn": 125
}
}
}
]
}
Loading