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

nunnatsa / ginkgolinter / 6390277556
88%

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

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

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.

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

1000 of 1190 relevant lines covered (84.03%)

798.8 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6390277556.1 03 Oct 2023 08:04AM UTC 0
84.03
GitHub Action Run
Source Files on build 6390277556
Detailed source file information is not available for this build.
  • Back to Repo
  • 1785e17f on github
  • Prev Build on main (#6141414406)
  • Next Build on main (#6390977998)
  • 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