Skip to content

Sort header includes in a constent order #413

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

Merged
merged 1 commit into from
Jun 10, 2025

Conversation

jeltz
Copy link
Collaborator

@jeltz jeltz commented Jun 10, 2025

Inspired by how PostgreSQL does it we support our includes in the following order:

  1. postgres.h
  2. System headers
  3. PostgreSQL headers
  4. pg_tde headers
  5. Frontend/backend specific headers

Within every section we sort includes in alphabetical order where possible, which right now was everywhere except in keyring_kmip_impl.c.

Inspired by how PostgreSQL does it we support our includes in the
following order:

1. postgres.h
2. System headers
3. PostgreSQL headers
4. pg_tde headers
5. Frontend/backend specific headers

Within every section we sort includes in alphabetical order where
possible, which right now was everywhere except in keyring_kmip_impl.c.
@jeltz jeltz requested review from dutow and dAdAbird as code owners June 10, 2025 12:11
@codecov-commenter
Copy link

codecov-commenter commented Jun 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.50%. Comparing base (8084e6a) to head (a36a909).

Additional details and impacted files
@@                  Coverage Diff                  @@
##           TDE_REL_17_STABLE     #413      +/-   ##
=====================================================
- Coverage              85.51%   85.50%   -0.01%     
=====================================================
  Files                     22       22              
  Lines                   2547     2546       -1     
  Branches                 389      388       -1     
=====================================================
- Hits                    2178     2177       -1     
  Misses                   293      293              
  Partials                  76       76              
Components Coverage Δ
access 83.73% <ø> (ø)
catalog 88.88% <ø> (ø)
common 91.80% <ø> (ø)
encryption 72.56% <ø> (ø)
keyring 72.94% <ø> (ø)
src 91.42% <ø> (ø)
smgr 94.85% <ø> (-0.03%) ⬇️
transam ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@AndersAstrand AndersAstrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I've been so annoyed by the random ordering.

@jeltz jeltz merged commit 1749d8c into percona:TDE_REL_17_STABLE Jun 10, 2025
16 of 17 checks passed
@jeltz jeltz deleted the tde/include-order branch June 13, 2025 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants