Skip to content

Add shellcheck and Makefile for shell script linting#132

Merged
lex57ukr merged 2 commits intomainfrom
131-add-shellcheck-and-makefile-for-linting
Feb 1, 2026
Merged

Add shellcheck and Makefile for shell script linting#132
lex57ukr merged 2 commits intomainfrom
131-add-shellcheck-and-makefile-for-linting

Conversation

@lex57ukr
Copy link
Contributor

@lex57ukr lex57ukr commented Feb 1, 2026

Summary

Enhance shell script quality enforcement by adding shellcheck static analysis to CI and providing a Makefile for convenient local linting. Developers can now run make lint locally to check formatting and shell best practices before pushing, while CI catches shellcheck warnings in addition to formatting issues.

Related Issues

Fixes #131

Changes

  • Create .shellcheckrc with bash dialect and stricter optional checks enabled
  • Add shellcheck step to CI lint job (after shfmt)
  • Add Makefile with lint, lint-fix, and individual linter targets
  • Remove unused HOST_RID variable in test-all.sh to fix SC2034
  • Update documentation in CLAUDE.md, CONTRIBUTING.md, and how-to-security.md

- Create .shellcheckrc with bash dialect and stricter checks
- Add shellcheck step to CI lint job
- Add Makefile with lint and lint-fix targets
- Remove unused HOST_RID variable in test-all.sh (SC2034)
- Update CLAUDE.md, CONTRIBUTING.md, and how-to-security.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 1, 2026 21:58
@lex57ukr lex57ukr added the enhancement New feature or request label Feb 1, 2026
Copy link

Copilot AI left a comment

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 adds shellcheck static analysis to enforce shell script quality alongside existing shfmt formatting. Developers can now run make lint locally to check both formatting and shell best practices, while CI validates both automatically.

Changes:

  • Added shellcheck integration to CI workflow and local development via Makefile
  • Created .shellcheckrc configuration with bash dialect and stricter optional checks
  • Consolidated duplicate arm64/aarch64 case branches and removed unused HOST_RID variable in test script

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.shellcheckrc Configures shellcheck with bash dialect and enables stricter optional checks for better shell script quality
.github/workflows/ci.yml Adds shellcheck step to CI lint job to catch shell script issues automatically
Makefile Provides convenient targets for running linters locally (lint, lint-fix, individual linter commands)
tests/deb/test-all.sh Removes unused HOST_RID variable and consolidates duplicate arm64/aarch64 case branches
CLAUDE.md Updates documentation to reflect shellcheck integration and new Makefile targets
CONTRIBUTING.md Adds instructions for running linters locally via make lint and make lint-fix
docs/how-to/how-to-security.md Documents shellcheck integration and references .shellcheckrc configuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Apply ${VAR} convention to all shell code in GitHub workflow run blocks
for consistency with shellcheck's require-variable-braces rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@lex57ukr lex57ukr merged commit 67ac799 into main Feb 1, 2026
9 checks passed
@lex57ukr lex57ukr deleted the 131-add-shellcheck-and-makefile-for-linting branch February 1, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add shellcheck to CI and introduce Makefile for linting

1 participant