Commit Graph
10 Commits
Author SHA1 Message Date
Alexey Milovidov e8e1e12ba0 Add a style check for the spelling of ClickHouse
The product name is written `ClickHouse` - one word, with a capital `C`
and a capital `H`. Two case variants are accepted, because a mixed case
is unusable there: `clickhouse` for identifiers, package, binary and host
names, and `CLICKHOUSE` for macros and environment variables. Everything
else - `Clickhouse`, `clickHouse`, `click_house`, `CLICK_HOUSE`,
`click-house`, `Click House` - is a misspelling, and the new
`clickhouse_spelling` check of the style job reports it, in code as well
as in comments, messages, documentation and file names.

The check searches every file tracked by git, and the file names
themselves. It skips:
* `contrib` - third-party sources;
* the generated locale directories of the documentation - a machine
  translation of the English pages, which are checked instead;
* release notes - a record of what was published;
* `docs/_specs` - API specifications pinned from their generator;
* regions between `AUTOGENERATED_START` and `AUTOGENERATED_END` markers -
  their source of truth (a `FunctionDocumentation` string, for instance)
  is checked instead;
* URLs - a link whose path spells the name differently is not a mistake
  we can fix, and rewriting it would only break the link;
* the exceptions listed in `clickhouse_spelling_ignore.txt` - text that
  is not ours to spell: names defined by other projects (the
  `ClickhouseClientOptions` of our Azure SDK fork, the `clickHouse*`
  parameters of Google's Dataflow templates), verbatim quotations (Stack
  Overflow post titles shown as query output), and the misspellings that
  tests feed to the server on purpose (`LIKE` / `ILIKE` case variants, an
  unknown URI scheme).

The rest of the change fixes the 191 misspellings this found. Most are
prose and comments; the renamed identifiers are `isClickhouseApp`,
`getClickhouseAttemptNumber` / `setClickhouseAttemptNumber`,
`getClickhouseTableSchemaById` / `hasClickhouseTableSchemaById`, the
`Clickhouse*` classes of `clickhouse-diagnostics`, the `tabClickhouse` /
`btnQueryClickhouse` element ids of the `utils` web tools, and
`clickHousePartsInserter.js`. Three of them are visible to tests: the
`X-Clickhouse-Format` HTTP header, the `SOURCE(Clickhouse(...))`
dictionary source and a directory named `Clickhouse`; the first two are
matched case-insensitively by the server (Poco header collections are
case-insensitive, and the parser lowercases the source name), which I
confirmed against a running server.

The rule is also written down in the style guide.
2026-08-15 02:44:49 +00:00
serxa f1a7fc3938 Add a cppexpr tool for Claude to be able to run code snippets 2026-02-19 21:36:02 +00:00
serxa 9f549fb9f4 fix 2025-06-24 22:21:57 +00:00
serxa 70aba2970d multithreaded benchmarks with c++expr 2025-06-24 22:13:26 +00:00
serxa 680119f095 Fix c++expr -b option 2024-10-23 15:09:54 +00:00
Azat Khuzhin ae2f71f289 utils/c++expr: add ability to preserve generated worktree and binary
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-05-16 13:13:59 +02:00
Azat Khuzhin 42246791f0 utils/c++expr: allow to change build directory
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-05-16 13:13:59 +02:00
Sergei Trifonov 417296481e fix root CMakeLists.txt search 2022-05-26 04:39:02 +02:00
Sergei Trifonov 5295adb83d add c++expr script examples 2022-01-28 16:43:25 +03:00
Sergei Trifonov 990fd2b0aa add c++expr script for C++ one-liners 2022-01-24 22:16:47 +03:00