format.sh is broken: for example dbms is no longer exist and programs is missing.
I noticed that I'm getting different formatted code with clang-format 9.0.1. For example, code here turns into this, which is annoying:
AccessControlManager::AccessControlManager()
: MultipleAccessStorage(createStorages())
, context_access_cache(std::make_unique<ContextAccessCache>(*this))
, role_cache(std::make_unique<RoleCache>(*this))
, row_policy_cache(std::make_unique<RowPolicyCache>(*this))
, quota_cache(std::make_unique<QuotaCache>(*this))
, settings_profiles_cache(std::make_unique<SettingsProfilesCache>(*this))
, external_authenticators(std::make_unique<ExternalAuthenticators>())
, custom_settings_prefixes(std::make_unique<CustomSettingsPrefixes>())
Is this relevant to .clang-format or something else?
The style is described here: https://clickhouse.tech/docs/en/development/style/
And there is a style check script: see https://github.com/ClickHouse/ClickHouse/tree/master/utils/check-style (fired automatically for every PR in CI)
AFAIK most programmers just do formatting manually, if you see the issues in formatting script - fill free to send PR with samples of how your improvement changes the way of formatting.
for example dbms is no longer exist and programs is missing.
It seems we missed that part during repo reorganization
https://github.com/ClickHouse/ClickHouse/pull/9974
https://github.com/ClickHouse/ClickHouse/pull/10042
Please fill free to send PR with fixes.
/cc @abyss7
Comment of check-style says it's not suitable to apply clang-format to the whole project so maybe format.sh is not that useful. But I think the better way may be tuning .clang-format to be consistent with the style documented and use clang-format automatically.
BTW I'm not able to find CI config file and wondering what the CI is doing for every PR. Is ClickHouse using an internal CI system?
But I think the better way may be tuning .clang-format to be consistent with the style documented and use clang-format automatically.
Fill free to improve that
Is ClickHouse using an internal CI system?
Yes. But most of the scripts/docker images etc. are inside that repo, and all the CI runs are visible in github and you can find there how it was fired by looking in logs.