You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -859,8 +844,7 @@ Common misconceptions are clarified in those sections:
859
844
860
845
-*Rationale*: This avoids memory and resource leaks, and ensures exception safety.
861
846
862
-
C++ data structures
863
-
--------------------
847
+
## C++ data structures
864
848
865
849
- Never use the `std::map []` syntax when reading from a map, but instead use `.find()`.
866
850
@@ -953,8 +937,7 @@ int GetInt(Tabs tab)
953
937
954
938
*Rationale*: The comment documents skipping `default:` label, and it complies with `clang-format` rules. The assertion prevents firing of `-Wreturn-type` warning on some compilers.
955
939
956
-
Strings and formatting
957
-
------------------------
940
+
## Strings and formatting
958
941
959
942
- Use `std::string`, avoid C string manipulation functions.
960
943
@@ -988,8 +971,7 @@ Strings and formatting
988
971
checks. If a use of strings is sensitive to this, take care to check the string for embedded NULL characters first
989
972
and reject it if there are any.
990
973
991
-
Shadowing
992
-
--------------
974
+
## Shadowing
993
975
994
976
Although the shadowing warning (`-Wshadow`) is not enabled by default (it prevents issues arising
995
977
from using a different variable with the same name),
@@ -998,8 +980,7 @@ please name variables so that their names do not shadow variables defined in the
998
980
When using nested cycles, do not name the inner cycle variable the same as in
Write scripts in Python or Rust rather than bash, when possible.
1117
1096
1118
-
Source code organization
1119
-
--------------------------
1097
+
## Source code organization
1120
1098
1121
1099
- Implementation code should go into the `.cpp` file and not the `.h`, unless necessary due to template usage or
1122
1100
when performance due to inlining is critical.
@@ -1150,8 +1128,7 @@ namespace {
1150
1128
1151
1129
-*Rationale*: Avoids confusion about the namespace context.
1152
1130
1153
-
GUI
1154
-
-----
1131
+
## GUI
1155
1132
1156
1133
- Do not display or manipulate dialogs in model code (classes `*Model`).
1157
1134
@@ -1172,8 +1149,7 @@ GUI
1172
1149
-*Rationale*: Blocking the GUI thread can increase latency, and lead to
1173
1150
hangs and deadlocks.
1174
1151
1175
-
Subtrees
1176
-
----------
1152
+
## Subtrees
1177
1153
1178
1154
Several parts of the repository are subtrees of software maintained elsewhere.
1179
1155
@@ -1203,8 +1179,7 @@ The ultimate upstream of the few externally managed subtrees are:
1203
1179
- Used by leveldb for hardware acceleration of CRC32C checksums for data integrity.
1204
1180
- Upstream at https://github.com/google/crc32c ; maintained by Google.
1205
1181
1206
-
Upgrading LevelDB
1207
-
---------------------
1182
+
## Upgrading LevelDB
1208
1183
1209
1184
Extra care must be taken when upgrading LevelDB. This section explains issues
1210
1185
you must be aware of.
@@ -1250,8 +1225,7 @@ would be to revert the upstream fix before applying the updates to Bitcoin's
1250
1225
copy of LevelDB. In general, you should be wary of any upstream changes affecting
1251
1226
what data is returned from LevelDB queries.
1252
1227
1253
-
Scripted diffs
1254
-
--------------
1228
+
## Scripted diffs
1255
1229
1256
1230
For reformatting and refactoring commits where the changes can be easily automated using a bash script, we use
1257
1231
scripted-diff commits. The bash script is included in the commit message and our CI job checks that
@@ -1307,8 +1281,7 @@ To find all previous uses of scripted diffs in the repository, do:
1307
1281
git log --grep="-BEGIN VERIFY SCRIPT-"
1308
1282
```
1309
1283
1310
-
Release notes
1311
-
-------------
1284
+
## Release notes
1312
1285
1313
1286
Release notes should be written for any PR that:
1314
1287
@@ -1321,8 +1294,7 @@ Release notes should be added to a PR-specific release note file at
1321
1294
`/doc/release-notes-<PR number>.md` to avoid conflicts between multiple PRs.
1322
1295
All `release-notes*` files are merged into a single `release-notes-<version>.md` file prior to the release.
1323
1296
1324
-
RPC interface guidelines
1325
-
--------------------------
1297
+
## RPC interface guidelines
1326
1298
1327
1299
A few guidelines for introducing and reviewing new RPC interfaces:
1328
1300
@@ -1430,8 +1402,7 @@ A few guidelines for modifying existing RPC interfaces:
1430
1402
1431
1403
-*Rationale*: Changes in RPC JSON structure can break downstream application compatibility. Implementation of `deprecatedrpc` provides a grace period for downstream applications to migrate. Release notes provide notification to downstream users.
1432
1404
1433
-
Internal interface guidelines
1434
-
-----------------------------
1405
+
## Internal interface guidelines
1435
1406
1436
1407
Internal interfaces between parts of the codebase that are meant to be
Copy file name to clipboardExpand all lines: doc/productivity.md
+6-12Lines changed: 6 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,6 @@
1
-
Productivity Notes
2
-
==================
1
+
# Productivity Notes
3
2
4
-
Table of Contents
5
-
-----------------
3
+
## Table of Contents
6
4
7
5
*[General](#general)
8
6
*[Cache compilations with `ccache`](#cache-compilations-with-ccache)
@@ -23,8 +21,7 @@ Table of Contents
23
21
*[Reference PRs easily with `refspec`s](#reference-prs-easily-with-refspecs)
24
22
*[Diff the diffs with `git range-diff`](#diff-the-diffs-with-git-range-diff)
25
23
26
-
General
27
-
------
24
+
## General
28
25
29
26
### Cache compilations with `ccache`
30
27
@@ -114,8 +111,7 @@ This synergizes well with [`ccache`](#cache-compilations-with-ccache) as objects
114
111
115
112
You can also set up [upstream refspecs](#reference-prs-easily-with-refspecs) to refer to pull requests easier in the above `git worktree` commands.
116
113
117
-
Writing code
118
-
------------
114
+
## Writing code
119
115
120
116
### Format C/C++ diffs with `clang-format-diff.py`
121
117
@@ -125,8 +121,7 @@ See [contrib/devtools/README.md](/contrib/devtools/README.md#clang-format-diff.p
125
121
126
122
Usage is exactly the same as [`clang-format-diff.py`](#format-cc-diffs-with-clang-format-diffpy). You can get it [here](https://github.com/MarcoFalke/yapf-diff).
127
123
128
-
Rebasing/Merging code
129
-
-------------
124
+
## Rebasing/Merging code
130
125
131
126
### More conflict context with `merge.conflictstyle diff3`
132
127
@@ -154,8 +149,7 @@ theirs
154
149
155
150
This may make it much clearer what caused the conflict. In this style, you can often just look at what changed between *original* and *theirs*, and mechanically apply that to *yours* (or the other way around).
0 commit comments