Skip to content

ci: add shell script linting workflow#3708

Open
aniketpati1121 wants to merge 3 commits into
kubeflow:masterfrom
aniketpati1121:shell-lint-ci
Open

ci: add shell script linting workflow#3708
aniketpati1121 wants to merge 3 commits into
kubeflow:masterfrom
aniketpati1121:shell-lint-ci

Conversation

@aniketpati1121

Copy link
Copy Markdown
Contributor

fixes #3703

Signed-off-by: Aniket Patil <aniketpatil2027@gmail.com>
Copilot AI review requested due to automatic review settings July 7, 2026 02:56
@google-oss-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign tenzen-y for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow Bot requested review from jinchihe and kuizhiqing July 7, 2026 02:56
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

🎉 Welcome to the Kubeflow Trainer! 🎉

Thanks for opening your first PR! We're happy to have you as part of our community 🚀

Here's what happens next:

  • If you haven't already, please check out our Contributing Guide for repo-specific guidelines and the Kubeflow Contributor Guide for general community standards.
  • Our team will review your PR soon! cc @kubeflow/kubeflow-trainer-team

Join the community:

Feel free to ask questions in the comments if you need any help or clarification!
Thanks again for contributing to Kubeflow! 🙏

@aniketpati1121 aniketpati1121 changed the title ci: add shell formatting and ShellCheck workflow ci: add shell lint GitHub Actions workflow Jul 7, 2026
@aniketpati1121 aniketpati1121 changed the title ci: add shell lint GitHub Actions workflow ci: add shell script linting workflow Jul 7, 2026

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 adds repo-wide shell script formatting (shfmt) and linting (ShellCheck) enforcement via Make targets, pre-commit hooks, and a dedicated GitHub Actions workflow, aligning this repository with Kubeflow’s CI standards (per #3703).

Changes:

  • Add make shell-fmt (shfmt) and make shell-lint (shellcheck) targets plus tool version pinning in the Makefile.
  • Add local pre-commit hooks to run the new shell formatting and lint targets.
  • Add a new Shell Lint GitHub Actions workflow to enforce shell formatting and linting on PRs and pushes.

Reviewed changes

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

File Description
Makefile Adds shfmt/shellcheck version pins, Make targets, and a ShellCheck download helper.
.pre-commit-config.yaml Adds local pre-commit hooks to run make shell-fmt and make shell-lint.
.github/workflows/shell-lint.yaml Adds CI workflow to enforce shell formatting and run ShellCheck.

Comment thread Makefile Outdated
Comment thread Makefile
Comment on lines +263 to +269
.PHONY: shfmt
shfmt:
GOBIN=$(LOCALBIN) go install mvdan.cc/sh/v3/cmd/shfmt@$(SHFMT_VERSION)

.PHONY: shellcheck
shellcheck: # download shellcheck binary

aniketpati1121 and others added 2 commits July 7, 2026 08:30
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Aniket Patil <aniketpatil2027@gmail.com>
Signed-off-by: Aniket Patil <aniketpatil2027@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enforce shell script linting and formatting in CI

2 participants