-
Notifications
You must be signed in to change notification settings - Fork 461
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
Add an option to automatically exclude other project directories from target(...) #468
Comments
Can you do Also, I know there are folks who did If Spotless were to implement this change, how should it look? |
I can not. I want to configure spotless once for "all the markdown files" and be done with it. Well. There's a question if spotless should be applied at sub-project level at all. On the other hand, having "project-local" tasks for
I'm afraid you are not quite right here. See gradle/gradle#2986 and gradle/gradle#1348 (comment)
That is true. Why don't they opt-in for "making this path to include sub-projects"? Well, I'm even ok with "opt-in feature" that would exclude project directories of other projects. I can configure it just once and that is it.
|
Maybe we're doing it wrong, but this is how we get PatternFilterable, and at least in the past it included spotless/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/FormatExtension.java Lines 195 to 203 in 9713eda
It seems like you have thought this through, and you raise good points. This is the entirety of our target specification. Our documentation is "give us a string, and we will pass it to If we're not following the conventions you expect, I'm open to a design and PR for a better API. I'm always hostile to breaking changes - the whole point of Spotless is that this stuff doesn't matter, just pick a default and stick with it. Once people have picked Spotless, they shouldn't have to muck with their spotless block. The most important part of the design is the documentation. If you want a change, I would start by changing this: https://github.com/diffplug/spotless/tree/master/plugin-gradle#custom-rules |
Maybe implementing |
Migrated to autostyle/autostyle#1 |
It is quite easy to configure
allprojects { spotless {...
, however, it results in duplicate processing of the same files.It turns out
target("**/*.md")
affects sub-projects as well.In case for Apache JMeter we have a bunch of modules, and it would be great if `"**/*.md" did not descend to subprojects.
For instance, the root project should validate its own files, then subprojects should validate their own files, and so on.
I might see someone might want a "flat rule" when the rule is declared at the root project and verifies all the files, however, it is not that convenient because in that case I can no longer invoke
spotlessCheck
to check all the files relevant for the current submodule.The text was updated successfully, but these errors were encountered: