Skip to content

Commit a9b2f79

Browse files
authored
Update pre-commit hook and formatting (#79)
1 parent 543f880 commit a9b2f79

File tree

5 files changed

+23
-13
lines changed

5 files changed

+23
-13
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
ci:
2+
skip: [julia-formatter]
3+
14
repos:
25
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.5.0
6+
rev: v5.0.0
47
hooks:
58
- id: check-merge-conflict
69
- id: check-toml
@@ -11,6 +14,6 @@ repos:
1114
exclude_types: [markdown] # incompatible with Literate.jl
1215

1316
- repo: "https://github.com/domluna/JuliaFormatter.jl"
14-
rev: v1.0.62
17+
rev: v2.1.0
1518
hooks:
1619
- id: "julia-formatter"

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ITensorPkgSkeleton"
22
uuid = "3d388ab1-018a-49f4-ae50-18094d5f71ea"
33
authors = ["ITensor developers <support@itensor.org> and contributors"]
4-
version = "0.3.14"
4+
version = "0.3.15"
55

66
[deps]
77
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
ci:
2+
skip: [julia-formatter]
3+
14
repos:
25
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.5.0
6+
rev: v5.0.0
47
hooks:
58
- id: check-merge-conflict
69
- id: check-toml
@@ -9,6 +12,6 @@ repos:
912
exclude_types: [markdown] # incompatible with Literate.jl
1013

1114
- repo: "https://github.com/domluna/JuliaFormatter.jl"
12-
rev: v1.0.62
15+
rev: v2.1.0
1316
hooks:
1417
- id: "julia-formatter"

templates/test/test/runtests.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ const GROUP = uppercase(
1414
)
1515

1616
"match files of the form `test_*.jl`, but exclude `*setup*.jl`"
17-
istestfile(fn) =
18-
endswith(fn, ".jl") && startswith(basename(fn), "test_") && !contains(fn, "setup")
17+
function istestfile(fn)
18+
return endswith(fn, ".jl") && startswith(basename(fn), "test_") && !contains(fn, "setup")
19+
end
1920
"match files of the form `*.jl`, but exclude `*_notest.jl` and `*setup*.jl`"
20-
isexamplefile(fn) =
21-
endswith(fn, ".jl") && !endswith(fn, "_notest.jl") && !contains(fn, "setup")
21+
function isexamplefile(fn)
22+
return endswith(fn, ".jl") && !endswith(fn, "_notest.jl") && !contains(fn, "setup")
23+
end
2224

2325
@time begin
2426
# tests in groups based on folder structure

test/runtests.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ const GROUP = uppercase(
1414
)
1515

1616
"match files of the form `test_*.jl`, but exclude `*setup*.jl`"
17-
istestfile(fn) =
18-
endswith(fn, ".jl") && startswith(basename(fn), "test_") && !contains(fn, "setup")
17+
function istestfile(fn)
18+
return endswith(fn, ".jl") && startswith(basename(fn), "test_") && !contains(fn, "setup")
19+
end
1920
"match files of the form `*.jl`, but exclude `*_notest.jl` and `*setup*.jl`"
20-
isexamplefile(fn) =
21-
endswith(fn, ".jl") && !endswith(fn, "_notest.jl") && !contains(fn, "setup")
21+
function isexamplefile(fn)
22+
return endswith(fn, ".jl") && !endswith(fn, "_notest.jl") && !contains(fn, "setup")
23+
end
2224

2325
@time begin
2426
# tests in groups based on folder structure

0 commit comments

Comments
 (0)