Make doctor diagnostics optionally correctable
Overview
Right now, gdk doctor only points out potential problems or recommends improvements but some of them could be auto-correctable, similar to Rubocop offenses.
Impacted categories
The following categories relate to this issue:
-
gdk-reliability - e.g. When a GDK action fails to complete. -
gdk-usability - e.g. Improvements or suggestions around how the GDK functions. -
gdk-performance - e.g. When a GDK action is slow or times out.
Proposal (optional)
Allow running gdk doctor -C or gdk doctor --correct to apply recommendations or fix easily fixable problems.
Idea for diagnostics:
module GDK
module Diagnostic
class GitMaintenance < Base
# ...
def correctable?
true
end
def correct!
repos_without_git_maintenance.map do |path|
GDK::Shellout.new(%w[git maintenance start], chdir: path)
end
end
# ...
end
end
end
Edited by Kev Kloss