Open Marquis103 opened 4 months ago
I've tried looking into this, but there's actually a test for this inside Cuckoo which tries creating an excluded class.
What's the name of the class you want to exclude? Make sure to use that in the array, it doesn't exclude whole files at the moment.
This is the actual class name. APIAuthenticationType
.
From the output it's recognizing the excluded files
excluded types:
[00:24:42]: ▸ -APIAuthenticationType
But then if you look right after that it says:
Processing file: APIAuthenticationType.swift
All this is given that my input sources is:
sources = [
project_name/API/**/*
]
Yeah, as I said it should not generate mocks from the excluded types, but it will parse the type regardless so that if it's needed for inheritance you as the user can feely use it.
Does it create the mock in the generated mocks, if so, that might be an issue worth investigating?
Yep it's creating the mocks which is the problem. We don't want to generate those mocks because they cause issues with the build overall. This mock in particular is a value type that conforms to this protocol, but for some reason the mock doesn't conform to CaseIterable. So I'd rather just leave it out.
protocol AuthenticationType: RawRepresentable, Hashable, CaseIterable {}
I see, that's weird, but I'm unable to reproduce it. If you can create a sample project with this issue present I can try fixing it.
Ok I can try doing that
I'm trying to figure out how to get the
exclude
portion of a module to actually be ignored. I've tried multiple different ways after reading through the codebase but nothing seems to work.E.g. In my sources if I have
It correctly mocks everything that's in that folder as expected.
However, if I have a file that lives in that structure e.g.
project_name/API/APIAuthenticationType.swift
and I want it to be ignored it's not working. It's showing that it's capturing it as a file that should be ignored, but it still mocks it. I've tried many different inputs to theexclude
but none seem to work. Any thoughts?