Skip to content
Dave Dunkin edited this page Jan 18, 2023 · 15 revisions

Faithlife.Analyzers contains the C# Roslyn analyzers used at Faithlife.

Currently available analyzers

  • FL0001 AsyncWorkItem.Current must only be used in methods that return IEnumerable
  • FL0002 Optional StringComparison arguments must always be specified
  • FL0003 UntilCanceled() may only be used in methods that return IEnumerable<AsyncAction>
  • FL0004 Use operator== or a non-ordinal StringComparison
  • FL0005 Avoid ToReadOnlyCollection in constructors
  • FL0006 Optional IComparer<string> arguments must always be specified
  • FL0007 Avoid $ in interpolated strings
  • FL0008 WorkState.None and WorkState.ToDo must not be used when an IWorkState is available
  • FL0009 Prefer "" over string.Empty
  • FL0010 Prefer modern language features over IfNotNull
  • FL0011 GetOrAddValue should not be used with ConcurrentDictionary
  • FL0012 DbConnector.Command should not be used with an interpolated string
  • FL0013 Do not use Uri.ToString()
  • FL0014 Interpolated strings should not be used without interpolation
  • FL0015 Prefer null-conditional operators over ternaries
  • FL0016 Verbatim strings should only be used with certain special characters
  • FL0017 Do not use a switch expression on a constant value
  • FL0018 Prefer string interpolation over FormatInvariant
Clone this wiki locally