gruntwork-io / gruntwork-io/pre-commit

Sentinel Fmt Hook Does Not Work

Open
#121 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Shell
Stars
547
Forks
168
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Hook fails to run when installed through pre-commit because of two bugs:
1. Line 1 must have shebang but is instead on line 2
2. `sentinel fmt` does not have a `diff` command-line argument

**To Reproduce**
Steps to reproduce the behavior including the relevant Terraform/Terragrunt/Packer version number and any code snippets and module inputs you used.

.pre-commit-config.yaml
```yaml
repos:
- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.25
hooks:
- id: sentinel-fmt
```

```bash
pre-commit install
pre-commit run --all-files
```

**Expected behavior**
Pre-commit hook would run and indicate files requiring formatting

**Nice to have**
- [ ] Terminal output
- [ ] Screenshots

**Additional context**
Add any other context about the problem here.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.