Skip to content
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

Consider partnering with IBAnalyzer #5

Open
Sherlouk opened this issue Jan 3, 2018 · 10 comments
Open

Consider partnering with IBAnalyzer #5

Sherlouk opened this issue Jan 3, 2018 · 10 comments
Assignees
Milestone

Comments

@Sherlouk
Copy link

Sherlouk commented Jan 3, 2018

I've recently come to see your tool as well as IBAnalyzer and I feel there could be quite a powerful library coming out of the these two tools being combined?

Regardless of a partnership or matching functionality, I feel the features would definitely compliment one another and provide a one-stop spot for normalising and detecting issues with interface files!

Just throwing the idea out there, loving the work you've done so far!

@kateinoigakukun
Copy link
Collaborator

Thanks for your suggestion. I have checked IBAnalyzer and I feel it's futures are so powerful.
I'm working in progress in this branch for implementation of IB connection validation. 👍

@piobyz
Copy link

piobyz commented Feb 13, 2018

I totally agree with @Sherlouk regarding partnership.
Especially because @fastred replied fastred/IBAnalyzer#32
Is this something @kateinoigakukun you would be interested in?

Another idea: why not integrating all IB-related rules into SwiftLint itself?
@kateinoigakukun Have you considered that option? Is there any interest in SwiftLint community?

@SD10
Copy link
Member

SD10 commented Mar 9, 2018

I would be interested in this 😃

@kateinoigakukun
Copy link
Collaborator

kateinoigakukun commented Mar 9, 2018

@piobyz Thanks for contact with @fastred.

Looks nice! Feel free to use any ideas from IBAnalyzer. :)

I worry about performance for using SourceKitten which is also used in SwiftLint. So considering performance, integrating into SwiftLint is interested! But that changes will may be broke both IBLinter and SwiftLint architecture. And IBLinterCore doesn't parse completely xml, so can't extract all IB connection.

For these reasons, we need to argue how to implement this feature 😓 Do you have any idea? (cc: @SD10 )

@SD10
Copy link
Member

SD10 commented Mar 9, 2018

@kateinoigakukun

And IBLinterCore doesn't parse completely xml, so can't extract all IB connection.

It shouldn't be too difficult to parse the IB connections in IBLinterCore? We just need to model them and then implement the decoding methods.

I worry about performance for using SourceKitten which is also used in SwiftLint.

I haven't dug into SourceKitten yet, so I'm unaware of the performance implications, but we should try and keep these components as separate as possible.

In my opinion, it would be really great if we could extract IBLinterCore into a separate project - possible IBDecodable. Then make this project's sole concern to turn XML into Swift models. It should be agnostic of SourceKitten and IBLinter.

Maybe we can do something similar with the SourceKitten side of IBAnalyzer.

@kateinoigakukun
Copy link
Collaborator

kateinoigakukun commented Mar 10, 2018

@SD10

We just need to model them and then implement the decoding methods.

I can't figure out how to model all IB connection keeping connection owner's id with IBLinterCore decoding protocol 😢. (I tried but not good implementation https://github.com/kateinoigakukun/IBLinter/pull/9)
Could you implement the decoding methods or tell me how it works?

we should try and keep these components as separate as possible.

In my opinion, it would be really great if we could extract IBLinterCore into a separate project - possible IBDecodable.

I agree. When your this PR https://github.com/kateinoigakukun/IBLinter/pull/30 is finished, we can separate project! 🙌

@SD10
Copy link
Member

SD10 commented Mar 10, 2018

@kateinoigakukun I will look at decoding outlets. I think that something we need to do is every time we see an id while parsing, we store it in a dictionary that maps to the view.

Sent with GitHawk

@SD10
Copy link
Member

SD10 commented Mar 22, 2018

I worry about performance for using SourceKitten which is also used in SwiftLint.

@kateinoigakukun I understand what you mean by this now. This bothers me too. I wonder if some change can be made to SwiftLint to allow it to share the results of SourceKitten parsing with IBLinter?

@kateinoigakukun
Copy link
Collaborator

@SD10 Thank you for digging.
Even now SwiftLint saves parse results as cache. But using this cache is not recommended.
I wonder if there were the layer to parseSwift AST and save the result in shared file which were used by SwiftLint and IBLinter.

@SD10
Copy link
Member

SD10 commented Mar 23, 2018

I wonder if there were the layer to parseSwift AST and save the result in shared file which were used by SwiftLint and IBLinter.

Yeah, I was thinking of this. Maybe SwiftLint could provide the AST in a temp file. Then we could check if there is data inside this file, if not, parse ourselves. It would require opening an issue at SwiftLint and asking them what they can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants