Redundancy code quality

Proprietary

Remove redundant code from C# sources.

OpenRewrite.Recipes.CSharp.CodeQuality.Redundancy.RedundancyCodeQuality
mod run . --recipe=OpenRewrite.Recipes.CSharp.CodeQuality.Redundancy.RedundancyCodeQuality

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Remove redundant ToString() call
  2. Use rethrow instead of throw ex
  3. Remove empty finally clause
  4. Remove unnecessary else clause
  5. Remove redundant ToCharArray() call
  6. Remove redundant parentheses
  7. Remove redundant cast
  8. Remove redundant default field initialization
  9. Remove redundant base constructor call
  10. Remove redundant sealed modifier
  11. Find empty catch clause
  12. Remove empty foreach body
  13. Remove empty while body
  14. Remove redundant async/await
  15. Remove unused member declaration
  16. Remove redundant overriding member
  17. Remove redundant Dispose/Close call
  18. Remove redundant region
  19. Flag empty for loop body
  20. Remove empty destructor
  21. Remove redundant auto-property initialization
  22. Remove redundant statement
  23. Remove redundant delegate creation
  24. Remove redundant assignment
  25. Remove unnecessary interpolated string
  26. Remove redundant catch block
  27. Remove unnecessary case label
  28. Remove redundant default switch section
  29. Remove redundant base interface
  30. Remove unnecessary unsafe context
  31. Remove unnecessary null-forgiving operator
  32. Find empty syntax
  33. Remove partial modifier from single-part type
  34. Remove enum default underlying type
  35. Remove argument list from attribute
  36. Remove redundant as operator
  37. Remove unnecessary verbatim string literal
  38. Remove unnecessary null check
  39. Remove unnecessary raw string literal
  40. Remove redundant constructor
  41. Unused 'this' parameter
  42. Unused element in documentation comment
  43. Unnecessary enum flag
  44. Remove redundant 'sealed' modifier from override
  45. Remove unnecessary semicolon at end of declaration
  46. File contains no code
  47. Unnecessary interpolation
  48. Resource can be disposed asynchronously
  49. Remove explicit 'class' from record
  50. Find internal types that may be unused