-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a false positive in LoggingTemplateMissingValuesAnalyzer (#81)
* - Don't enforce any regex inside of braces - Don't care about unbalanced braces * add changelog entry and release
- Loading branch information
Showing
4 changed files
with
34 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...ers.Tests/data/loggingtemplatemissingvalues/negative/No warnings for unbalanced braces.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module M | ||
|
||
open Microsoft.Extensions.Logging | ||
|
||
let testlog () = | ||
use factory = LoggerFactory.Create(fun b -> b.AddConsole() |> ignore) | ||
let logger: ILogger = factory.CreateLogger("Program") | ||
|
||
logger.LogDebug("Blah {xxx}} foo {yyy}", 23) |
11 changes: 11 additions & 0 deletions
11
...sts/data/loggingtemplatemissingvalues/negative/No warnings for unusual template names2.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module M | ||
|
||
open Microsoft.Extensions.Logging | ||
|
||
let testlog () = | ||
use factory = LoggerFactory.Create(fun b -> b.AddConsole() |> ignore) | ||
let logger: ILogger = factory.CreateLogger("Program") | ||
let someString = "someString" | ||
let someOtherString = "someOtherString" | ||
|
||
logger.LogDebug("Blah {s_thing:l} foo {s_other_thing:l}", someString, someOtherString) |