Skip to content

ci: add GitHub status check to prevent trailing spaces - #324

Open
bappisinsane wants to merge 1 commit into
google:mainfrom
bappisinsane:fix/trailing-spaces-check
Open

bappisinsane wants to merge 1 commit into
google:mainfrom
bappisinsane:fix/trailing-spaces-check

Conversation

@bappisinsane

Copy link
Copy Markdown

Summary

Adds a GitHub Actions workflow (.github/workflows/trailing-spaces.yml) that automatically detects and prevents trailing whitespace in code files.

What it does

  • Runs on all pull requests and pushes to main
  • Checks all text files for trailing whitespace using grep
  • Excludes common non-source directories (.git, node_modules, vendor, dist, build, __pycache__, .venv, venv)
  • Excludes minified files (*.min.js, *.min.css) and lock files
  • Fails the status check with a clear error message listing all offending files
  • Provides a suggested sed command to fix the issue

Test Plan

  • Workflow file created with valid YAML
  • Commit pushed and PR opened

Closes #104

Add a GitHub Actions workflow that runs on pull requests and pushes
to main, checking for trailing whitespace in all code files. The
check fails with a clear error message listing offending files.

Closes google#104
@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@google-cla

google-cla Bot commented Oct 15, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

This branch has not been deployed

No deployments
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 GitHub status check to prevent trailing spaces in code

1 participant