Added pre-commit hooks for file checks, ShellCheck, Markdown linting,…#4987
Draft
JC-wk wants to merge 8 commits into
Draft
Added pre-commit hooks for file checks, ShellCheck, Markdown linting,…#4987JC-wk wants to merge 8 commits into
JC-wk wants to merge 8 commits into
Conversation
added 2 commits
July 21, 2026 14:05
… Bandit security checks, and Terraform format/tflint/docs. ([microsoft#4913](microsoft#4913))
Unit Test Results0 tests 0 ✅ 0s ⏱️ Results for commit e7dfcf1. ♻️ This comment has been updated with latest results. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands the repository’s local developer quality gates by adding additional pre-commit hooks (formatting/sanity checks, linting, and security checks) and updates the devcontainer image to include required tooling for the new hooks. It also updates the changelog to record the enhancement.
Changes:
- Added
pre-commithooks for common file checks, Bandit, ShellCheck, Markdown linting, and Terraform fmt/tflint/docs. - Added devcontainer tooling installs for
tflint,terraform-docs, andshellcheckto support the new developer workflow. - Updated
CHANGELOG.mdwith an enhancement entry.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| CHANGELOG.md | Records the new pre-commit hook coverage and cleans up whitespace in an existing section. |
| .pre-commit-config.yaml | Adds additional pre-commit repositories/hooks for file hygiene, security, linting, and Terraform checks. |
| .devcontainer/scripts/tflint.sh | New helper script to install tflint in the devcontainer. |
| .devcontainer/scripts/terraform-docs.sh | New helper script to install terraform-docs in the devcontainer. |
| .devcontainer/Dockerfile | Installs tflint, terraform-docs, and shellcheck into the devcontainer image. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment on lines
+22
to
+23
| echo -e "\n\e[34m»»» 💾 \e[32mInstalled to: \e[33m$(which $CMD)" | ||
| echo -e "\e[34m»»» 💡 \e[32mVersion details: \e[39m$($CMD --version)" |
Comment on lines
+22
to
+23
| echo -e "\n\e[34m»»» 💾 \e[32mInstalled to: \e[33m$(which $CMD)" | ||
| echo -e "\e[34m»»» 💡 \e[32mVersion details: \e[39m$($CMD --version)" |
Comment on lines
+33
to
+37
| - repo: https://github.com/shellcheck-py/shellcheck-py | ||
| rev: v0.10.0.1 | ||
| hooks: | ||
| - id: shellcheck | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… Bandit security checks, and Terraform format/tflint/docs.
Resolves #4986
What is being addressed
Addition of extra pre-commit hooks as per discussion in #4913
How is this addressed