Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test/check-scripts: add checks to standardise whitespace #898

Merged
merged 4 commits into from
Feb 27, 2025

Conversation

alxndrsn
Copy link
Contributor

@alxndrsn alxndrsn commented Feb 18, 2025

Incidental to #891.

Whitespace changes can be introduced inadvertently due to different editor configurations. These changes then add noise to PRs, and if committed, add noise to future diffs and the git log.

This PR adds checks for the following in .sh files:

  • trailing spaces on lines
  • trailing newlines in files
  • tabs vs spaces

What has been done to verify that this works as intended?

Added new tests!

Why is this the best possible solution? Were any other approaches considered?

The status quo could be maintained.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

No effect.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

No.

Before submitting this PR, please make sure you have:

  • branched off and targeted the next branch OR only changed documentation/infrastructure (master is stable and used in production)
  • verified that any code or assets from external sources are properly credited in comments or that everything is internally sourced

Whitespace changes are often introduced inadvertently due to different editor configurations.  They then add noise to PRs, and if committed, add noise to future diffs and the git log.

This PR adds checks for the following in `.sh` files:

* trailing spaces on lines
* trailing newlines in files
* tabs vs spaces
@alxndrsn alxndrsn marked this pull request as ready for review February 18, 2025 10:02
alxndrsn added 2 commits February 21, 2025 10:15
not supported on osx
@alxndrsn alxndrsn merged commit aa1454b into getodk:next Feb 27, 2025
3 checks passed
@alxndrsn alxndrsn deleted the simple-static-script-checks branch February 27, 2025 08:08
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.

2 participants