Skip to content
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

Add declaration before code to guidelines #3032

Merged
merged 1 commit into from Mar 17, 2021

Conversation

mkindahl
Copy link
Contributor

Declarations before code has been informally supported and we have
several examples in the code. This commit adds that guideline to the
coding guidelines.

@mkindahl mkindahl requested a review from a team as a code owner March 17, 2021 08:03
@mkindahl mkindahl requested review from nikkhils, svenklemm and mfundul and removed request for a team March 17, 2021 08:03
@mkindahl mkindahl self-assigned this Mar 17, 2021
@codecov
Copy link

codecov bot commented Mar 17, 2021

Codecov Report

Merging #3032 (38fa10b) into master (ed62df7) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3032   +/-   ##
=======================================
  Coverage   90.27%   90.27%           
=======================================
  Files         213      213           
  Lines       35004    35004           
=======================================
  Hits        31601    31601           
  Misses       3403     3403           
Impacted Files Coverage Δ
src/loader/bgw_message_queue.c 87.09% <0.00%> (-0.65%) ⬇️
tsl/src/reorder.c 81.98% <0.00%> (+0.26%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ed62df7...38fa10b. Read the comment docs.

@pmwkaa
Copy link
Contributor

pmwkaa commented Mar 17, 2021

Is the idea to support it from now on?

@mkindahl
Copy link
Contributor Author

Is the idea to support it from now on?

We already have code in the repository with this, so nothing really changes. We are just documenting the guideline.

@@ -37,6 +37,21 @@ elaborates on the situation. Instead, we've tried our best to develop
a consistent style that roughly follows the style of the PostgreSQL
source code.

### Declarations before code

C99 support having code before a declaration, similar to C++, and we
Copy link
Member

Choose a reason for hiding this comment

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

support => supports

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Declarations before code has been informally supported and we have
several examples in the code. This commit adds that guideline to the
coding guidelines.
@mkindahl mkindahl merged commit 80f72dd into timescale:master Mar 17, 2021
@mkindahl mkindahl deleted the coding_guidelines branch March 17, 2021 12:55
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.

None yet

4 participants