Skip to content

ESQL: Disable format checks on generated imports #127648

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented May 2, 2025

This builds the infrastructure to disable spotless and some checkstyle rules on generated imports. This works around the most frustrating part of ESQL's string template generated files - the imports. It allows unused and out of order imports. This can let us remove a lot of cumbersome, tricky, and fairly useless $if$ blocks from the templates.

This builds the infrastructure to disable spotless and some checkstyle
rules on generated imports. This works around the most frustrating part
of ESQL's string template generated files - the imports. It allows
unused and out of order imports. This can let us remove a lot of
cumbersome, tricky, and fairly useless `$if$` blocks from the templates.
@nik9000 nik9000 added >non-issue :Delivery/Build Build or test infrastructure :Analytics/ES|QL AKA ESQL v9.1.0 labels May 2, 2025
@nik9000 nik9000 requested a review from a team as a code owner May 2, 2025 16:08
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label May 2, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@elasticsearchmachine elasticsearchmachine added the Team:Delivery Meta label for Delivery team label May 2, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-delivery (Team:Delivery)

Copy link
Contributor

@breskeby breskeby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. I wonder how much value we get from checking generated code at all. ultimately not just the imports are generated but the whole file so the current toggle comment might be misleading

@nik9000
Copy link
Member Author

nik9000 commented May 2, 2025

lgtm. I wonder how much value we get from checking generated code at all. ultimately not just the imports are generated but the whole file so the current toggle comment might be misleading

We get quite a bit of value out of checking the code generated by string templates like these because we copy all of the formatting from string template. We aren't running checkstyle on the code that we make using antlr or javapoet.

Copy link
Member

@dnhatn dnhatn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@nik9000 nik9000 enabled auto-merge (squash) May 2, 2025 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL :Delivery/Build Build or test infrastructure >non-issue Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) Team:Delivery Meta label for Delivery team v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants