Lean4
/-- A tactic analysis framework.
It is aimed at allowing developers to specify refactoring patterns,
which will be tested against a whole project,
to report proposed changes.
It hooks into the linting system to move through the infotree,
collecting tactic syntax and state to call the passes on.
-/
def tacticAnalysis : Linter where
run :=
withSetOptionIn fun stx => do
if (← get).messages.hasErrors then
return
let env ← getEnv
let configs := (tacticAnalysisExt.getState env).2
let trees ← getInfoTrees
runPasses configs stx trees