Skip to content

Commit

Permalink
Merge pull request #959 from lean-ja/add-linter
Browse files Browse the repository at this point in the history
リンターオプションを追加する
  • Loading branch information
Seasawher authored Oct 7, 2024
2 parents 142f597 + 6901518 commit 767eb4c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
4 changes: 2 additions & 2 deletions LeanByExample/Reference/Tactic/Induction.lean
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ example (n : Nat) : fibonacci n = fib n := by

-- 帰納法の仮定から、`n` と `n + 1` については成り立つ
have ih_n := ih n
have ih_succ := ih $ n + 1
have ih_succ := ih (n + 1)

-- 帰納法の仮定を適用して示す
simp [ih_n, ih_succ]
Expand All @@ -146,7 +146,7 @@ theorem fib_eq (n : Nat) : fibonacci n = fib n := by

-- 帰納法の仮定から、`n` と `n + 1` については成り立つ
have ih_n := fib_eq n
have ih_succ := fib_eq $ n + 1
have ih_succ := fib_eq (n + 1)

-- 帰納法の仮定を適用して示す
simp [ih_n, ih_succ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class Semilatticeinf (α : Type) extends Inf α, PartialOrder α where
/-- `a ⊓ b` は `a`, `b` の下界の中で最大のもの -/
le_inf : ∀ a b c : α, c ≤ a → c ≤ b → c ≤ a ⊓ b

set_option structureDiamondWarning false in --#
/-- 束 -/
class Lattice (α : Type) extends SemilatticeSup α, Semilatticeinf α

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class Semilatticeinf (α : Type) extends Inf α, PartialOrder α where
/-- `a ⊓ b` は `a`, `b` の下界の中で最大のもの -/
le_inf : ∀ a b c : α, c ≤ a → c ≤ b → c ≤ a ⊓ b

set_option structureDiamondWarning false in --#
/-- 束 -/
class Lattice (α : Type) extends SemilatticeSup α, Semilatticeinf α

Expand Down
19 changes: 13 additions & 6 deletions lakefile.lean
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
import Lake
open Lake DSL

abbrev linterOptions : Array LeanOption := #[
`linter.flexible, true⟩,
`linter.oldObtain, true⟩,
`linter.style.cdot, true⟩,
`linter.style.dollarSyntax, true⟩,
`linter.style.missingEnd, true⟩,
`linter.style.lambdaSyntax, true⟩,
`structureDiamondWarning, true
]

package «Lean by Example» where
leanOptions := #[
`autoImplicit, false⟩,
`relaxedAutoImplicit, false⟩,
`weak.linter.flexible, true
]
moreServerOptions := #[
`linter.flexible, true
]
`relaxedAutoImplicit, false
] ++ linterOptions.map (fun s ↦ {s with name := `weak ++ s.name})
moreServerOptions := linterOptions

require «mk-exercise» from git
"https://github.com/Seasawher/mk-exercise.git" @ "main"
Expand Down

0 comments on commit 767eb4c

Please sign in to comment.