Closed iilyak closed 1 month ago
Very nice, @iilyak !
I noticed it has one extra error now after the types were added.
src/dreyfus_index.erl:297:17: The variable Error can never match since previous clauses completely covered the type {'ok', non_neg_integer()}
I wonder why that is? It would be nice if adding more types would reduce the discrepancies and show less errors not more.
This has been fixed by changing return type.
- {'ok', non_neg_integer()}
+ {'ok', non_neg_integer()} | error()
This has been fixed by changing return type.
- {'ok', non_neg_integer()} + {'ok', non_neg_integer()} | error()
Ah, very nice!
Overview
This PR serves as a code documentation since we don't run type checks during CI. It doesn't modify existing code just adding type specs.
Testing recommendations
Since we don't run dyalizer during CI and given the fact that it fails on main. There is no good way to test correctness of the spec other than comparing the output of dilayzer on main and on the current branch.
on main branch
on add-specs-to-clouseau_rpc branch
Related Issues or Pull Requests
Checklist
rel/overlay/etc/default.ini
src/docs
folder