Skip to content

Commit

Permalink
Update BannedSymbols.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
NinjaCross authored Mar 17, 2022
1 parent c73a0bd commit 9ddb5a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Root/BannedSymbols.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
P:System.DateTime.Now;In a i18n-compliant system, it's almost never a good idea to use System.DateTime.Now. Please use System.DateTime.UtcNow instead. If you are sure you want to use System.DateTime.Now, use a '#pragma warning disable RS0030 / #pragma warning restore RS0030' directives pair
P:System.DateTime.Now;In a i18n-compliant system, it's almost never a good idea to use System.DateTime.Now. Please use System.DateTime.UtcNow instead. If you are sure you want to use System.DateTime.Now, use a '#pragma warning disable RS0030 / #pragma warning restore RS0030' directives pair
P:System.Threading.Tasks.Task.Id;The `Task.Id` property is rarely used, and in some scenarios it can be easily confused with the integer value returned by an invoked method. This is an example of possible misusage/confusion: `var expectedIntValue = MethodInvokedAsync().Id;` instead of `var expectedIntValue = (await MethodInvokedAsync()).Id;` or `var expectedIntValue = await MethodInvokedAsync();`. In this scenario `expectedIntValue` contains the value of the Id of the task instead of the legitimate value returned by the invoked method. If you are sure you want to use `Task.Id`, use a '#pragma warning disable RS0030 / #pragma warning restore RS0030' directives pair.

0 comments on commit 9ddb5a4

Please sign in to comment.