• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nunnatsa / ginkgolinter / 6369713012
84%
main: 88%

Build:
Build:
LAST BUILD BRANCH: assertion-wrappers
DEFAULT BRANCH: main
Ran 01 Oct 2023 09:55AM UTC
Jobs 1
Files 6
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 Oct 2023 09:53AM UTC coverage: 83.844% (-0.1%) from 83.982%
6369713012

Pull #110

github

nunnatsa
New Rule: should not compare two different types

The `Equal` and the `BeIdentical` matchers also check the type, not only
the value.

The following code will fail in runtime:
```go
x := 5 // x is int
Expect(x).Should(Eqaul(uint(5)) // x and uint(5) are with different
types
```

When using negative checks, it's even worse, because we get a fale
positive:
```
x := 5
Expect(x).ToNot(Equal(uint(5))
```

To solve this problem, we want to find these errors before running the
tests and failing on runtime. This is even more important for e2e or
functional tests, where we sometimes can't run them on the local
development environment.

This PR adds a new rule to the linter, to find comaprison of values
from different types.
Pull Request #110: New Rule: should not compare two different types

82 of 82 new or added lines in 2 files covered. (100.0%)

986 of 1176 relevant lines covered (83.84%)

807.32 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6369713012.1 01 Oct 2023 09:55AM UTC 0
83.84
GitHub Action Run
Source Files on build 6369713012
Detailed source file information is not available for this build.
  • Back to Repo
  • Pull Request #110
  • PR Base - main (#6141414406)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc