Skip to content

DRAFT: BATS: unofficial strict mode #2032

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

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

gaelicWizard
Copy link
Contributor

@gaelicWizard gaelicWizard commented Jan 11, 2022

Description

This branch adds set -Eeuo pipefail to the bottom of setup(), so each test is run with extremely strict environment.

Motivation and Context

Hence Chapter 4. This will help to prevent regressions, as well as catch omissions that shellcheck misses (like unbound positional parameters).

How Has This Been Tested?

This is built in top of my precommit branch (#2033), so the *.bats tests themselves are already fairly tight, so this PR is just for actually applying the strictness to the main code.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the code style of this project.
  • If my change requires a change to the documentation, I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • If I have added a new file, I also added it to clean_files.txt and formatted it using lint_clean_files.sh.
  • I have added tests to cover my changes, and all the new and existing tests pass.

@gaelicWizard gaelicWizard force-pushed the bats-nounset branch 30 times, most recently from 6b5ddbd to 76f3f6b Compare January 12, 2022 06:45
@gaelicWizard gaelicWizard force-pushed the bats-nounset branch 12 times, most recently from 7719378 to 26b61ab Compare February 4, 2022 06:22
@gaelicWizard gaelicWizard force-pushed the bats-nounset branch 7 times, most recently from 9c6970b to ad370ab Compare February 15, 2022 04:31
@seefood
Copy link
Contributor

seefood commented Apr 30, 2025

tests are failing, this is not ready.

@seefood seefood added seems abandoned rattle the cage, and close if nobody wants to keep it going waiting-for-response labels Apr 30, 2025
@seefood seefood self-assigned this May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clean up seems abandoned rattle the cage, and close if nobody wants to keep it going waiting-for-response
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants