A collection of C# libraries to assist with maintenance of complicated and evolving codebases.
C# attributes for Refactoring, including
PlannedRemovalandPlannedRefactor.C# analyzers for Refactoring, to generate warnings and track plans for future refactors.
See the refactoring example for an example.
-
Add both
DarkPatterns.Refactoring.AnnotationsandDarkPatterns.Refactoring.Analyzerspackages to your project. -
Track classes, methods, etc. that are planned for removal by adding
[PlannedRemoval("TICKET", "Explanation")]as needed.TICKETmay be anything that does not include a space;Explanationshould be a human-readable description about a recommended alternative. -
Warnings will be added for any usage of items planned for removal; if part of a public symbol, those also must be marked
PlannedRemovalwith their own explanation. If the usage is kept internal,PlannedRefactorcan be added instead, which does not propagate to other uses. -
Add a list of tickets to a
PlannedRefactoring.txtin the root of the project. The format of this file is one line per ticket, optionally with a space followed by an explanation.GH-1 Title of ticket GH-2 GH-3 Another title