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

Plugin expansion to add factory method structure checks. #102

Closed
JakeWharton opened this issue Aug 22, 2015 · 4 comments
Closed

Plugin expansion to add factory method structure checks. #102

JakeWharton opened this issue Aug 22, 2015 · 4 comments

Comments

@JakeWharton
Copy link
Owner

Expand the buildSrc plugin to verify certain commonalities to these factory methods:

@ZacSweers
Copy link
Contributor

Part of the way through implementing this, and just realized I should probably ask: Would this be part of the kotlin generation process or separate plugin functionality? I think I know the answer, but just to be clear...

Option 1 - Kotlin Gen

Pros:

  • Easy to plug in to the current code, no refactoring for sources retrieval code necessary.

Cons:

  • Would only run on kotlin generation

Option 2 - Separate plugin implementation

Pros:

  • Focused purpose and separation makes it easy to iterate on these checks for the future without tying them to kotlin generation
  • Depending on how fast it is, could add this as a preBuild task for more aggressive checking. Disablable via "noverify" param or something.

Cons:

  • None, really. Just more work, but probably for the better.

@ZacSweers
Copy link
Contributor

I liked option 2, and went with that if you want to take a look before I PR: https://github.com/hzsweers/RxBinding/tree/z/structured_checks

@JakeWharton
Copy link
Owner Author

Option 2 is fine, although sharing code between the two plugins shouldn't be out of the question. I don't think it needs the option to disable, create a task called validateBindings (or something) and make the check task on the project depend on it.

@JakeWharton
Copy link
Owner Author

Looks like it already caught some missing things, too!

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

No branches or pull requests

2 participants