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

Add an option to automatically exclude other project directories from target(...) #1

Closed
vlsi opened this issue Nov 12, 2019 · 1 comment

Comments

@vlsi
Copy link
Member

vlsi commented Nov 12, 2019

It is quite easy to configure allprojects { autostyle {..., however, it results in duplicate processing of the same files.

allprojects { // <-- !!!
    autostyle {
        format("markdown") {
            target("**/*.md")
            trimTrailingWhitespace()
        }
    }
}

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.

@vlsi
Copy link
Member Author

vlsi commented Dec 26, 2019

The solution is to operate on the files relevant to one project by default.

The escape hatch is excludeSubprojects.set(false).

@vlsi vlsi closed this as completed in 2fde674 Dec 26, 2019
vlsi added a commit that referenced this issue Dec 27, 2019
…les that belong to the relevant projects

close #1
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

1 participant