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

Disallow write-only task properties #9341

Closed
l0rinc opened this issue May 2, 2019 · 5 comments
Closed

Disallow write-only task properties #9341

l0rinc opened this issue May 2, 2019 · 5 comments
Assignees
Milestone

Comments

@l0rinc
Copy link
Contributor

l0rinc commented May 2, 2019

E.g.

// no field, just setter
public void setMutablePropertyWithoutGetter() {} 

(see ValidateTaskPropertiesIntegrationTest#report setters for property with mutable type #type)

It should warn about a write-only property, i.e. unpaired get/set.
See: https://github.com/gradle/gradle/pull/9324/files#r280388131

@l0rinc l0rinc added a:feature A new functionality @build-cache and removed a:feature A new functionality labels May 2, 2019
@stale
Copy link

stale bot commented Sep 13, 2020

This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution.

@stale stale bot added the stale label Sep 13, 2020
@stale
Copy link

stale bot commented Oct 4, 2020

This issue has been automatically closed due to inactivity. If you can reproduce this on a recent version of Gradle or if you have a good use case for this feature, please feel free to reopen the issue with steps to reproduce, a quick explanation of your use case or a high-quality pull request.

@stale stale bot closed this as completed Oct 4, 2020
@lptr
Copy link
Member

lptr commented Oct 5, 2020

I think we want to do this eventually.

@lptr lptr reopened this Oct 5, 2020
@stale stale bot removed the stale label Oct 5, 2020
@lptr
Copy link
Member

lptr commented Dec 10, 2020

Another good validation to add for 7.0.

@lptr lptr added this to the 7.0 RC1 milestone Dec 10, 2020
@lptr
Copy link
Member

lptr commented Jan 26, 2021

I tried to implement this, but it doesn't make much sense in the end. We also have tasks that have setters without getters, and in general there should be nothing wrong with having differently setters for properties if the different names add useful context.

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