NFIBrokerage / spear

A sharp EventStoreDB v20+ client backed by Mint :yum:
https://hex.pm/packages/spear
Apache License 2.0
85 stars 14 forks source link

chore: add dialyzer to pipeline #82

Open yordis opened 1 year ago

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 4b7c6eefe2d152d4cb26f9b4103e8ec8e2693453-PR-82

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Files with Coverage Reduction New Missed Lines %
lib/spear/cluster_member.ex 1 75.0%
lib/spear/connection.ex 1 98.86%
lib/spear/connection/keep_alive_timer.ex 1 93.75%
lib/spear/connection/request.ex 1 98.46%
lib/spear/filter.ex 1 96.97%
lib/spear/persistent_subscription/settings.ex 1 96.67%
lib/spear/user.ex 1 75.0%
lib/spear/batch_append_result.ex 2 81.82%
lib/spear/event.ex 2 96.0%
lib/spear.ex 2 98.94%
<!-- Total: 31 -->
Totals Coverage Status
Change from base Build 90f7c2354426e0164eea7e64777ef9da5806e69e: -4.1%
Covered Lines: 730
Relevant Lines: 761

💛 - Coveralls
yordis commented 1 year ago
lib/spear/reading/stream.ex:50:pattern_match
The pattern can never match the type.

Pattern:

  {{:"event_store.client.streams.ReadResp",
    {:stream_not_found, {:"event_store.client.streams.ReadResp.StreamNotFound", _}}},
   __rest}

Type:
nil

________________________________________________________________________________
lib/spear/reading/stream.ex:54:pattern_match
The pattern can never match the type.

Pattern:
{_message = {:"event_store.client.streams.ReadResp", {:event, _}}, __rest}

Type:
nil

________________________________________________________________________________
lib/spear/reading/stream.ex:60:pattern_match
The pattern can never match the type.

Pattern:
{{:"event_store.client.streams.ReadResp", {_content_case, _}}, __rest}

Type:
nil

________________________________________________________________________________
lib/spear/reading/stream.ex:100:pattern_match
The pattern can never match the type.

Pattern:
{_, _rest = <<__head, _ / binary>>}

Type:
nil

________________________________________________________________________________
lib/spear/reading/stream.ex:113:pattern_match
The pattern can never match the type.

Pattern:
{_message = {:"event_store.client.streams.ReadResp", {:event, _}}, _remaining_buffer}

Type:
nil

________________________________________________________________________________
lib/spear/reading/stream.ex:118:pattern_match
The pattern can never match the type.

Pattern:
{{:"event_store.client.streams.ReadResp", _}, _remaining_buffer}

Type:
nil

________________________________________________________________________________
done (warnings were emitted)
Halting VM with exit status 2

Got stuck with these issues!

the-mikedavis commented 1 year ago

Ah I think Spear.Reading.Stream.unfold_chunk/1 is spec'd incorrectly: it should be tuple() instead of struct() since each message is decoded by gpb as a record

yordis commented 1 year ago

I think it is ready now 😄