A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Suchiman/SerilogAnalyzer/issues/32 below:

False positive on String.Empty · Issue #32 · Suchiman/SerilogAnalyzer · GitHub

I'm moving old project from hand-written logger to Serilog. As a temporary solution, some of old usages were replaced with such code:

Although, formally, analyzer is right (String.Empty is not a constant) and this is actually a bad practice, it is clear that this field will never contain anything other than empty string. Shouldn't String.Empty case be exceptional? (and, may be, separate code smell rule to warn about empty string template?)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4