thoughtbot / thoughtbot/factory_bot
Lint: multiple factory definitions that make the same object
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 8.2k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
Idea for a lint: complain if two factory definitions create the same object. This is a goal towards these ideals:
- each factory definition is the minimum required to make the object
- anything additional is added via traits
We'll need to consider factories that make e.g. Hash, String, Array -- either by letting the user turn off the linter for them, or by recognizing them as OK.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by locating the project's existing lint implementation and how factory definitions are represented, then determine how duplicate created objects and exceptions such as Hash, String, and Array should be handled. Done means the lint detects redundant factory definitions with a documented way to allow intentional cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- testing, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100