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

nunnatsa / ginkgolinter / 6811593105
88%

Build:
DEFAULT BRANCH: main
Ran 09 Nov 2023 12:14PM UTC
Jobs 1
Files 6
Run time 3s
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

09 Nov 2023 12:12PM UTC coverage: 84.444% (+0.5%) from 83.908%
6811593105

push

github

nunnatsa
New rule(s): Wrong Usage of the `MatchError` gomega Matcher

The `MatchError` gomega matcher asserts an error value (and if it's not nil).

There are four valid formats for using this Matcher:
* error value; e.g. `Expect(err).To(MatchError(anotherErr))`
* string, to be equal to the output of the `Error()` method; e.g. `Expect(err).To(MatchError("Not Found"))`
* A gomega matcher that asserts strings; e.g. `Expect(err).To(MatchError(ContainSubstring("Found")))`
* [from v0.29.0] a function that receive a single error parameter and returns a single boolean value.
  In this format, an additional single string parameter, with the function description, is also required; e.g.
  `Expect(err).To(MatchError(isNotFound, "is the error is a not found error"))`

These four format are checked on runtime, but sometimes it's too late. ginkgolinter performs a static analysis and so it
will find these issues on build time.

ginkgolinter checks the following:
* Is the first parameter is one of the four options above.
* That there are no additional parameters passed to the matcher; e.g.
  `MatchError(isNotFoundFunc, "a valid description" , "not used string")`. In this case, the matcher won't fail on run
  time, but the additional parameters are not in use and ignored.
* If the first parameter is a function with the format of `func(error)bool`, ginkgolinter makes sure that the second
  parameter exists and its type is string.

89 of 96 new or added lines in 2 files covered. (92.71%)

1102 of 1305 relevant lines covered (84.44%)

767.16 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6811593105.1 09 Nov 2023 12:14PM UTC 0
84.44
GitHub Action Run
Source Files on build 6811593105
Detailed source file information is not available for this build.
  • Back to Repo
  • 289fb3c4 on github
  • Prev Build on main (#6681659461)
  • Next Build on main (#6845635331)
  • 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