-
Notifications
You must be signed in to change notification settings - Fork 278
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
Auto generate Global Server Settings markdown from source #2732
Comments
Using this SQL query to generate a list of server settings documented in the markdown but which are not found in ServerSettings.cpp WITH
'docs/en/operations/server-configuration-parameters/settings.md' AS doc_file,
'src/Core/ServerSettings.cpp' AS cpp_file,
settings_from_docs AS
(
WITH
arrayJoin(extractAllGroups(raw_blob, '## (\\w+)(?:\\s[^\n]+)?\n\\s+((?:[^#]|#[^#]|##[^ ])+)')) AS g,
g[1] AS name,
replaceRegexpAll(replaceRegexpAll(g[2], '\n(Type|Default( value)?): [^\n]+\n', ''), '^\n+|\n+$', '') AS doc
SELECT
name,
doc
FROM file(doc_file, RawBLOB)
),
settings_from_cpp AS
(
WITH
extractGroups(line, 'DECLARE\\((\\w+), (\\w+), ([^,]+|\',\'), "(.+?)"') AS g,
g[1] AS type,
g[2] AS name,
g[3] AS default,
g[4] AS doc,
g[5] AS important,
g[6] AS suffix
SELECT
name,
type,
default,
doc,
important,
suffix
FROM file(cpp_file, LineAsString)
WHERE match(line, '^\\s*DECLARE\\(')
)
SELECT name
FROM settings_from_docs
WHERE name NOT IN (
SELECT name
FROM settings_from_cpp
) AS settings_not_from_server_settings_cpp We get the following list:
|
Not wont cover all settings e.g. Added in but without docs for the config setting: ClickHouse/ClickHouse#60117 Server setting in config.xml: https://github.com/ClickHouse/ClickHouse/blob/9caac43b2aa5e7c5474a87b7596dea95f5a2569a/programs/server/config.xml#L775-L777 Should be on https://clickhouse.com/docs/en/operations/server-configuration-parameters/settings |
Child of #2730. Auto generate Global Server Settings markdown from source.
The text was updated successfully, but these errors were encountered: