Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update Cargo.nix version and pre-commit hook improvements #302

Merged
merged 9 commits into from
Jun 18, 2024
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
NickLarsenNZ marked this conversation as resolved.
Show resolved Hide resolved
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
NickLarsenNZ marked this conversation as resolved.
Show resolved Hide resolved
- 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.