Skip to content

Commit

Permalink
fix: update Cargo.nix version and pre-commit hook improvements (#302)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
NickLarsenNZ authored Jun 18, 2024
1 parent 29de37d commit 4ccd0a5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ Cargo.nix linguist-generated
yarn.lock linguist-generated
nix/** linguist-generated
go.sum linguist-generated
gomod2nix.toml linguist-generated
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
htpasswd
.yarn

# Nix
gomod2nix.toml
Cargo.nix
crate-hashes.json

# Misc
/demos
/stacks
Expand Down
16 changes: 15 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
---
# See https://pre-commit.com for more information
fail_fast: true
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: trailing-whitespace
# Generated file
exclude: ^web/src/api/schema.d.ts|extra/.*$
exclude: ^web/src/api/schema\.d\.ts|extra/.*$
- id: end-of-file-fixer
exclude: Cargo.nix
- id: detect-aws-credentials
args: ["--allow-missing-credentials"]
- id: detect-private-key
Expand Down Expand Up @@ -49,31 +51,43 @@ repos:
hooks:
- id: gen-man
name: gen-man
files: ^rust/stackablectl/
language: system
entry: cargo xtask gen-man
stages: [commit, merge-commit, manual]
pass_filenames: false
- id: gen-comp
name: gen-comp
files: ^rust/stackablectl/
language: system
entry: cargo xtask gen-comp
stages: [commit, merge-commit, manual]
pass_filenames: false
- id: gen-openapi
name: gen-openapi
files: ^web/
language: system
entry: cargo xtask gen-openapi
stages: [commit, merge-commit, manual]
pass_filenames: false
- id: gen-ctl-readme
name: gen-ctl-readme
files: ^rust/stackablectl/
language: system
entry: cargo xtask gen-ctl-readme
stages: [commit, merge-commit, manual]
pass_filenames: false
- id: gen-docs
name: gen-docs
files: ^rust/stackablectl/
language: system
entry: cargo xtask gen-docs
stages: [commit, merge-commit, manual]
pass_filenames: false
- id: gen-cargo-nix
name: gen-cargo-nix
files: ^Cargo\.lock|go\.mod$
language: system
entry: make regenerate-nix
stages: [commit, merge-commit, manual]
pass_filename: false
2 changes: 1 addition & 1 deletion Cargo.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4ccd0a5

Please sign in to comment.