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

nunnatsa / ginkgolinter / 6369713012 / 1
84%
main: 88%

Build:
Build:
LAST BUILD BRANCH: assertion-wrappers
DEFAULT BRANCH: main
Ran 01 Oct 2023 09:55AM UTC
Files 6
Run time 0s
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.1

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

986 of 1176 relevant lines covered (83.84%)

807.32 hits per line

Source Files on job 6369713012.1
  • Tree
  • List 0
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 6369713012
  • 7efedd56 on github
  • Prev Job for on compare-types (#6141414406.1)
  • 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