Sentinel Fmt Hook Does Not Work

Open
#121 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
shell
Domain
tooling

Research direction

Start by reproducing the issue with the provided .pre-commit-config.yaml and the pre-commit run --all-files command. Inspect the sentinel-fmt hook definition and verify that its shebang is on line 1 and that the invoked sentinel fmt command supports the arguments used; done means the hook runs and reports files requiring formatting.

Written by the indexing model from the issue text.

Description

bug

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

repos:
  - repo: https://github.com/gruntwork-io/pre-commit
    rev: v0.1.25
    hooks:
      - id: sentinel-fmt
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.

Dominant language
Shell
Stars
547
Forks
168
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from gruntwork-io/pre-commit

All issues in gruntwork-io/pre-commit

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.