Skip to content

Commit 4ccd0a5

Browse files
authored
fix: update Cargo.nix version and pre-commit hook improvements (#302)
* chore: update generated ts def * chore: track nix lock files * fix(nix): regenerate nix crate lock, ignore trailing newline lint * chore(pre-commit): regenerate Cargo.nix * fix(pre-commit): make the regex correct * chore(pre-commit): speed-up * chore(pre-commit): speed-up more * chore: mark gomod2nix.toml as generated * Revert "chore: update generated ts def" This reverts commit dd89c0f.
1 parent 29de37d commit 4ccd0a5

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ Cargo.nix linguist-generated
66
yarn.lock linguist-generated
77
nix/** linguist-generated
88
go.sum linguist-generated
9+
gomod2nix.toml linguist-generated

.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
htpasswd
77
.yarn
88

9-
# Nix
10-
gomod2nix.toml
11-
Cargo.nix
12-
crate-hashes.json
13-
149
# Misc
1510
/demos
1611
/stacks

.pre-commit-config.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
---
22
# See https://pre-commit.com for more information
3+
fail_fast: true
34
# See https://pre-commit.com/hooks.html for more hooks
45
repos:
56
- repo: https://github.com/pre-commit/pre-commit-hooks
67
rev: v4.2.0
78
hooks:
89
- id: trailing-whitespace
910
# Generated file
10-
exclude: ^web/src/api/schema.d.ts|extra/.*$
11+
exclude: ^web/src/api/schema\.d\.ts|extra/.*$
1112
- id: end-of-file-fixer
13+
exclude: Cargo.nix
1214
- id: detect-aws-credentials
1315
args: ["--allow-missing-credentials"]
1416
- id: detect-private-key
@@ -49,31 +51,43 @@ repos:
4951
hooks:
5052
- id: gen-man
5153
name: gen-man
54+
files: ^rust/stackablectl/
5255
language: system
5356
entry: cargo xtask gen-man
5457
stages: [commit, merge-commit, manual]
5558
pass_filenames: false
5659
- id: gen-comp
5760
name: gen-comp
61+
files: ^rust/stackablectl/
5862
language: system
5963
entry: cargo xtask gen-comp
6064
stages: [commit, merge-commit, manual]
6165
pass_filenames: false
6266
- id: gen-openapi
6367
name: gen-openapi
68+
files: ^web/
6469
language: system
6570
entry: cargo xtask gen-openapi
6671
stages: [commit, merge-commit, manual]
6772
pass_filenames: false
6873
- id: gen-ctl-readme
6974
name: gen-ctl-readme
75+
files: ^rust/stackablectl/
7076
language: system
7177
entry: cargo xtask gen-ctl-readme
7278
stages: [commit, merge-commit, manual]
7379
pass_filenames: false
7480
- id: gen-docs
7581
name: gen-docs
82+
files: ^rust/stackablectl/
7683
language: system
7784
entry: cargo xtask gen-docs
7885
stages: [commit, merge-commit, manual]
7986
pass_filenames: false
87+
- id: gen-cargo-nix
88+
name: gen-cargo-nix
89+
files: ^Cargo\.lock|go\.mod$
90+
language: system
91+
entry: make regenerate-nix
92+
stages: [commit, merge-commit, manual]
93+
pass_filename: false

Cargo.nix

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)