-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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: BATS: unofficial strict mode #2032
Draft
gaelicWizard
wants to merge
13
commits into
Bash-it:master
Choose a base branch
from
gaelicWizard:bats-nounset
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gaelicWizard
force-pushed
the
bats-nounset
branch
30 times, most recently
from
January 12, 2022 06:45
6b5ddbd
to
76f3f6b
Compare
gaelicWizard
force-pushed
the
bats-nounset
branch
8 times, most recently
from
February 4, 2022 06:22
7719378
to
26b61ab
Compare
gaelicWizard
force-pushed
the
bats-nounset
branch
7 times, most recently
from
February 15, 2022 04:31
9c6970b
to
ad370ab
Compare
gaelicWizard
force-pushed
the
bats-nounset
branch
from
March 4, 2022 08:42
ad370ab
to
2832f76
Compare
BATS: add `*.bats` to `.gitattributes`
test: don't clobber `$PATH` BATS depends on `$PATH` somehow and if not handled properly, modifying `$PATH` breaks BATS badly. But, it doesn't seem like we have any reason to modify `$PATH` in the first place...so don't. test/svn: don't clobber `$PATH` test/ruby: don't clobber `$PATH` test/search: don't clobber `$PATH`
Make library loading overridable default for all tests, up through "seach".
My apologies to future `git blame` hunters ♥
gaelicWizard
force-pushed
the
bats-nounset
branch
from
March 5, 2022 20:05
2832f76
to
683b9f3
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This branch adds
set -Eeuo pipefail
to the bottom ofsetup()
, 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
Checklist:
clean_files.txt
and formatted it usinglint_clean_files.sh
.