Skip to content

Commit

Permalink
New rule S6566: Always use DateTimeOffset instead of DateTime (#7523)
Browse files Browse the repository at this point in the history
  • Loading branch information
cristian-ambrosini-sonarsource authored Jul 5, 2023
1 parent cd7bec9 commit 553c5f6
Show file tree
Hide file tree
Showing 44 changed files with 2,966 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"issues": [
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Ember-MM\EmberAPI\clsAPICommon.vb",
"region": {
"startLine": 711,
"startColumn": 34,
"endLine": 711,
"endColumn": 70
}
}
},
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Ember-MM\EmberAPI\clsAPICommon.vb",
"region": {
"startLine": 716,
"startColumn": 34,
"endLine": 716,
"endColumn": 70
}
}
},
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Ember-MM\EmberAPI\clsAPIErrorLog.vb",
"region": {
"startLine": 60,
"startColumn": 63,
"endLine": 60,
"endColumn": 71
}
}
},
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Ember-MM\EmberAPI\clsAPIScanner.vb",
"region": {
"startLine": 32,
"startColumn": 30,
"endLine": 32,
"endColumn": 42
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"issues": [
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.Extractor\clsExtractor.vb",
"region": {
"startLine": 185,
"startColumn": 91,
"endLine": 185,
"endColumn": 99
}
}
},
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.Extractor\clsExtractor.vb",
"region": {
"startLine": 185,
"startColumn": 145,
"endLine": 185,
"endColumn": 153
}
}
},
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.Extractor\frmMovieExtractor.vb",
"region": {
"startLine": 31,
"startColumn": 67,
"endLine": 31,
"endColumn": 75
}
}
},
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.Extractor\frmMovieExtractor.vb",
"region": {
"startLine": 31,
"startColumn": 121,
"endLine": 31,
"endColumn": 129
}
}
},
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.Extractor\frmTVExtrator.vb",
"region": {
"startLine": 62,
"startColumn": 91,
"endLine": 62,
"endColumn": 99
}
}
},
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Ember-MM\Addons\generic.EmberCore.Extractor\frmTVExtrator.vb",
"region": {
"startLine": 62,
"startColumn": 145,
"endLine": 62,
"endColumn": 153
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"issues": [
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Ember-MM\Addons\scraper.EmberCore.XML\XMLScraper\MediaTags\MediaTag.vb",
"region": {
"startLine": 59,
"startColumn": 34,
"endLine": 59,
"endColumn": 42
}
}
},
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Ember-MM\Addons\scraper.EmberCore.XML\XMLScraper\ScraperLib\Scraper.vb",
"region": {
"startLine": 69,
"startColumn": 31,
"endLine": 69,
"endColumn": 39
}
}
},
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Ember-MM\Addons\scraper.EmberCore.XML\XMLScraper\ScraperLib\Scraper.vb",
"region": {
"startLine": 290,
"startColumn": 35,
"endLine": 290,
"endColumn": 43
}
}
},
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Ember-MM\Addons\scraper.EmberCore.XML\XMLScraper\ScraperLib\Scraper.vb",
"region": {
"startLine": 511,
"startColumn": 34,
"endLine": 511,
"endColumn": 42
}
}
}
]
}
69 changes: 69 additions & 0 deletions analyzers/its/expected/Nancy/Nancy--net452-S6566.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"issues": [
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Nancy\src\Nancy\Diagnostics\DiagnosticsHook.cs",
"region": {
"startLine": 169,
"startColumn": 106,
"endLine": 169,
"endColumn": 114
}
}
},
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Nancy\src\Nancy\Diagnostics\DiagnosticsHook.cs",
"region": {
"startLine": 207,
"startColumn": 30,
"endLine": 207,
"endColumn": 38
}
}
},
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Nancy\src\Nancy\Diagnostics\DiagnosticsHook.cs",
"region": {
"startLine": 283,
"startColumn": 26,
"endLine": 283,
"endColumn": 34
}
}
},
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Nancy\src\Nancy\Json\Simple\NancySerializationStrategy.cs",
"region": {
"startLine": 208,
"startColumn": 28,
"endLine": 208,
"endColumn": 76
}
}
},
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Nancy\src\Nancy\NancyEngine.cs",
"region": {
"startLine": 215,
"startColumn": 27,
"endLine": 215,
"endColumn": 35
}
}
}
]
}
69 changes: 69 additions & 0 deletions analyzers/its/expected/Nancy/Nancy--netstandard2.0-S6566.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"issues": [
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Nancy\src\Nancy\Diagnostics\DiagnosticsHook.cs",
"region": {
"startLine": 169,
"startColumn": 106,
"endLine": 169,
"endColumn": 114
}
}
},
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Nancy\src\Nancy\Diagnostics\DiagnosticsHook.cs",
"region": {
"startLine": 207,
"startColumn": 30,
"endLine": 207,
"endColumn": 38
}
}
},
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Nancy\src\Nancy\Diagnostics\DiagnosticsHook.cs",
"region": {
"startLine": 283,
"startColumn": 26,
"endLine": 283,
"endColumn": 34
}
}
},
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Nancy\src\Nancy\Json\Simple\NancySerializationStrategy.cs",
"region": {
"startLine": 208,
"startColumn": 28,
"endLine": 208,
"endColumn": 76
}
}
},
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Nancy\src\Nancy\NancyEngine.cs",
"region": {
"startLine": 215,
"startColumn": 27,
"endLine": 215,
"endColumn": 35
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"issues": [
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Nancy\src\Nancy.Authentication.Forms\FormsAuthentication.cs",
"region": {
"startLine": 301,
"startColumn": 120,
"endLine": 301,
"endColumn": 128
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"issues": [
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Nancy\src\Nancy.Authentication.Forms\FormsAuthentication.cs",
"region": {
"startLine": 301,
"startColumn": 120,
"endLine": 301,
"endColumn": 128
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"issues": [
{
"id": "S6566",
"message": "Prefer using "DateTimeOffset" instead of "DateTime"",
"location": {
"uri": "sources\Nancy\src\Nancy.ViewEngines.Spark\NancyViewFolder.cs",
"region": {
"startLine": 242,
"startColumn": 40,
"endLine": 242,
"endColumn": 48
}
}
}
]
}
Loading

0 comments on commit 553c5f6

Please sign in to comment.