Skip to content

Commit 7cebe45

Browse files
authored
Add pre-commit hook (#6)
1 parent 89cfeb5 commit 7cebe45

4 files changed

Lines changed: 24 additions & 17 deletions

File tree

.pre-commit-config.yaml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
ci:
2-
skip: [runic]
3-
41
repos:
5-
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v6.0.0
2+
- repo: local
73
hooks:
8-
- id: check-merge-conflict
9-
- id: check-toml
10-
- id: check-yaml
11-
- id: end-of-file-fixer
12-
exclude_types: [markdown] # incompatible with Literate.jl
13-
14-
- repo: https://github.com/fredrikekre/runic-pre-commit
15-
rev: v2.0.1
16-
hooks:
17-
- id: runic
4+
- id: itensor-formatter
5+
name: "ITensor Formatter"
6+
entry: "itfmt"
7+
pass_filenames: true
8+
always_run: false
9+
types: [file]
10+
files: \.(jl|[jq]?md)$
11+
exclude: '^test/'
12+
language: "system"
13+
- repo: meta
14+
hooks:
15+
- id: check-hooks-apply
16+
- id: check-useless-excludes

.pre-commit-hooks.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
- id: itensor-formatter
2+
name: "ITensor Formatter"
3+
entry: "itfmt"
4+
pass_filenames: true
5+
always_run: false
6+
types: [file]
7+
files: \.(jl|[jq]?md)$
8+
language: "system"
9+
description: "Code formatter for the ITensor ecosystem built on Runic and JuliaFormatter."

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ITensorFormatter"
22
uuid = "b6bf39f1-c9d3-4bad-aad8-593d802f65fd"
3-
version = "0.2.4"
3+
version = "0.2.5"
44
authors = ["ITensor developers <support@itensor.org> and contributors"]
55

66
[workspace]

test/test_basics.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ end
146146
@test ret == 0
147147
end
148148
@test contains(output, "itfmt version")
149-
@test contains(output, string(pkgversion(ITensorFormatter)))
150149
end
151150

152151
@testset "unsupported option" begin

0 commit comments

Comments
 (0)