Skip to content

ci: use Ubuntu shfmt shell formatter - #2583

Open
MikeMcC399 wants to merge 1 commit into
nodejs:mainfrom
MikeMcC399:shfmt-ubuntu
Open

ci: use Ubuntu shfmt shell formatter#2583
MikeMcC399 wants to merge 1 commit into
nodejs:mainfrom
MikeMcC399:shfmt-ubuntu

Conversation

@MikeMcC399

Copy link
Copy Markdown
Contributor

Description

Motivation and Context

peterdavehello/shfmt:2.6.3 in .github/workflows/shfmt.yml was published in Jan 2019 and is outdated.

Ubuntu offers the package shfmt which relieves the need for a specially built Docker image to perform shell script linting in CI. It is also available in Debian. See https://github.com/mvdan/sh.

Testing Details

Locally in Ubuntu 24.04.4 LTS, execute:

sudo apt-get update
sudo apt-get install -y shfmt
shfmt -sr -i 2 -l -w -ci -d .

and confirm no error reported.

Check for success of job shfmt in workflow .github/workflows/shfmt.yml

Types of changes

  • Documentation
  • Version change (Update, remove or add more Node.js versions)
  • Variant change (Update, remove or add more variants, or versions of variants)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (none of the above)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING.md document.
  • All new and existing tests passed.

@MikeMcC399 MikeMcC399 self-assigned this Jul 30, 2026
@MikeMcC399 MikeMcC399 added the ci CI (Continuous Integration) workflows label Jul 30, 2026
@MikeMcC399
MikeMcC399 marked this pull request as ready for review July 30, 2026 08:32
@MikeMcC399

Copy link
Copy Markdown
Contributor Author

@PeterDaveHello

Please review, as it replaces your special Docker image for checking shell scripts and uses instead the standard package from Ubuntu.

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

Labels

ci CI (Continuous Integration) workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Outdated Docker image peterdavehello/shfmt:2.6.3 in shfmt.yml

1 participant