-
Notifications
You must be signed in to change notification settings - Fork 349
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
[Linter] Cleanup the linter #50
Conversation
Clears up a bit of the clutter inside of linter.rb and makes it clearly it's own entity within the linter.
Validation hook runners were essentially the same except by whom they were targetting.
👍 The |
@irrationalfab I like that idea. This will also let us drastically simplify some of the validation hooks into more concrete steps. For example, the name validator should call |
Also this should not be merged in until after 0.29.0 is out for obvious stability reasons 😸 |
@kapin 👍 |
tldr; moved a ton of code out of the linter into another class. TODOS: - Create a results mixin - Separate out the validation into two sections for both consumers and specs - Make sure documentation is good
I'm supper happy by the progress on this! |
@irrationalfab and @alloy is there any way to get the code climate thing running on this branch? It'll help a wee bit with ironing out the knots. |
did this get branched? |
@orta what do you mean? |
oh you asked about code climate, my bad |
@kapin in any case here it is: https://codeclimate.com/github/CocoaPods/Core/compare/linter-refactor |
Thanks! This helps a lot :) |
Conflicts: spec/specification/linter_spec.rb
Just an update as I've disappeared off the planet for the past few months. Only about a month of school left in the term and I plan on finishing this up once exams are done. Hopefully, I'll be able to make some serious progress in the week or so I have off before I start work. |
@kapin I was wondering if we can rebase and merge this, and then complete the refactor in a separated pull request when you have some time? |
Yes we can. I'll get it ready by the end of the week. |
Conflicts: lib/cocoapods-core/specification/linter.rb spec/specification/linter_spec.rb
Porting over the last of the linter specs that are now used by the analyzer over.
Conflicts: lib/cocoapods-core/specification/linter.rb
Nice thanks! I will review it and merge it! |
Great work, @kapin! |
Part of #48. Changes so far include moving the Result object used by the linter into it's own file and de-duplicating some of the validation running code. I still would like to move all of the attribute validation into it's own class, but this is a start.