mirror of
https://github.com/tofuutils/pre-commit-opentofu.git
synced 2025-10-15 17:38:54 +02:00
feat: rename pre-commit-terraform to pre-commit-opentofu, pt IV
This commit is contained in:
parent
233f6c6c8b
commit
32f93afd65
4 changed files with 17 additions and 16 deletions
6
.github/CONTRIBUTING.md
vendored
6
.github/CONTRIBUTING.md
vendored
|
|
@ -27,7 +27,7 @@ pre-commit try-repo {-a} /path/to/local/pre-commit-opentofu/repo {hook_name}
|
|||
I.e.
|
||||
|
||||
```bash
|
||||
pre-commit try-repo /mnt/c/Users/tf/pre-commit-opentofu terraform_fmt # Run only `terraform_fmt` check
|
||||
pre-commit try-repo /mnt/c/Users/tf/pre-commit-opentofu tofu_fmt # Run only `tofu_fmt` check
|
||||
pre-commit try-repo -a ~/pre-commit-opentofu # run all existing checks from repo
|
||||
```
|
||||
|
||||
|
|
@ -35,10 +35,10 @@ Running `pre-commit` with `try-repo` ignores all arguments specified in `.pre-co
|
|||
|
||||
If you need to test hook with arguments, follow [pre-commit doc](https://pre-commit.com/#arguments-pattern-in-hooks) to test hooks.
|
||||
|
||||
For example, to test that the [`terraform_fmt`](../README.md#terraform_fmt) hook works fine with arguments:
|
||||
For example, to test that the [`tofu_fmt`](../README.md#tofu_fmt) hook works fine with arguments:
|
||||
|
||||
```bash
|
||||
/tmp/pre-commit-opentofu/terraform_fmt.sh --args=-diff --args=-write=false test-dir/main.tf test-dir/vars.tf
|
||||
/tmp/pre-commit-opentofu/tofu_fmt.sh --args=-diff --args=-write=false test-dir/main.tf test-dir/vars.tf
|
||||
```
|
||||
|
||||
## Run hook performance test
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ Linux DESKTOP-C7315EF 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43
|
|||
bash << EOF
|
||||
bash --version | head -n 1 2>/dev/null || echo "bash SKIPPED"
|
||||
pre-commit --version 2>/dev/null || echo "pre-commit SKIPPED"
|
||||
terraform --version | head -n 1 2>/dev/null || echo "terraform SKIPPED"
|
||||
tofu --version | head -n 1 2>/dev/null || echo "tofu SKIPPED"
|
||||
python --version 2>/dev/null || echo "python SKIPPED"
|
||||
python3 --version 2>/dev/null || echo "python3 SKIPPED"
|
||||
echo -n "checkov " && checkov --version 2>/dev/null || echo "checkov SKIPPED"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue