-
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
IB connection rule #9
Conversation
@@ -5,7 +5,7 @@ | |||
// Created by SaitoYuta on 2017/12/13. | |||
// | |||
|
|||
public protocol InterfaceBuilderFile { | |||
public protocol FileProtocol { |
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.
to analyze not only xib
or storyboard
but also swift
func validate(storyboard: StoryboardFile) -> [Violation] | ||
func validate(xib: XibFile) -> [Violation] | ||
func validate(storyboard: StoryboardFile, swiftParser: SwiftIBParser) -> [Violation] | ||
func validate(xib: XibFile, swiftParser: SwiftIBParser) -> [Violation] |
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.
for swift file
Had a quick glance and I'm really excited that you've decided to pick this up! Thanks for that! Looking forward to giving it a go! |
@Sherlouk I have implemented this feature almost. |
Currently getting this when running in my primary project:
The Xib in question is part of one our dependencies, and I think by looking at the syntax it's a super old version of the format and just hasn't been updated. - I wonder in this eventuality if you could put a warning on the file saying it's an unsupported type or something? (Prompting the user to exclude it or update it) I've added a configuration file, and excluded the dependencies folder as we wouldn't want to test those - it did a successful run after that but raised a substantial amount of warnings/errors and I've checked a number of them and they appear to be false-positives (they do have a connection) I'm struggling to follow the code via GH (haven't got time at the moment for a deep review) but I wonder if it has something to do with how you locate corresponding files? Our XIBS are in a different folder than the actual View classes - could this be an issue? |
@Sherlouk Sorry for my late reply. |
Just pulled down, rebuilt and run against and am getting all the same errors! I'm obviously not dismissing the idea that there are errors among the masses that have been listed, but of the few I've manually checked they do exist. Example of what's being printed:
For what it's worth, 90% of the errors appear to be on storyboards? |
Another example where they're definitely connected, but script is saying otherwise! |
@Sherlouk I've added |
So first off I'm getting these unsupported views:
I'm also getting the exact same errors as listed above, I'll do a little bit of digging and see if I can reproduce on a smaller scale (I'm unable to share as is) |
Had to make some minor changes, but dropped into a clean project it's still failing on these! (It's failing on others but hoping fixing one will fix others!) |
Bugs have been fixed for the files you sent me. |
So this is also having issues when you have multiple xibs in the same project (in different targets though, not sure if there's a way to work that out easily) All remaining issues are on storyboards only |
af171b2
to
bb34d55
Compare
@Sherlouk |
Rule description
Check unimplemented outlets and actions in classes.
#5