metosin / metosin/spec-tools

`spec-tools.data-spec/spec` has a wrong assert

Open Beginner friendly
#261 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Clojure
Stars
606
Forks
90
PR merge metrics
No merged PRs in 30d

Description

Its 1-arity signature, followed by the assert:

[{data :spec name :name nested? ::nested? :as opts}]
(assert spec "missing :spec predicate in data-spec")

Notice how it asserts spec instead of data. I got confused by it more than once myself while reading sources, seeing spec in one place and data in another.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Find the 1-arity definition of spec-tools.data-spec/spec and inspect the destructuring and assertion shown in the issue. Confirm that the assertion validates the data predicate rather than the spec symbol, then run the relevant project tests to verify the corrected behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
tooling
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.