Skip to content

Commit 471d3d3

Browse files
committed
chore: add pre-commit hooks
1 parent 296ea9c commit 471d3d3

17 files changed

Lines changed: 37 additions & 33 deletions

File tree

.buildkite/pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ steps:
88
agents:
99
queue: "juliagpu"
1010
cuda: "*"
11-
timeout_in_minutes: 60
11+
timeout_in_minutes: 60

.github/workflows/CompatHelper.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ jobs:
4242
env:
4343
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4444
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
45-
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}
45+
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}

.github/workflows/Documentation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1616

1717
jobs:
18-
18+
1919
docs:
2020
name: ${{ matrix.pkg.shortcut }}
2121
runs-on: ubuntu-latest
@@ -33,7 +33,7 @@ jobs:
3333
- name: DifferentiationInterfaceTest
3434
shortcut: DIT
3535
dir: './DifferentiationInterfaceTest'
36-
36+
3737
steps:
3838
- uses: actions/checkout@v4
3939
- uses: julia-actions/setup-julia@v2

.github/workflows/Register.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ jobs:
1313
steps:
1414
- uses: julia-actions/RegisterAction@latest
1515
with:
16-
token: ${{ secrets.GITHUB_TOKEN }}
16+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/TagBot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ jobs:
3636
with:
3737
token: ${{ secrets.GITHUB_TOKEN }}
3838
ssh: ${{ secrets.DOCUMENTER_KEY }}
39-
subdir: DifferentiationInterfaceTest
39+
subdir: DifferentiationInterfaceTest

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
*.csv
1212

1313
playground.jl
14-
.vscode
14+
.vscode

.pre-commit-config.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v3.2.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-added-large-files
9+
- repo: "https://github.com/domluna/JuliaFormatter.jl"
10+
rev: "v2.1.6" # or whatever the desired release is
11+
hooks:
12+
- id: "julia-formatter"
13+
fail_fast: true

DifferentiationInterface/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9393
[#790]: https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/790
9494
[#788]: https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/788
9595
[#782]: https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/782
96-
[#768]: https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/768
96+
[#768]: https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/768

DifferentiationInterface/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Pkg.add(
7373

7474
```julia
7575
using DifferentiationInterface
76-
import ForwardDiff, Enzyme, Zygote # AD backends you want to use
76+
import ForwardDiff, Enzyme, Zygote # AD backends you want to use
7777

7878
f(x) = sum(abs2, x)
7979

@@ -97,23 +97,23 @@ You can use the provided [`CITATION.cff`](https://github.com/JuliaDiff/Different
9797

9898
```bibtex
9999
@misc{dalle2025commoninterfaceautomaticdifferentiation,
100-
title={A Common Interface for Automatic Differentiation},
100+
title={A Common Interface for Automatic Differentiation},
101101
author={Guillaume Dalle and Adrian Hill},
102102
year={2025},
103103
eprint={2505.05542},
104104
archivePrefix={arXiv},
105105
primaryClass={cs.MS},
106-
url={https://arxiv.org/abs/2505.05542},
106+
url={https://arxiv.org/abs/2505.05542},
107107
}
108108
109109
@misc{schäfer2022abstractdifferentiationjlbackendagnosticdifferentiableprogramming,
110-
title={AbstractDifferentiation.jl: Backend-Agnostic Differentiable Programming in Julia},
110+
title={AbstractDifferentiation.jl: Backend-Agnostic Differentiable Programming in Julia},
111111
author={Frank Schäfer and Mohamed Tarek and Lyndon White and Chris Rackauckas},
112112
year={2022},
113113
eprint={2109.12449},
114114
archivePrefix={arXiv},
115115
primaryClass={cs.MS},
116-
url={https://arxiv.org/abs/2109.12449},
116+
url={https://arxiv.org/abs/2109.12449},
117117
}
118118
```
119119

DifferentiationInterface/docs/src/assets/logo.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ end
4747

4848
# ╔═╡ 69d0fa4d-2585-42a0-981f-99d43f7e2c1f
4949
md"## Creating Favicons
50-
Using Imagemagick, run
50+
Using Imagemagick, run
5151
```bash
5252
convert -background transparent logo.svg -define icon:auto-resize=256,128,48,32,16 favicon.ico
5353
```

0 commit comments

Comments
 (0)