-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Format build-tools and build-tools-internal #78910
Conversation
Our spotless configuration wasn't applied to these directories. This has to happen from the root directory, otherwise any formatting errors makes the project unbuildable. Also remove the `paddedCell` stuff, we've never needed it.
Pinging @elastic/es-delivery (Team:Delivery) |
build-tools-internal/src/main/groovy/elasticsearch.formatting.gradle
Outdated
Show resolved
Hide resolved
// different copies of the formatted files, so that you can see how they | ||
// differ and infer what is the problem. | ||
// When applied to e.g. `:build-tools`, we need to modify the path to our config files | ||
if (rootProject.file(importOrderPath).exists() == false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't feel ideal, any better ideas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it'd be better to move these config files to somewhere under build-conventions
now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build conventions is the right place imo for that stuff.
@mark-vieira @breskeby this PR is now configuring formatter via a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a minor request to handle precommit wiring better that I'd really would like to have instead of that hack. otherwise looks good to me. thanks for taking care of this
// different copies of the formatted files, so that you can see how they | ||
// differ and infer what is the problem. | ||
// When applied to e.g. `:build-tools`, we need to modify the path to our config files | ||
if (rootProject.file(importOrderPath).exists() == false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea
build-conventions/src/main/groovy/elasticsearch.formatting.gradle
Outdated
Show resolved
Hide resolved
// different copies of the formatted files, so that you can see how they | ||
// differ and infer what is the problem. | ||
// When applied to e.g. `:build-tools`, we need to modify the path to our config files | ||
if (rootProject.file(importOrderPath).exists() == false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build conventions is the right place imo for that stuff.
build-conventions/src/main/groovy/elasticsearch.formatting.gradle
Outdated
Show resolved
Hide resolved
@breskeby I've converted the Groovy plugin to Java, and applied the precommit plugin. Everything looks good, apart from one thing - my |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Our spotless configuration wasn't being applied to `build-tools` and `build-tools-internal`. Move the Spotless configuration to a Java plugin in `build-conventions`, and apply it everywhere. This resulted in a lot more Java files being subject to formatting, so I added more exclusions to the list. Also remove the `paddedCell` stuff, we've never needed it.
Backported to |
The spotless plugin applies the gradle base plugin which results in building all artifacts in the bwc projects when just running build. This is not intended and happened as part of work on elastic#78910 The correct fix is to not apply the base plugin in the spotless plugin IMO. We will work on getting that fix upstream to the third party gradle plugin Meanwhile we just ignore bwc projects for our formatting as they also have no source available anyhow.
The spotless plugin applies the gradle base plugin which results in building all artifacts in the bwc projects when just running build. This is not intended and happened as part of work on #78910 The correct fix is to not apply the base plugin in the spotless plugin IMO. We will work on getting that fix upstream to the third party gradle plugin Meanwhile we just ignore bwc projects for our formatting as they also have no source available anyhow. This fixes #79606 when backported to 7.x
The spotless plugin applies the gradle base plugin which results in building all artifacts in the bwc projects when just running build. This is not intended and happened as part of work on elastic#78910 The correct fix is to not apply the base plugin in the spotless plugin IMO. We will work on getting that fix upstream to the third party gradle plugin Meanwhile we just ignore bwc projects for our formatting as they also have no source available anyhow. This fixes elastic#79606 when backported to 7.x
The spotless plugin applies the gradle base plugin which results in building all artifacts in the bwc projects when just running build. This is not intended and happened as part of work on #78910 The correct fix is to not apply the base plugin in the spotless plugin IMO. We will work on getting that fix upstream to the third party gradle plugin Meanwhile we just ignore bwc projects for our formatting as they also have no source available anyhow. This fixes #79606 when backported to 7.x
Our spotless configuration wasn't being applied to
build-tools
andbuild-tools-internal
. Move the Spotless configuration to a Java plugin inbuild-conventions
, and apply it everywhere.This resulted in a lot more Java files being subject to formatting, so I added more exclusions to the list.
Also remove the
paddedCell
stuff, we've never needed it.