Added two new rules, to validate the Success and HaveOccurred matchers
New Linter Rules
Prevent Wrong Actual Values with the Succeed() matcher [Bug]
The Succeed() matcher only accepts a single error value. this rule validates that.
For example:
Expect(42).To(Succeed())
But mostly, we want to avoid using this matcher with functions that return multiple values, even if their last returned value is an error, because this is not supported:
Expect(os.Open("myFile.txt")).To(Succeed())
In async assertions (like Eventually()), the Succeed() matcher may also been used with functions that accept a Gomega object as their first parameter, and returns nothing, e.g. this is a valid usage of Eventually
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps github.com/nunnatsa/ginkgolinter from 0.17.0 to 0.18.0.
Release notes
Sourced from github.com/nunnatsa/ginkgolinter's releases.
... (truncated)
Commits
a64f802
update the CONTRIBUTING doc4a87464
force goimportbbcb9bf
split the huge the matherinfo.go file into smaller filesde271ea
better way to find the actual expression1309578
Refactor: move ginkgo containers logic to the handler05ca79e
Use testscript for e2eb15f712
Add two new rules, to validate theSuccess
andHaveOccurred
matchersDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show