Skip to content

Added pre-commit hooks for file checks, ShellCheck, Markdown linting,…#4987

Draft
JC-wk wants to merge 8 commits into
microsoft:mainfrom
JC-wk:pre-commit-extras
Draft

Added pre-commit hooks for file checks, ShellCheck, Markdown linting,…#4987
JC-wk wants to merge 8 commits into
microsoft:mainfrom
JC-wk:pre-commit-extras

Conversation

@JC-wk

@JC-wk JC-wk commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

… 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

  • Added pre-commit hooks for file checks, ShellCheck, Markdown linting, Bandit security checks, and Terraform format/tflint/docs
  • Follow up PR will be needed to apply the formatting changes and fix any findings
  • Update CHANGELOG.md

James Chapman added 2 commits July 21, 2026 14:05
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

Unit Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit e7dfcf1.

♻️ This comment has been updated with latest results.

Copilot AI review requested due to automatic review settings July 23, 2026 12:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-commit hooks for common file checks, Bandit, ShellCheck, Markdown linting, and Terraform fmt/tflint/docs.
  • Added devcontainer tooling installs for tflint, terraform-docs, and shellcheck to support the new developer workflow.
  • Updated CHANGELOG.md with 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.

Comment thread .pre-commit-config.yaml
Comment thread .pre-commit-config.yaml
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 24, 2026 09:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comment thread .pre-commit-config.yaml Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 24, 2026 09:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Comment thread .pre-commit-config.yaml Outdated
Comment thread .pre-commit-config.yaml Outdated
Comment thread .devcontainer/scripts/tflint.sh Outdated
Comment thread .devcontainer/scripts/terraform-docs.sh Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 24, 2026 09:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

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 thread .pre-commit-config.yaml
Comment on lines +33 to +37
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add pre-commit hooks for file checks, ShellCheck, Markdown linting, Bandit security checks, and Terraform format/tflint/docs

3 participants