Skip to content

Commit ec90c19

Browse files
authored
Merge pull request #341 from effigies/chore/pre-commit
chore: Add pre-commit hooks
2 parents c670b7c + 948f327 commit ec90c19

File tree

19 files changed

+38
-16
lines changed

19 files changed

+38
-16
lines changed

.pre-commit-config.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # v6.0.0
4+
hooks:
5+
- id: check-json
6+
- id: check-toml
7+
- id: check-yaml
8+
- id: check-merge-conflict
9+
- id: check-symlinks
10+
exclude: tests/data/broken-symlink
11+
- id: destroyed-symlinks
12+
- id: end-of-file-fixer
13+
- id: fix-byte-order-marker
14+
- id: trailing-whitespace
15+
- repo: https://github.com/nozaq/pre-commit-deno
16+
rev: db9b2333832fdbbb36b9c36d252cd52c2f9d41dc # 0.1.0
17+
hooks:
18+
- id: deno-fmt

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ authors:
4646
orcid: https://orcid.org/0000-0002-6533-2909
4747
- family-names: Gau
4848
given-names: Rémi
49-
orcid: https://orcid.org/0000-0002-1535-9767
49+
orcid: https://orcid.org/0000-0002-1535-9767
5050
- family-names: Gorgolewski
5151
given-names: Krzysztof J.
5252
orcid: https://orcid.org/0000-0003-3321-7583

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
1717
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
1818
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
1919
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
### Infrastructure
2+
3+
- Added a [pre-commit](https://pre-commit.com/) configuration for developers.
4+
To enable, run `pre-commit install`. For speed, we recommend installing `pre-commit`
5+
via `uv tool install pre-commit --with=pre-commit-uv`.

docs/validation-model/inheritance-principle.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The validator uses a "walk back" algorithm to find inherited files:
2020
```python
2121
def walkBack(file, extension):
2222
fileParts = parsePath(file.path)
23-
23+
2424
fileTree = file.parent
2525
while fileTree:
2626
for child in fileTree.children:

local-run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env -S deno run --allow-read --allow-write --allow-env --allow-net --allow-run
1+
#!/usr/bin/env -S deno run --allow-read --allow-write --allow-env --allow-net --allow-run
22
// This script runs the local copy of the validator, intended as a development aid.
33
// You generally should run `deno run -A jsr:@bids/validator`
44
import './src/bids-validator.ts'

src/tests/bom-utf16.tsv

1 Byte
Binary file not shown.

src/tests/bom-utf8.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
{
1+
{
22
"example": "JSON for test suite"
33
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
participant_id sex
2-
sub-01 F
2+
sub-01 F

tests/data/broken_pet_example_3-pet_blood/sub-01/ses-01/pet/sub-01_ses-01_recording-manual_blood.tsv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ time plasma_radioactivity metabolite_parent_fraction
3030
4800 8095.22519 0.10388412
3131
5400 7480.43763 n/a
3232
6000 7099.9559 0.09530672
33-
7200 6279.54565 n/a
33+
7200 6279.54565 n/a

0 commit comments

Comments
 (0)