mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
codebase: Replace !errors.Is(err, target) with testify (#1931)
* tests: Replace !errors.Is(err, target) with testify equivalents * codebase: Manual !errors.Is(err, target) replacements * typo: Replace errMisMatchedEvent with errMismatchedEvent * tests: Enhance error messages for better output * tests: Refactor error assertions in various test cases to use require and improve clarity * misc linter: Fix assert should wording * tests: Simplify assertions in TestCreateSignals for clarity and conciseness * tests: Enhance assertion message in TestCreateSignals
This commit is contained in:
7
.github/workflows/misc.yml
vendored
7
.github/workflows/misc.yml
vendored
@@ -44,3 +44,10 @@ jobs:
|
||||
grep -r -n --include='*_test.go' --color=always -E "errors.Is\([^,]+, nil" . || exit 0
|
||||
echo "::error::Replace errors.Is(err, nil) with testify equivalents"
|
||||
exit 1
|
||||
|
||||
- name: Check for !errors.Is(err, target) usage
|
||||
run: |
|
||||
grep -r -n --include='*_test.go' --color=always -P '!errors\.Is\(\s*[^,]+\s*,\s*[^)]+\s*\)' . || exit 0
|
||||
echo "::error::Replace !errors.Is(err, target) with testify equivalents"
|
||||
exit 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user