-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check all candidates of module which matches class name. #114
Check all candidates of module which matches class name. #114
Conversation
2797fc3
to
cbe00fe
Compare
let moduleCandidates = moduleClasses.lazy.filter({ $0.value.contains(customClass) }).map { $0.key } | ||
guard !moduleCandidates.isEmpty else { return [] } | ||
guard let customModule = classableObject.customModule, moduleCandidates.contains(customModule) else { | ||
let message = "It does not match custom module rule in \(fileNameWithoutExtension). Custom module of \(customClass) is one of \(moduleCandidates)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\(moduleCandidates)
this outputs like this
LazyMapSequence<LazyFilterSequence<Dictionary<String, Array<String>>>, String>(_base: Swift.LazyFilterSequence<Swift.Dictionary<Swift.String, Swift.Array<Swift.String>>>(_base: ["ModuleA": ["AView", "BView", "CView",..... (a lot of classes)
I expect module names list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the message format.
edffe8d
to
e1c6599
Compare
LGTM! It works. Thank you! (After this implementation, it found that our project has another misuse of |
@sidepelican Aren't you interested to be committer? 😆 |
Fix #113