Skip to content

Conversation

@ZelvaMan
Copy link
Contributor

@ZelvaMan ZelvaMan commented Oct 2, 2025

Add semicolons_inline option to clickhouse-format to make it more convenient to use as formatter in IDE. It doesn't change default behavior

Changelog category (leave one):

  • New Feature

Changelog entry:

  • Add --semicolons_inline option to format queries so that semicolons are placed on the last line instead of on a new line

Documentation entry for user-facing changes:

The description of the CLI argument should be enough

@pamarcos pamarcos added the can be tested Allows running workflows for external contributors label Oct 2, 2025
@clickhouse-gh
Copy link

clickhouse-gh bot commented Oct 2, 2025

Workflow [PR], commit [019235c]

Summary:

job_name test_name status info comment
Stateless tests (amd_binary, old analyzer, s3 storage, DatabaseReplicated, parallel) failure
03212_variant_dynamic_cast_or_default FAIL
Stateless tests (amd_debug, sequential) failure
03174_exact_rows_before_aggregation FAIL

@pamarcos pamarcos self-assigned this Oct 2, 2025
@pamarcos pamarcos self-requested a review October 2, 2025 15:00
@clickhouse-gh clickhouse-gh bot added the pr-feature Pull request with new product feature label Oct 2, 2025
@pamarcos
Copy link
Member

pamarcos commented Oct 2, 2025

Thanks for the contribution! Could you add a test to ensure this does what's supposed to do? That way we'll ensure we won't break it

Take a look at a similar example at https://github.com/ClickHouse/ClickHouse/blob/b6d1cd80c1e49fcd0bab17d9b2eb452c8113f6ed/tests/queries/0_stateless/00948_format_in_with_single_element.sh

@pamarcos
Copy link
Member

pamarcos commented Oct 2, 2025

Add semicolons_inline option to clickhouse-format to make it more convenient to use as formatter in IDE

Why does it make it more convenient to use in an IDE?

@ZelvaMan
Copy link
Contributor Author

ZelvaMan commented Oct 3, 2025

Hi, thanks for looking at my MR, I will add tests.

Why does it make it more convenient to use in an IDE?

This and the other MR I am working on would enable me to use clickhouse-format as formatter in nvim, because it would make the output same of formatters other people on my team use.

@CLAassistant
Copy link

CLAassistant commented Oct 3, 2025

CLA assistant check
All committers have signed the CLA.

@ZelvaMan ZelvaMan force-pushed the format-semicolons-inline branch from c2c67e9 to eb95073 Compare October 3, 2025 10:43
@ZelvaMan
Copy link
Contributor Author

ZelvaMan commented Oct 6, 2025

Hi, I see there are still some failing tests, but i don't see how i could have caused them. I there anything I still need to do from my side?

@pamarcos
Copy link
Member

pamarcos commented Oct 6, 2025

Hi, I see there are still some failing tests, but i don't see how i could have caused them. I there anything I still need to do from my side?

Hi! Not your fault, just some flaky tests. No need to do anything on your side. I merged master, modified the CHANGELOG entry to make the new parameter more explicit and also fixed the style issue our CI found. If you're happy with the current changes and give me green light, I will follow on this PR to make sure it lands in master.

@ZelvaMan
Copy link
Contributor Author

ZelvaMan commented Oct 6, 2025

Yeah I am happy with the changes, thanks for the help with CI.

@pamarcos pamarcos enabled auto-merge October 6, 2025 13:13
@pamarcos pamarcos added this pull request to the merge queue Oct 6, 2025
Merged via the queue into ClickHouse:master with commit 4a7a992 Oct 6, 2025
120 of 123 checks passed
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors pr-feature Pull request with new product feature pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants