-
Notifications
You must be signed in to change notification settings - Fork 265
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:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Child of #2730. Auto generate Global Server Settings markdown from source.
The text was updated successfully, but these errors were encountered: