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

nunnatsa / ginkgolinter / 6390277556 / 1
88%
main: 88%

Build:
DEFAULT BRANCH: main
Ran 03 Oct 2023 08:04AM 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

03 Oct 2023 08:02AM UTC coverage: 84.034% (+0.05%) from 83.982%
6390277556.1

push

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.

1000 of 1190 relevant lines covered (84.03%)

798.8 hits per line

Source Files on job 6390277556.1
  • Tree
  • List 0
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 6390277556
  • 1785e17f on github
  • Prev Job for on main (#6141414406.1)
  • Next Job for on main (#6390977998.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