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

Add new optional rule: force Expect with To #132

Merged
merged 1 commit into from
Feb 12, 2024
Merged

Conversation

nunnatsa
Copy link
Owner

Description

Added new rule: should not use Expect with the Should or ShouldNot assertion methods.

This rule is not enabled by default. To enable it, use the --force-expect-to=true flag.

The new rule does support auto fix.

Fixes #112

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

  • Added test case and related test data
  • Update the functional test

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I ran golangci-lint

@nunnatsa

Added new rule: should not use `Expect` with the `Should` or `ShouldNot`
assertion methods.

This rule is not enabled by default. To enable it, use the
`--force-expect-to=true` flag.

The new rule does support auto fix.
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 7868443728

Details

  • -5 of 38 (86.84%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.1%) to 84.953%

Changes Missing Coverage Covered Lines Changed/Added Lines %
gomegahandler/handler.go 3 5 60.0%
ginkgo_linter.go 29 32 90.63%
Files with Coverage Reduction New Missed Lines %
ginkgo_linter.go 1 90.3%
Totals Coverage Status
Change from base Build 7862857433: -0.1%
Covered Lines: 1163
Relevant Lines: 1369

💛 - Coveralls

@nunnatsa nunnatsa merged commit 0033f3d into main Feb 12, 2024
1 check passed
@nunnatsa nunnatsa deleted the force-expect-to branch February 12, 2024 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement] Should Expect be matched with To?
2 participants