Skip to content

Commit

Permalink
Merge pull request #16 from Potapy4/patch-1
Browse files Browse the repository at this point in the history
Update unnecessary_code_rules.json
  • Loading branch information
KristofferStrube authored Apr 25, 2024
2 parents cbcc154 + ccf1409 commit 761ee00
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,14 @@
"// Unfixed",
"static double InvariantParseDouble(string stringValue)",
"{",
" double.TryParse(value, CultureInfo.InvariantCulture, out var value);",
" double.TryParse(stringValue, CultureInfo.InvariantCulture, out var value);",
" return value;",
"}",
"",
"// Fixed",
"static double InvariantParseDouble(string stringValue)",
"{",
" _ = double.TryParse(value, CultureInfo.InvariantCulture, out var value);",
" _ = double.TryParse(stringValue, CultureInfo.InvariantCulture, out var value);",
" return value;",
"}",
""
Expand All @@ -202,14 +202,14 @@
"// Unfixed",
"static double InvariantParseDouble(string stringValue)",
"{",
" double.TryParse(value, CultureInfo.InvariantCulture, out var value);",
" double.TryParse(stringValue, CultureInfo.InvariantCulture, out var value);",
" return value;",
"}",
"",
"// Fixed",
"static double InvariantParseDouble(string stringValue)",
"{",
" var unused = double.TryParse(value, CultureInfo.InvariantCulture, out var value);",
" var unused = double.TryParse(stringValue, CultureInfo.InvariantCulture, out var value);",
" return value;",
"}",
""
Expand All @@ -221,4 +221,4 @@
}
]
}
]
]

0 comments on commit 761ee00

Please sign in to comment.