chore: Reformat sources with astyle.#2629
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2629 +/- ##
==========================================
+ Coverage 73.71% 73.82% +0.10%
==========================================
Files 148 148
Lines 30424 30419 -5
==========================================
+ Hits 22428 22456 +28
+ Misses 7996 7963 -33 ☔ View full report in Codecov by Sentry. |
23a92cb to
c1e13e3
Compare
a3a37dc to
62f6790
Compare
Restyled astyle is fixed now.
|
(Annoying how GitHub's "Hide whitespace" doesn't hide files with the only change being removal of empty lines.) |
| --add-braces | ||
| --convert-tabs | ||
| --max-code-length=120 | ||
| --max-code-length=200 |
There was a problem hiding this comment.
What is the reason for the line length increase? (Please don't say that it's a new 4k monitor you got :D)
There was a problem hiding this comment.
Mainly that astyle is doing a really poor job at breaking argument lists, so I'd rather make this manual. I'd make it 1000 if I could, but astyle limits this to 200.
Example:
- ck_assert_msg(get_close_nodes(subtoxes[i]->dht, dht_get_self_public_key(subtoxes[i]->dht), nodes, net_family_unspec(), true,
+ ck_assert_msg(get_close_nodes(subtoxes[i]->dht, dht_get_self_public_key(subtoxes[i]->dht), nodes, net_family_unspec(),
+ true,
true) > 0,
-bool tox_pass_encrypt(const uint8_t plaintext[], size_t plaintext_len, const uint8_t passphrase[], size_t passphrase_len,
+bool tox_pass_encrypt(const uint8_t plaintext[], size_t plaintext_len, const uint8_t passphrase[],
+ size_t passphrase_len,
uint8_t ciphertext[/*! plaintext_len + TOX_PASS_ENCRYPTION_EXTRA_LENGTH */], Tox_Err_Encryption *error);There was a problem hiding this comment.
But that now open the gate for 200-wide if-statements, comments, etc., and 200 columns is a bit too wide, that's a big chunk of a 1080p screen at 9pt monospace (the whole screen is around 270 columns, give or take).
b7404f2
|
Uh... |
|
@toktok-releaser We are still not done discussing here. |
#2621 was approved and merged. @toktok-releaser can't really know that your approval is actually not approving the full pr and needs to wait for a base pr review first. |
@iphydf the same can be said for @nurupo. Although it wasn't the case here since I knew of both PRs, in a hypothetical scenario, I might not know that PR2 is based on an earlier PR1 (as I might have not seen PR1 yet, maybe I'm just going over my GitHub emails and PR2 was the first I opened). PR2 looks good to me and I approve PR2, which results in PR2 and PR1 getting merged, without me knowing that there is a separate PR1 that is being discussed by someone else. How do we prevent something like this in the future? Even more generally, how do we prevent a PR2, which based on a PR1, from being merged before the PR1 does? Should we disallow basing PRs on other PRs? Can the PR2 author block their own PR? That way others could review it and approve it, with the author coordinating for the PR2 to be merged after the base PR1 does? Or perhaps better yet, just keep the PR2 marked as WIP until the base PR1 is merged? Btw, what happened in this case is that I forgot that @toktok-releaser exists and may auto-merge a PR, as it sometimes auto-merges PRs but other times not (can't merge in I want to point out that:
All of this makes me steer more towards the idea of marking PRs based on other PRs as WIP. |
Restyled astyle is fixed now.
This change is