Mockolo fails when source directory contains ".swift" suffix
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 886
- Forks
- 102
- Avg merge
- 6h 36m
- Merged PRs (30d)
- 2
Description
Given the following command and file structure, mockolo fails with an error. I think this is because mockolo attempts to interpret Directory.swift as a file instead of a directory because of the .swift suffix. We're running into this because we use the https://github.com/auth0/JWTDecode.swift package which calls itself "JWTDecode.swift".
mockolo --sourcedirs Sources
Sources
Directory.swift
File.swift
Error:
MockoloFramework/SourceParser.swift:105: Fatal error: Retrieving contents of /Users/[...]/Sources/Directory.swift failed
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
Reproduce the failure with mockolo --sourcedirs Sources using a directory named Directory.swift, then start at MockoloFramework/SourceParser.swift:105. Trace how source directories are classified and read. Done means nested Swift files are handled when a directory name ends in .swift, with the relevant test or regression coverage passing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100