This PR implements a linter that warns when a deprecated coercion is applied. It also warns when the `Option` coercion or the `Subarray`-to-`Array` coercion is used in `Init` or `Std`. The linter is currently limited to `Coe` instances; `CoeFun` instances etc. are not considered. The linter works by collecting the `Coe` instance declaration names that are being expanded in `expandCoe?` and storing them in the info tree. The linter itself then analyzes the info tree and checks for banned or deprecated coercions.
20 lines
594 B
Text
20 lines
594 B
Text
/-
|
|
Copyright (c) 2022 Lars König. All rights reserved.
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
Authors: Lars König
|
|
-/
|
|
module
|
|
|
|
prelude
|
|
public import Lean.Linter.Util
|
|
public import Lean.Linter.Builtin
|
|
public import Lean.Linter.ConstructorAsVariable
|
|
public import Lean.Linter.Deprecated
|
|
public import Lean.Linter.DocsOnAlt
|
|
public import Lean.Linter.UnusedVariables
|
|
public import Lean.Linter.MissingDocs
|
|
public import Lean.Linter.Omit
|
|
public import Lean.Linter.List
|
|
public import Lean.Linter.Sets
|
|
public import Lean.Linter.UnusedSimpArgs
|
|
public import Lean.Linter.Coe
|