-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix analyzer issue with properties with dot or space in name (#79)
- Loading branch information
Showing
6 changed files
with
59 additions
and
1 deletion.
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
12 changes: 12 additions & 0 deletions
12
test/data/Analyzers/PropertiesNamingAnalyzer/SerilogInvalidNamedPropertyWithDot.cs
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,12 @@ | ||
using Serilog; | ||
|
||
namespace ConsoleApp | ||
{ | ||
public static class Program | ||
{ | ||
public static void Main() | ||
{ | ||
Log.Logger.Information("{My.Property}", 1); | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
test/data/Analyzers/PropertiesNamingAnalyzer/SerilogInvalidNamedPropertyWithDot.cs.gold
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,15 @@ | ||
using Serilog; | ||
|
||
namespace ConsoleApp | ||
{ | ||
public static class Program | ||
{ | ||
public static void Main() | ||
{ | ||
Log.Logger.Information("|{My.Property}|(0)", 1); | ||
} | ||
} | ||
} | ||
|
||
--------------------------------------------------------- | ||
(0): ReSharper Warning: Property name 'My.Property' does not match naming rules. Suggested name is 'MyProperty'. |
12 changes: 12 additions & 0 deletions
12
test/data/Analyzers/PropertiesNamingAnalyzer/SerilogInvalidNamedPropertyWithSpace.cs
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,12 @@ | ||
using Serilog; | ||
|
||
namespace ConsoleApp | ||
{ | ||
public static class Program | ||
{ | ||
public static void Main() | ||
{ | ||
Log.Logger.Information("{My Property}", 1); | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
test/data/Analyzers/PropertiesNamingAnalyzer/SerilogInvalidNamedPropertyWithSpace.cs.gold
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,15 @@ | ||
using Serilog; | ||
|
||
namespace ConsoleApp | ||
{ | ||
public static class Program | ||
{ | ||
public static void Main() | ||
{ | ||
Log.Logger.Information("|{My Property}|(0)", 1); | ||
} | ||
} | ||
} | ||
|
||
--------------------------------------------------------- | ||
(0): ReSharper Warning: Property name 'My Property' does not match naming rules. Suggested name is 'MyProperty'. |
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