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

build(deps): bump github.com/nunnatsa/ginkgolinter from 0.17.0 to 0.18.0 #5114

Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 7, 2024

Bumps github.com/nunnatsa/ginkgolinter from 0.17.0 to 0.18.0.

Release notes

Sourced from github.com/nunnatsa/ginkgolinter's releases.

v1.18.0

What's Changed

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

Eventually(func(g Gomega){
    g.Expect(true).To(BeTrue())
}).WithTimeout(10 * time.Millisecond).WithPolling(time.Millisecond).Should(Succeed())

Note: This rule does not support auto-fix.

Correct Usage of the Succeed() and the HaveOccurred() matchers [STYLE]

This rule enforces using the Success() matcher only for functions, and the HaveOccurred() matcher only for error values.

For example:

Expect(err).To(Succeed())

will trigger a warning with a suggestion to replace the mather to

Expect(err).ToNot(HaveOccurred())

and vice versa:

Expect(myErrorFunc()).ToNot(HaveOccurred())

will trigger a warning with a suggestion to replace the mather to

Expect(myErrorFunc()).To(Succeed())

This rule is disabled by default. Use the --force-succeed=true command line flag to enable it.

Note: This rule does support auto-fix, when the --fix command line parameter is used.

CLI Changes

... (truncated)

Commits
  • a64f802 update the CONTRIBUTING doc
  • 4a87464 force goimport
  • bbcb9bf split the huge the matherinfo.go file into smaller files
  • de271ea better way to find the actual expression
  • 1309578 Refactor: move ginkgo containers logic to the handler
  • 05ca79e Use testscript for e2e
  • b15f712 Add two new rules, to validate the Success and HaveOccurred matchers
  • See full diff in compare view

Dependabot compatibility score

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 <dependency name> 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](https://github.com/nunnatsa/ginkgolinter) from 0.17.0 to 0.18.0.
- [Release notes](https://github.com/nunnatsa/ginkgolinter/releases)
- [Commits](nunnatsa/ginkgolinter@v0.17.0...v0.18.0)

---
updated-dependencies:
- dependency-name: github.com/nunnatsa/ginkgolinter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Relates to an upstream dependency go Pull requests that update Go code labels Nov 7, 2024
@ldez ldez added the linter: update version Update version of linter label Nov 7, 2024
@ldez ldez self-requested a review November 7, 2024 18:06
@ldez ldez added this to the next milestone Nov 7, 2024
@ldez ldez merged commit c4b6d37 into master Nov 7, 2024
15 checks passed
@ldez ldez deleted the dependabot/go_modules/github.com/nunnatsa/ginkgolinter-0.18.0 branch November 7, 2024 19:07
@ldez ldez modified the milestones: next, v1.62 Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Relates to an upstream dependency go Pull requests that update Go code linter: update version Update version of linter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant