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

Makes dependency on Java check configurable #95

Merged
merged 1 commit into from
Apr 3, 2017

Conversation

gdecaso
Copy link
Contributor

@gdecaso gdecaso commented Mar 31, 2017

As discussed in #79, though not strictly related to that issue, we can relax the dependency from Java's check task to spotlessCheck.

For backwards compatibility, and to respect @nedtwigg 's opinion on the philosophy of this project, the default is to add the dependency.

@nedtwigg
Copy link
Member

nedtwigg commented Apr 1, 2017

The "check" task isn't java-specific, it's meant to be general purpose.

Rather than living in "JavaExtension", the flag should live in "SpotlessExtension", and it should apply to all formatting tasks.

I think "runSpotlessCheckOnCheck" is unhelpful for users who haven't dug into the code. Maybe "enforceCheck"?

Also, do you mind squashing these into one commit for easier review? Thanks!

@gdecaso gdecaso force-pushed the master branch 2 times, most recently from c116941 to 0711a77 Compare April 1, 2017 17:59
@gdecaso
Copy link
Contributor Author

gdecaso commented Apr 1, 2017

Thanks @nedtwigg. Applied your suggestions and squashed everything into 0711a77. Please let me know what you think

@gdecaso
Copy link
Contributor Author

gdecaso commented Apr 1, 2017

Thanks @jbduncan. Applied your suggestions. Please take a look at squashed commit 6dec185.

@gdecaso
Copy link
Contributor Author

gdecaso commented Apr 2, 2017

@jbduncan I don't think the rename is needed. I have a project where I'm printing the property just for testing purposes and I'm accessing as follows

spotless {
	enforceCheck = false
	println enforceCheck
}

@nedtwigg
Copy link
Member

nedtwigg commented Apr 3, 2017

General types should be getX/setX, but booleans are a special case: isX/setX.

Thanks for a good PR :)

@nedtwigg nedtwigg merged commit a8ab1c1 into diffplug:master Apr 3, 2017
@gdecaso
Copy link
Contributor Author

gdecaso commented Apr 3, 2017

Thanks @nedtwigg. Please let me know if you are planning to do a release soon so I can uptake this in my projects. Or alternatively, do you have a Maven repository where this is in snapshot form?

@nedtwigg
Copy link
Member

nedtwigg commented Apr 3, 2017

It's available in 3.2.0-SNAPSHOT here, and we'll release later today: https://oss.sonatype.org/content/repositories/snapshots/com/diffplug/spotless/spotless-plugin-gradle/

@gdecaso
Copy link
Contributor Author

gdecaso commented Apr 3, 2017

Thanks!

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

Successfully merging this pull request may close these issues.

3 participants